move cpanel installation to home directory

Published by

Posted on October 15, 2014

If you run out of space on /usr , you can move the cpanel installation to /home and mount the old location to the new

/home/cpanel /usr/local/cpanel none rw,bind 0 0

 

/etc/init.d/cpanel stop
cd /usr/local
rsync -avS cpanel /home/
mv cpanel cpanel_old

mkdir cpanel
mount bind /home/cpanel cpanel

/etc/init.d/cpanel start
grep cpan /etc/mtab >> /etc/fstab

 

I would recommend leaving /usr/local/cpanel_old for about a month or two to ensure everything is working or back it up to a backup drive.