Change Hostname in CentOS

Open the /etc/sysconfig/network file with your favorite text editor. Modify the HOSTNAME= value to match your FQDN host name. # nano /etc/sysconfig/network HOSTNAME=myserver.domain.com Change the host that is associated to your main IP address for your server, this is for internal networking (found at /etc/hosts): nano /etc/hosts 192.xx.xx.xx myserver.domain.com HostnameRead More…

Change the gateway in CentoS

Edit the netowrk file # nano /etc/sysconfig/network You should see this: HOSTNAME=host.domain.com # ============================================================= # Network Script generated by BareMetal # ============================================================= NETWORKING=yes NETWORKING_IPV6=no GATEWAY=216.xx.xx.1 Change the Gateway and save then restart networking # service network restart

Changing the primary IP address of a CentOS Server

ssh to the server. #nano /etc/sysconfig/network-scripts/ifcfg-eth0 You will find… # ============================================================= # Network Interface Script generated by BareMetal # ============================================================= DEVICE=eth0 BOOTPROTO=STATIC ONBOOT=yes IPADDR=216.55.xx.xx NETMASK=255.255.255.0 HWADDR=6C:62:xx:xx:xx:C3 Change this line only to the new IP IPADDR=216.55.xx.xx Note: If you are changing to an IP on a different subnet and need toRead More…