Login

Setup /tmp to auto clean using tmpwatch

q) my /tmp is full, how do i delete the content

a) open SSH to your server, if SSH will not connect due to disk space full in tmp, reboot your server in cloud server manager then try again.
Once connected run the following command

yum install tmpwatch -y

once tmpwatch is installed run command

/usr/sbin/tmpwatch -am 12 /tmp

this will delete all files over 12 hours old

next, we will configure your server to do this automatically.

from SSH type:  crontab -e

go to the very bottom and paste

0 4 * * * /usr/sbin/tmpwatch -am 12 /tmp

then press Control+X (on PC) or Command+x (on Mac) you will get confirmation do you want to save. Type Y for yes, and press enter

Recent Posts
How to install CPanel

Before following this tutorial, please make sure that you have followed the "build a linux...

How to configure a WHM/cPanel backup on new disk

First log into your server via an SSH client such as PuTTy, and run these commands: mkdir...

How do I enable PHPMail()

We disable PHPMail() function on all Linux VMs, this is often something that is abused and can...

Forwarding to gmail/hotmail/yahoo blocked by cpanel

Forwarding to free mail providers is prveneted by cpanel to protect its IP from being blacklisted...