亲测有效:

[root@localhost ~]# service NetworkManager stop
Stopping NetworkManager daemon: [ OK ]
[root@localhost ~]# chkconfig NetworkManager off
[root@localhost ~]# vim /etc/resolv.conf
[root@localhost ~]# vim /etc/sysconfig/network-scripts/ifcfg-eth0​
[root@localhost ~]# cd /etc/sysconfig/network-scripts/
[root@localhost network-scripts]# vim ifcfg-eth0
修改内容:

DEVICE="eth0"
BOOTPROTO="static"
ONBOOT="yes"
UUID="2daefe1d-f314-4058-b101-c83d0a78071b"
IPADDR=192.168.159.129
NETWORK=255.255.255.0
GATEWAY=192.168.159.254

[root@localhost 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.159.130 is already in use for device eth0...
[ OK ]
[root@localhost network-scripts]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:29:FC:11:1F
inet addr:192.168.159.130 Bcast:192.168.159.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fefc:111f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:293 errors:0 dropped:0 overruns:0 frame:0
TX packets:58 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:20704 (20.2 KiB) TX bytes:5344 (5.2 KiB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:12 errors:0 dropped:0 overruns:0 frame:0
TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:720 (720.0 b) TX bytes:720 (720.0 b)

[root@localhost network-scripts]#