查看系统版本
[root@host ~]# cat /etc/issue
CentOS release 6.5 (Final)
Kernel
on an m
[root@host ~]# cat /proc/version
Linux version 2.6.32-431.el6.x86_64 (mockbuild@c6b8.bsys.dev.centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC) ) #1 SMP Fri Nov 22 03:15:09 UTC 2013
[root@host ~]# uname -a
Linux host 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
修改IP:
[root@host network-scripts]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
BOOTPROTO="static"
DHCP_HOSTNAME="host"
HOSTNAME="host"
HWADDR="94:DE:80:A9:3F:60"
IPV6INIT="yes"
MTU="1500"
NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"
UUID="d5ff3f5d-fadb-4289-92ce-1c382a2f7fb2"
IPADDR="192.168.53.122"
NETMASK="255.255.255.0"
GATEWAY="192.168.53.254"
修改后重启:
[root@host network-scripts]# service network restart
Shutting down interface eth0: [ OK ]
Shutting down loopback interface: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0: Determining if ip address 192.168.53.122 is already in use for device eth0...
[ OK ]