Adding an IP address to a CentOS server is very easy.
- Go to the network configuration directory /etc/sysconfig/network-scripts
- Create a file with the name ifcfg-eth0:1 (This file increments, so if you already have several IP addresses you need to add the next increment, such as ifcfg-eth0:3 for the 4th IP)
- Paste the following contents into the file:
BOOTPROTO=static
IPADDR=YOUR_NEW_IP_HERE
ONBOOT=yes
- In order for the IP change to effect, you can either reboot your server or you can run the following command: