Adding a second IP address to Linux Server

If say you want to run apache and tomcat both on port 80 (default), you can create a seperate IP address on an internal network.

For RedHat Distros

$ cd /etc/sysconfig/network-scripts/
$ more ifcfg-eth0:0

DEVICE=”eth0:0″
BOOTPROTO=”none”
ONBOOT=”yes”
IPADDR=”XXX.XXX.XXX.XXX”
NETMASK=”255.255.254.0″
BROADCAST=”XXX.XXX.XXX.255″

$ ifup-aliases eth0