How to increase /tmp partition size
cPanel recommend that you use a separate partition for /tmp that is mounted with nosetuid. Nosetuid will force a process to run with the privileges of it’s executor. You may also wish to mount /tmp with noexec after installing cPanel.
1. Stop cpanel, apache, mysql services and other webserver service.
2. Try to Umount /tmp and /var/tmp
umount -l /tmp
umount -l /var/tmp
3. Move /usr/tmpDSK file to another location (just in case you’ll need to mount it somewhere else to preserve data):
mv /usr/tmpDSK /usr/tmpDSK_back
4. Modify /scripts/securetmp to set tmpdsksize. For example 2G size
$tmpdsksize = 2048000
6. Once completed, restart all the service.
You can increse /tmp partition size directly without scripts.
Stop all the service.
# /etc/init.d/mysql stop # cp -af /var/tmp /var/tmp.bak # umount /var/tmp # umount /tmp # mv /usr/tmpDSK /usr/tmpDSK_bak Increase /tmp partition size to 2G # dd if=/dev/zero of=/usr/tmpDSK bs=1024 count=2097195 # mkfs /usr/tmpDSK # tune2fs -j /usr/tmpDSK # mount -t ext3 -o nosuid,noexec,loop /usr/tmpDSK /tmp # mount -o bind,noexec,nosuid /tmp /var/tmp # cp -a /var/tmp.bak/* /tmp/ # rm -rf /var/tmp.bak # chmod 1777 /tmp
Start all the service.