Sometimes we may have to increase the /tmp partition in a cPanel server. cPanel has got an inbuilt script for this and the procedure to do this is as follows:
1) Stop mysql, apache, cpanel, litespeed to prevent using /tmp partition
===
/etc/init.d/mysql stop
/etc/init.d/cpanel stop
/etc/init.d/httpd stop
/etc/init.d/lsws stop
===
Now, move /usr/tmpDSK to a different location(sometimes we may have to prefer this for later)
====
mv /usr/tmpDSK /usr/tmpDSK_back
====
2) Umount /var/tmp and /tmp.
If you find partition busy then do an (lsof | grep /tmp) and kill the process.
Or go a lazy umount as follows:
===
umount -l /tmp
umount -l /var/tmp
====
Modify the following script as below:
===
vi /scripts/securetmp
Look for following line:
----
----
Increase the value to a desired value and re-run the script:
===
/scripts/securetmp
===
This will recreate /tmp (tmpDSK) partition.
After this restart cpanel,apache and mysql.
1) Stop mysql, apache, cpanel, litespeed to prevent using /tmp partition
===
/etc/init.d/mysql stop
/etc/init.d/cpanel stop
/etc/init.d/httpd stop
/etc/init.d/lsws stop
===
Now, move /usr/tmpDSK to a different location(sometimes we may have to prefer this for later)
====
mv /usr/tmpDSK /usr/tmpDSK_back
====
2) Umount /var/tmp and /tmp.
If you find partition busy then do an (lsof | grep /tmp) and kill the process.
Or go a lazy umount as follows:
===
umount -l /tmp
umount -l /var/tmp
====
Modify the following script as below:
===
vi /scripts/securetmp
Look for following line:
----
my $tmpdsksize = 512000; # Must be larger than 250000
----
Increase the value to a desired value and re-run the script:
===
/scripts/securetmp
===
This will recreate /tmp (tmpDSK) partition.
After this restart cpanel,apache and mysql.
No comments:
Post a Comment
Note: only a member of this blog may post a comment.