Adding additional IP’s to a Linux Server.

Adding IP’s to your linux machine can be a hard task at first but it can be broken down to these few steps.

To implement a temporary solution you can execute the command

Command:  ifconfig eth0:1 IP.ADDRESS.HERE. (Note IP.ADDRESS.HERE is the  additional IP you want linked to your machine.)

Note that:

Main IP: eth0:0

Secondary IP: eth0:1

Third IP: eth0:2

Fourth IP: eth0:3

Further note that computers start counting at 0 being a element number and up. Meaning 1 = 0 2=1 3=2 etc.

To make these changes Permit we will have to configuration the networking files to reflect these actions.

Starting out make sure that the ifcfg-eth0 file does not consist of any gateway=parameter. If it does remove this statement. The root to find this file is as following: etc/sysconfig/network-scripts/ifcfg-eth0

Next, copy the file ifcfg-eth0 and name it ifcfg-eth0:1

Command: cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0:1

Once you have copied the file edit the ifcfg-eth0:1 and change the statement Device=eth0 to device eth0:1 and change the IPAddr= to the addon IP you want, that is assigned to your machine.  Start the Secondary interface with: ifup eth0:1


Repeat this step to add as many IP addresses as you desire.



Installing LAMP on Centos

Centos is one of the most common Linux OS.


I will be showing you how to install Apache, MySQL ,PHPMyAdmin and PHP.

Apache is the a software that responses to enquirys and replies. This means this is the script that displays your website.


To install Apache:

yum install httpd httpd-devel

If at the end of the installation the apache is not running you may need to manually start it.

/etc/init.d/httpd start

MySQL is a dynamic data stored in a table format. each table, column and rows can be called to display or store information.


To install MySQL Database Server.

yum install mysql mysql-server mysql-devel


This will install MySQL and the Username and password will be on the lines of the default.


To set the password to a new installed MySQL:

mysqladmin -u root password NEWPASSWORD


Install PHP MyAdmin

phpMyAdmin is a web control panel that allows you to manage your SQL databases and users.

yum install phpmyadmin




Note: pay close attention to the installation process due to a error can easily make this installation very complicated. When it requests username and password these are are the details of the root MySQL which you set earlier.

Installing PHP:

This command installs everything you need for PHP:

yum install php php-mysql php-common php-gd php-mbstring php-mcrypt php-devel php-xml


This completes the entire installation of what is computationally stated to be LAMP.


Your web server is now ready and running.






One Command LAMP Installation Ubuntu

To set-up a simple web server with all the basic settings you can install Linux Apache MySQL PHP (LAMP) Script to install them all at once. Installing LAMP on Ubuntu is the easiest out of them all with the one command installation.

In the case this package is not installed:

sudo apt-get install tasksel


sudo tasksel install lamp-server


sudo  tasksel


Configuring your Package.


Choose Software to Install:

  • DNS Server
  • Edubuntu Server
  • LAMP Server
  • Edubuntu Desktop
  • Kubuntu Desktop
  • Ubuntu Desktop
  • Xubuntu Desktop
  • Edubuntu Live CD
  • Kubuntu Live CD
  • Ubuntu Live CD
  • Xubuntu Live CD


Select LAMP Server and follow the on screen instructions.


Changing the default root password to MySQL. (Note Replace NEWPASS to a your own password you want).

mysqladmin -u root password NEWPASS

Please take note of this password, you will need it for installing phpmyadmin.


Install PHPMyAdmin:

sudo apt-get install phpmyadmin


(Be careful that you enter all details correctly as it may cause problems to resolve the issue. The way to fix it may result in removing, pruning and starting again.)

Once completed you should be able to login as MySQL root at http://YourIP/phpmyadmin once completed.



Once you have completed all of the above steps you have successfully installed Apache, MySQL, PHP and PHPMyAdmin.




Installing cPanel on Centos

How to install cPanel 11 in a short few commands.

cPanel requires more then 512MB of RAM to install and run correctly. Be sure that you have this system requirement before you start.

First go to the home directory:

cd /home

Next we will download the latest version of cPanel installation file:


Once it has finished downloading you need to activate the installation:

sh latest

This installation will take up to 30 minutes – 2 hours to install.

Once the installation was finished you have installed cPanel 11 and you can now login to WHM to configure your new server.

You can login as root from https://yourServerIP:2087