Pages

Saturday, September 17, 2016

cPanel performance tweaks, Memory Consumption

Every cpanel server should be need to optimize according to your server usages, I hope the following articles will help to improve your cpanel server performance.

Run your cron jobs at off peak hours.

Stopping SpamAssassin

Go to WHM > Server Configuration > Tweak Settings > Disable Spamd

And:

Go to WHM > Service Manager > Disable Spamd

Disable Anonymous FTP

Remove virtfs and Disable for users

VirtFS provides a jailed shell environment for users who connect to a server via SSH. The jailed shell acts as a container for the user, and does not allow the user to access other users’ home directories on the server. Unlike a normal shell environment, a jailed shell environment prevents access to data outside of the user’s home directory.

Consuming lot of disk space ?

Most of server got large disk space due to this virtfs. You can Disable VirtFS,Remove VirtFS and Unmount the bind mounts. CPanel provides a script to remove the virtfs mounts. Remove virtfs and Disable for users in your cpanel server

Do not delete /home/virtfs/username folder directly because its hard link with user account.

cPanel FTP Connection issues

Here we have few steps to verify cpanel FTP connection related issues in your server. Most of problems will happen in your IPTABLES or CSF firewall settings. Any way first you should check your FTP is running fine.

Use the following command in your cpanel server to check FTP is listen.

root@server1 [~]# ftp localhost

If the response is as follows, the issue may be related to configuration of your Firewall.

Trying ::1...

How to Replace MySQL with MariaDB

 Backup existing MySQL data

Make sure to save all existing data just in case there are any issues.

    cp -Rf /var/lib/mysql /var/lib/mysql-old
    mv /etc/my.cnf /etc/my.cnf-old

Disable the targets so cPanel no longer handles MySQL updates

The following will mark the versions of MySQL we distribute as uninstalled so they are no longer maintained by cPanel/WHM

    /scripts/update_local_rpm_versions –edit target_settings.MySQL50 uninstalled
    /scripts/update_local_rpm_versions –edit target_settings.MySQL51 uninstalled
    /scripts/update_local_rpm_versions –edit target_settings.MySQL55 uninstalled

Remove existing MySQL RPM’s so theres a clean slate for MariaDB

The below command will uninstall the MySQL RPM’s!