Archive

Archive for the ‘Cloud Linux’ Category

How to change the color of your BASH prompt

May 11th, 2017 No comments

How to change the color of your BASH prompt

You can change the color of your BASH prompt to green with this command:

export PS1=”\e[0;32m[\u@\h \W]\$ \e[m”

It will change the colour of bash temporarily. To make it permanent then add code in bash_profile page.

vi ~/.bash_profile

and paste above code save the file and you are done.

For other colors please see the attached list:

Color Code
Black 0;30
Blue 0;34
Green 0;32
Cyan 0;36
Red 0;31
Purple 0;35
Brown 0;33
Blue 0;34
Green 0;32
Cyan 0;36
Red 0;31
Purple 0;35
Brown 0;33
Light Color Code
Light Black 1;30
Light Blue 1;34
Light Green 1;32
Light Cyan 1;36
Light Red 1;31
Light Purple 1;35
Light Brown 1;33
Light Blue 1;34
Light Green 1;32
Light Cyan 1;36
Light Red 1;31
Light Purple 1;35
Light Brown 1;33

Categories: Cloud Linux, CPanel / WHM, Tweaks Tags:

Uninstall Cloudlinux from cpanel

November 29th, 2013 No comments

You can always uninstall CloudLinux. In this case, we will ‘convert’ the system

back to CentOS. Even if the original system was RHEL — we will still convert to

‘CentOS’ state.

To uninstall CloudLinux follow below steps:

wget -O cldeploy http://repo.cloudlinux.com/cloudlinux/sources/cln/cldeploy

sh cldeploy -c

Please, note that some of the packages from CloudLinux repo will still be present. They are same as CentOS packages, and don’t have to be removed. They will be updated in the future from CentOS repositories, as new versions come out.

 

You can use below steps further:

Check if your server is Cloudlinux installed in it using below command.

/usr/local/cpanel/bin/cloudlinux_system_install -c

Update your CentOS-provided RPMs

yum upgrade -y

Rebuild Apache

/usr/local/cpanel/scripts/easyapache –build

or

/scripts/easyapache –build

Reinstall a non-CloudLinux kernel.

yum –disableexcludes=all install kernel

Remove CloudLinux Kernel

rpm -qa |awk ‘/^kernel.*lve/ {print $1|”xargs yum -y erase”}’

Reinstall any CloudLinux-provided RPMs that are also provided by CentOS

rpm -qa –qf “[%{VENDOR} %{NAME}\n]”|awk ‘/CloudLinux/ {print $2|”xargs yum reinstall -y”}’

Downgrade any CloudLinux provided RPMs to the CentOS version

rpm -qa –qf “[%{VENDOR} %{NAME}\n]”|awk ‘/CloudLinux/ {print $2|”xargs yum downgrade -y”}’

Remove any remaining CloudLinux specific RPMs

rpm -qa –qf “[%{VENDOR} %{NAME}\n]”|awk ‘/CloudLinux/ {print $2|”xargs yum erase -y”}’

Upgrade any downgraded CentOS provided RPMs

yum upgrade -y

Reboot the server to use the new non-CloudLinux kernel

reboot

 

Categories: Cloud Linux, CPanel / WHM Tags:

How to Uninstall MySQL Governor

November 29th, 2012 No comments

How to Uninstall MySQL Governor

 

Run the below commands to uninstall MySQL Governor

 

/usr/share/lve/dbgovernor/install-mysql.py –delete
yum erase db-governor db-governor-mysql

 

Upgrading MySQL Governor on CPanel, Plesk and DirectAdmin server

November 29th, 2012 No comments

Upgrading MySQL Governor on CPanel, Plesk and DirectAdmin server

 

Run the below command to update MySQL Governor

yum update db-governor db-governor-mysql –enablerepo=cloudlinux-updates-testing

Run the below command to restart the service

service db_governor restart

 

MySQL Governor installation in without control panel server

November 29th, 2012 No comments

MySQL Governor installation in without control panel server

 

Run the below command to install MySQL Governor in plain server or without control panel server.

yum install db-governor –enablerepo=cloudlinux-updates-testing
yum update mysql-server mysql-devel mysql –enablerepo=cloudlinux-updates-testing

Add the below line in my.cnf with root password

 [dbgovernor]

 

Run the below command to start.

service db_governor restart

How to install MySQL Governor on CPanel, Plesk and DirectAdmin

November 29th, 2012 No comments

How to install MySQL Governor on CPanel, Plesk and DirectAdmin

MySQL governor is set of utilities to monitor and restrict MySQL usage in shared hosting environment. The monitoring is done via USER_STATISTICS table that is available in CloudLinux version of MySQL as well as via tracking of slow queries.

To install MySQL governor on cPanel server

yum install db-governor –enablerepo=cloudlinux-updates-testing
/usr/share/lve/dbgovernor/install-mysql.py –install

Note :

MySQL on cPanel servers will be updated from CloudLinux RPMs.

MySQL Governor is compatible only with MySQL 5.x

 

How to install CageFS in Cloud Linux

November 29th, 2012 No comments

How to install CageFS in Cloud Linux

 

CageFS is a virtualized file system and a set of tools to contain each user in its own ‘cage’. Each customer will have its own fully functional CageFS, with all the system files, tools, etc.
CageFS was previously known as SecureLVE. The benefits of CageFS are:
Only safe binaries are available to user
User will not see any other users, and would have no way to detect presence of other users & their usernames on the server
User will not be able to see server configuration files, such as apache config files.

Run the below command to install CageFS

yum install cagefs

If you are using cPanel or Plesk with Apache web server – CageFS will automatically detect your settings, and install necessary configuration files. CageFS plugin will be installed in WHM and Plesk admin interface correspondingly. You can manage initialization, updates and users via that plugin.

After that, initialize file system template

/usr/sbin/cagefsctl –init

That will create file system template in /usr/share/cagefs-skeleton directory based on config files in /etc/cagefs/conf.d. It will also create mount points file and set “Disable All” CageFS mode.

Now, check your WHM. You can see the cageFS plugin in WHM.

 

Note: /usr/share/cagefs-skeleton can use 5-7GB of disk space. If you don’t have enough space on that partition you can create a symbolic link to partition where you have enough disk space. For example:
mkdir /home/cagefs-skeleton
ln -s /home/cagefs-skeleton /usr/share/cagefs-skeleton

 

 

Categories: Cloud Linux Tags: