2010
04.28

Download libssh2 from http://www.libssh2.org/snapshots/lib…0091001.tar.gz

tar -zxvf libssh.x.x.tar.gz

./configure

make all install

Download the pecl-ssh2 installer from http://pecl.php.net/get/ssh2-0.10.tgz

tar -zxvf ssh2-0.11.0.tgz
cd ssh2-0.11.0
phpize

./configure –with-ssh2

make

Copy ssh2.so to your extension_dir specified in php.ini.

grep extension_dir /usr/local/Zend/etc/php.ini
cp modules/ssh2.so /path/to/extension/dir

Then add the extension to your php.ini:
extension=ssh2.so

Restart httpd, and you are all set!

2010
04.08

You may want to block countries in the firewall by using Country Codes in CSF configuration. You canuse the country code in the configuration variable CC_DENY of CSF. You can refer the following help link, http://www.configserver.com/cp/csfdemo/config.html.

You can get the Country Codes from the url, http://www.countryipblocks.net.

2010
04.06

When changes are made to the httpd.conf on a cPanel server, people don’t update the distiller file normally. So when apache is recompiled, the changes are lost. To avoid this, please be sure that you save the changes to the distiller file by running the following;

/usr/local/cpanel/bin/apache_conf_distiller –update –main

This will confirm that the changes were saved and will save the changes to the main distiller config, saving them for the future apache recompilations.

2010
04.06

You can generate good random passwords using openssl.

$ openssl rand -base64 6
KQC9nEIA

This is an example used to generate a 16 character password

$ openssl rand -base64 12
EPMcEflTQpR0gBIW

2010
04.02

You can easily install Imagemagick on a cPanel by using cPanel script.

/scripts/installimagemagick will do it for you.

HOLD ON, this is not it yet!!!! We need to get it into PHP rite?

The new WHM has utility to complete the task.

Log into WHM >> Software >> Module Installers >> PHP Pecl and install imagick to get the whole thing binding into PHP.

That should be it, if by any chance you got a problem with a 64 bit OS and WHM can not find imagick then install it manually, by following the steps below

Check if ImageMagick-devel is installed, if not install it using yum.

Then you need to download the Imagick PHP extensions, located here: http://pecl.php.net/package/imagick

cd /usr/src/
wget http://pecl.php.net/get/imagick-x.x.x.tar.gz
tar -zxvf imagick-x.x.x.tar.gz
cd imagick-x.x.x
phpize
./configure
make
make install

Now go back into WHM and try to activate imagick again. That is it :) You are all done.

2010
04.01

Need to know the exact size of your directories?
Try this,

du -cksh *

It will give a faster output than the normal “du -sch” command.