Archive for 'Linux Howto'

This short article is to give an idea on how you can install latest version of wordpress on your hosting account.

You need to have,

Filezilla click here to get it ( or any other FTP client )
A cPanel hosting account. Get it here

Step 1

Download latest wordpress version. Click here to get it.


Uncompress file.


Use Filezilla to upload the uncompressed files to the desired hosting account location. You can upload to public_html or any other location inside.

Uploading with filezilla

Uploading with filezilla








Step 4

Create database and users with your cPanel, Please see this article,

Step 5

Access the url were wordpress files are uploaded. You will get a screen as below . Click on create a configuration file.

Wordpress Installation





Step 6

Give the database and user details you have created with cPanel on the below stepWordPress Installation 2. Click on submit button.







On next screen click on run the install


Wordpress Installation 3




Step 7

Give site name, user name password and your email address on the next screen and click Install

Wordpress Installation 4








All set login and go !!!

SSH is often used to login from one system to another without requiring passwords.

The syntax of the ssh-keygen file is as follows:

ssh-keygen -b bits – Specifies the number of bits in the key to create. The minimum bit length is 512 bits and the default length is 2048 bits.
ssh-keygen -p – Requests changing the passphrase of a private key file instead of creating a new private key.
ssh-keygen -t – Specifies the type of key to create.
ssh-keygen -q – Quiets ssh-keygen. It is used by the /etc/rc file while creating a new key.
ssh-keygen -N – Provides a new Passphrase.

The SSH-keygen tool generate a secret key.

Step :

1) Login into a local machine.

2) Take a Terminal (Application/Accessories/Terminal)

3)  # ssh-keygen

When we enter “ssh-keygen” in terminal of local machine we get the options like below

The default path of generating the keygen is in /home/user/.ssh/id_rsa.Then press “Enter”.

4)Enter a alphanumeric passphrase you will enter will be used for encrypting your private key, if not press “Enter”.
If you want to create a passphrase type your passphrase once again to confirm it.

After the completion of this the private key is generated.The private key will be saved in .ssh/id_rsa. This file is read-only and only for you. No one else must see the content of that file, as it is used to decrypt all correspondence encrypted with the public key. The public key is save in .ssh/

5)Then public key content of local machine is then copied in file .ssh/authorized_keys of the system you wish to SSH to without being prompted for a password.

scp .ssh/ user@remote:~/.ssh/authorized_keys

Install and configure CSF/LFD

CSF is one of the popular firewall which is based on iptables.  CSF can be used and managed with UI of control panels like cPanel, DirectAdmin and Webmin. Here we can see how we can install and do basic configuration of CSF ( ConfigServer Security & Firewall ) & LFD ( Login Failure Daemon )  on a linux server.

How to install ?

For downloading all the csf package.

# cd /usr/local/src/
# wget

Uncompress the packages.

# tar -xvzf csf.tgz

Running the installation script

# cd csf
# sh


a) Main part of configuration is opening up the needed ports

below command will give you an idea of  current listening ports and processes in the server

# netstat -pln
# ps aux

find out the ports of services that you want to open and specific them on file /etc/csf/csf.conf with directives

TCP_IN  —> incoming TCP ports
TCP_OUT —> outgoing TCP ports
UDP_IN —> incoming UDP ports
UDP_OUT —> outgoing UDP ports

b) Read through the configuration, if you feel everything is okay you can disable testing by setting the first directive on configuration /etc/csf/csf.conf as below


restart csf with

# csf -r

Control Panels
CSF currently has UI for cPanel, DirectAdmin and Webmin. No specific installation changes required for cPanel and DirectAdmin, once CSF is installed you can view and manage it with cPanel/DA. You can find webmin CSF module installation instructions here.


On cPanel servers:
cd /etc/csf

On DirectAdmin servers:
cd /etc/csf

On generic linux servers:
cd /etc/csf

Awstats Installation

Awstats is an advanced graphical statistics software that can be used to analyze the webserver logs. Here we can see how we can install awstats on a linux server with Apache.


You can get the latest awstats from here. Login to server as root execute the below commands

# cd  /usr/local/
# wget
# tar -zxvf awstats-7.0.tar.gz
# mv /usr/local/awstats-7.0 /usr/local/awstats
# cd /usr/local/awstats/tools/
# perl

The above script will ask few questions, detect/modify your apache configuration and will generate an awstats configuration file for the site you specifies.


Awstats site configuration file path will be :  /etc/awstats/
Name Format of configuration file :

Open the configuration file with a desired text editor and check, verify and modify the below entries

LogFile —> Log file directive should mention the correct path of the site access log file
SiteDomain —> this directive should mention your domain name

Updating stats

You can update stats with the below command
# /usr/local/awstats/wwwroot/cgi-bin/ -update

Add it as a cron to generate the statistics periodically

# crontab -e

0 0 * * * /usr/local/awstats/wwwroot/cgi-bin/ -update >/dev/null 2>&1


To restrict access and to password protect the statistic information add the below lines in your apache configuration

<Files “”>
AuthUserFile /usr/local/awstats/.htpasswd
AuthGroupFile /path/to/.group
AuthName “Restricted Area”
AuthType Basic
require valid-user

You need to create a user and password and copy it to the file /usr/local/awstats/.htpasswd to limit the access. Any htpasswd online generator can be used for this, You can find an example one here

restart Apache

/etc/init.d/httpd restart


Awstats of the domain can be viewed with the url,