how to optimize size of /usr/local/cpanel

sharmaine001

Well-Known Member
Jun 23, 2006
143
0
166
I have a pretty low /usr partition size and i cannot resize since i dont have LVM. Is there a way to optimize /usr/local/cpanel so it wont take so much space? Currently its roughly 1.7 GB
 

yashraj

Member
Nov 16, 2008
20
0
51
United states
Hi,

You can compress your logs files that are located in /usr partition .i.e cPanel logs, various apache logs. You will have to check logs file regularly and will have to clean up logs.
 

madaboutlinux

Well-Known Member
Jan 24, 2005
1,051
2
168
Earth
I have a pretty low /usr partition size and i cannot resize since i dont have LVM. Is there a way to optimize /usr/local/cpanel so it wont take so much space? Currently its roughly 1.7 GB
What is the total size of your /usr partition? Since it's not possible to resize the partition, you can move the log directories to another partition say /home and create a symlink.

The log directories you can move to /home directory and save space on /usr partition are:

/usr/local/apache/domlogs
/usr/local/apache/logs
For example, create a directory under /home and set a symlink

mkdir /home/apache/
mv /usr/local/apache/domlogs /home/apache/
ln -s /home/apache/domlogs /usr/local/apache/domlogs
You can also remove the following directories under /usr/local/

apache.backup
apache.backup_archive
cpanel.backup_archive