history command with timestamp linux

I always find it easier when my history has a time stamp, you can coorolate a lot of things, like last, start/stops of services, who done it, etc.


This will work for the session, but if you want it saved for every log in add to respective bash_profile:
~/.bash_profile or /root/.bash_profile


Firewall Status: Enabled but Stopped in CSF with cPanel

I kept getting: Firewall Status: Enabled but Stopped in my CSF in cPanel. I am currently running WHM 11.40.1 (build 11) and csf v7.03.

I tried just clicking start, no luck it would just flip back a few minutes later. So I ended up dropping to shell and running

service csf stop
iptables –flush
service csf start

that seemed to work, there must have been a hung iptables rule, or a bad rule that caused CSF to flip to disabled.


how to disable RHN in linux – red hat or centos

What I did to disable it was go to: /etc/sysconfig/rhn

and delete all of the files in it. If you want to re-enabled it after, you can just copy the files back, so you may want to copy them to a location you want to keep them at.


How to get external ip via linux command line

wget -O - -q

you will get a very easy looking readout


root@madhost419 [~]# wget -O - -q
root@madhost419 [~]#

or via curl:



removing the limit of 100 rows in squirrel

Using the squirrel app: I had issues with only seeing 100 rows in a table. I fixed this by going to File -> New Sessions Properties -> Object Tree -> Contents -> limit rows. The default is 100, but you can uncheck it and you should be good.

If not, you can also do the same under New Sessions Properties -> SQL -> SQL Results – limit rows. Then uncheck it and hit OK.

That worked for me!


Could not open external command file for reading via open(): (13) -> Permission denied in nagios v4.01

I ended up getting this in my nagios.log, the fix was to change the permissions on the rw file!

chmod 777 /usr/local/nagios/var/rw/nagios.cmd


Directory index forbidden by Options directive: /var/www/html/

I was receiving this error in my nagios apache log:

Directory index forbidden by Options directive: /var/www/html/

to fix this, I just did touch index.html to /var/www/html It creates a file in the directory that is empty. I found this safer then turning on indexes for my nagios install.


internal server error with CSF (Config Server Firewall) in cPanel after upgrade in cPanel

So I was receiving this error after cPanel upgraded:

Internal Server Error


No response from subprocess (/usr/local/cpanel/whostmgr/docroot/cgi/addon_csf.cgi): subprocess exited with status 2


This did not fix it:


/usr/sbin/csf -x
/scripts/perlinstaller --force URI
/usr/sbin/csf -e
/usr/sbin/csf -u

If that doesn’t work this will:


curl -s | perl




How to move files that are older then x days in linux

I found this useful:
sudo find ./* -mtime +2 -exec mv {} /hosting/dropbox/ops/user/client/ \;
./* is the current directory, including all files, but you could use full path.
mtime +2 is 2 days old
mv is the command being executed
and after the brackets is the directory the files are moving to

Installing ImageMagick/Imagick on a cPanel Server

I was having issues with my Zen install not being able to handle large images, so I read around and decided to move image cache’ing over to ImageMagick, instead of the GD library. This is what you need to do to install/enble ImageMagick on your cPanel server :

You’ll need to be logged in as root on your VPS/Server :

1. Log into your server as root
2. Create a new directory as below :
mkdir /home/cpimins
3. cd /home/cpimins
4. wget
5. tar zxvf magick.tar.gz
6. cd magick
7. /scripts/installrpm ImageMagick
8. /scripts/installrpm ImageMagick-devel
9. sh ./install

Now we need to get the module for PHP installed :

Log into WHM >> Software >> Module Installers >> PHP Pecl and install imagick to get it binding to PHP properly.

After you do that, restart HTTPD/Apache service and you’re golden!

known issue with transferred domains :

If you do not see this in your php.ini file, or it not functioning properly, then you should go to the directory of the issue’d domain example : /home/domainuser/ and rename php.ini to php.ini.bak