Recently the company has a new project, need to be deployed on the Linux system prior to the Linux system also have a certain understanding, feel no problem. In order to improve the performance of the server, the installation is the CentOS mini-version (minimized without desktop).
After the system successfully installed, you need to set the fixed IP, because I have been operating before, so I do not want to follow the process set
Vi/etc/sysconfig/network-scripts/ifcfg-etho
and change Onboot=yes.
On the command line input: ifconfig eth0 192.178.0.2 netmask 255.255.255.0
Restart Services: Service network restart
And then try, you can ping, I thought this can be done, the next day when using the CRT connection server, there is a
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/72/D4/wKiom1XuRQSR1BElAABZUihCNWg747.jpg "title=" Connection closed "alt=" wkiom1xurqsr1belaabzuihcnwg747.jpg "/> tried a bit, is can ping, instant very depressed, in the Internet also read some information, most suddenly remembered, IP is automatically obtained by DHCP and requires a fixed IP to be set for the server, and the previously used method does not take effect.
# vi/etc/sysconfig/network-scripts/ifcfg-eth0device=eth0bootproto=staticipaddr=192.168.0.2netmask= 255.255.0.0gateway=192.168.0.1onboot=yestype=ethernet Restart the configuration file to make it effective #/etc/init.d/network restartshutting down Interface eth0: [OK]shutting down loopback interface: [OK]]setting network parameters: [OK]bringing up loopback Inter Face: [OK]bringing up interface eth0: [OK]
At this point, the problem solved successfully.
Linux Set fixed IP