Sunday, 25 August 2013

Change the default IP address of a CentOS 6 dedicated server

Change the default IP address of a CentOS 6 dedicated server

I have a dedicated box running CentOS 6. I'd like to change the default IP
address, I googled a lot and I found this suggestion:
(1) Run these two commands via SSH:
sudo -n ifconfig eth0 down
sudo -n ifconfig eth0 up NEW_IP
(2) Change Apache's ServerName directive to the new IP address in
httpd.conf, ie.
ServerName 111.222.333.44:80
(3) Restart apache
(4) Change any domain pointing to this server/old IP address to point to
the new one.
I'm going to do this on a live server, so I'd like to know if these
instructions are correct before I proceed (I don"t wanna screw things up)



Can someone please confirm (or correct me if I'm wrong) if this is the way
to go?

No comments:

Post a Comment