iftop: Installation guide

If you have a server and you wish to get the actual bandwidth usage on real time basis, you may simply install iftop from your server to track the information time by time.

iftop is a good network monitoring tool to check real time network bandwidth usage and CPU usage.

To download iftop,

# cd /usr/src
# wget http://www.ex-parrot.com/~pdw/iftop/download/iftop-0.17.tar.gz

To install iftop,

# cd /usr/src
# tar zxf iftop-0.17.tar.gz
# cd iftop-0.17

# ./configure
# make
# make install

To use iftop, you may simply type in iftop,

iftop

Or specify the network interface,

iftop -i eth0

Howto: Install Apache 2.2.x and PHP 5.3.x on CentOS 5

Assume that you do not want to spend money on your server to have a control panel and having minimal requirement for your website,

1. Install the required packages,

yum install bison flex gcc db4 db4-devel libxml2-devel libpng-devel mysql-devel make

2. Download Apache source (refer the latest one from http://httpd.apache.org/)

wget http://apache.petsads.us//httpd/httpd-2.2.21.tar.gz

3. Download PHP source (refer the latest one from http://www.php.net/)

wget http://my.php.net/get/php-5.3.8.tar.gz/from/us.php.net/mirror

4. Build the Apache,

tar zxvf httpd-2.2.21.tar.gz
cd httpd-2.2.21
./configure --enable-so --enable-rewrite=shared
make
make install
cd ..

5. Build the PHP,

tar zxvf php-5.3.8.tar.gz
cd ../php-5.3.8
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --enable-bcmath \
--enable-ftp --enable-magic-quotes --with-pear --enable-sockets --with-zlib --with-gd
make
make install
cp php.ini-production /usr/local/lib/php.ini
cd ..

6. Now, start the Apache services,

/usr/local/apache2/bin/apachectl start

How to install iotop

iotop is a good tools to to track the I/O load of a server. To install an iotop, you need to fulfill the following requirement.
– Linux kernel >= 2.6.20 with the TASK_DELAY_ACCT CONFIG_TASKSTATS, TASK_IO_ACCOUNTING and CONFIG_VM_EVENT_COUNTERS options on
– Python >= 2.5 (or Python >= 2.4 with the ctypes module)

If you have Linux Kernel up to 2.6.20 and Python 2.6, you may run the following command.

cd /backup;wget http://guichaz.free.fr/iotop/files/iotop-0.4.3.tar.gz;tar -zxf iotop-0.4.3.tar.gz;cd iotop-0.4.3;./setup.py install;iotop;

If you didn’t fulfilled these requirement, run the following command,

cd /backup;wget http://downloads.sourceforge.net/project/ctypes/ctypes/1.0.2/ctypes-1.0.2.tar.gz;wget http://guichaz.free.fr/iotop/files/iotop-0.4.3.tar.gz;tar -zxf ctypes-1.0.2.tar.gz;tar -zxf iotop-0.4.3.tar.gz;cd ctypes-1.0.2;./setup.py install;cd ../iotop-0.4.3;./setup.py install;iotop;

Install Image Magick on cPanel server

In current cPanel 11.28.x, you may install Image Magick easily by running the script as below,
/scripts/installimagemagick

What if the installation not able to done? You may use the manual way from cPanel script to get it done.
/scripts/installrpm ImageMagick
/scripts/installrpm ImageMagick-devel
wget layer1.cpanel.net/magick.tar.gz
tar zxvf magick.tar.gz
cd magick
sh install

 

Ten Linux Command that you should know

If you are the Linux server administrator, you should know some major command from Linux.

Today, Mick Genie will show you some command that normally used by the Administrator.

1. wget – Retrieving a Software Package.
– wget is the most command use command to retrieve or get a software package or download tool from Linux Command, you can easily get the package downloaded through wget command.

Eg. wget http://www.mickgenie.com/mickgenie.tar.gz

2. top – Monitoring Server Processes.
– With a top command, you could easily understand the server processes and it’s performance as it collected almost all of the information from the server processes.

3. tail – Reviewing Log File.
– When you checking the server log, you might want to get the real-time log information instead of open all of the file as sometimes it is large enough to and waste your memory and time to open the file. Using tail command could allow you check real-time log information.

Eg. tail -f /var/log/messages

Continue reading Ten Linux Command that you should know