CentOS modify IP address First turn off the firewall: service iptables stop# ifconfig eth0 192.168.1.80 This will change the IP address to 192.168.1.80 (if you can't find the network, then You may need to change the gateway and DNS, as mentioned later, but when you restart the system or network card, it will change back to the original address. This modification only applies to temporary IP changes. To make permanent changes, modify the /etc/sysconfig/network-scripts/ifcfg-eth0 file. The main contents of this file are as follows (the items that are not in your file, you can add them manually):
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0 #Describe the device alias corresponding to the NIC BOOTPROTO=static #Set the NIC to get For the ip address mode, the option can be static, dhcp or bootpBROADCAST=192.168.1.255 # corresponding subnet broadcast address HWADDR=00:07:E9:05:E8:B4 #corresponding network card physical address IPADDR=12.168.1.80 # This field is required only when the network card is set to static. NETMASK=255.255.255.0 #Network mask corresponding to the network card NETWORK=192.168.1.0 #Network address corresponding to the network card, that is, the network segment ONBOOT=yes # Whether to set when the system starts This network interface, set to yes, activates this device when the system starts.
CentOS Modify Gateway
# route add default gw 192.168.1.1 dev eth0
This will put the gateway Modified to 192.168.1.1, this modification is only temporary, when you restart the system or network card Or changes back to the original gateway. To make permanent changes, modify the /etc/sysconfig/network file. The main contents of this file are as follows (the items that are not in your file, you can add them manually):
# vi /etc/sysconfig/network
NETWORKING=yes # Indicates whether the system uses the network, generally set to yes. If set to no, the network cannot be used. HOSTNAME=centos #Set the host name of this machine. The host name set here should correspond to the host name set in /etc/hosts. GATEWAY=192.168.1.1 #Set the IP address of the gateway connected to this machine.
The above file is modified to restart the network card will take effect:
# service network restart
CentOS modify DNS
The above are all modified After that, when you ping a domain name, you can't get it, but the IP address corresponding to the ping is the same, then we need to modify the DNS. Modify the DNS by modifying the /etc/resolv.conf file:
# vi /etc/resolv.conf
nameserver 8.8.8.8 #googledomain nameserver 8.8.4.4 #googlenameserver
Linux operation is as simple as that. With all the settings above, the system should be available online
When using a computer, it often interacts with some encrypted documents, such as Zip, Rar, and even
In Windows, Sogou Pinyin input method has a large number of users because of its large vocabulary an
According to foreign media reports, Linux does not seem to be fully loved by people. Operating syste
“ A real programmer does not need an IDE. They all use a text editor with a plugin to write c
Linux source code installation apache+mysql+php5 and several forums installed
P2v migration linux server under xenserver
Determine whether the server is shut down normally under Linux environment
VMware Workstation Installs Linux System
Linux file name garbled conversion basic tutorial
Linux two simple alternatives to "peanut shell" software
The bridge implementation of the linux protocol stack
CentOS Linux uses logrotate to split management logs
How to view source file information in ShedWorx Music Converter
Want to protect privacy, Win 7 makes U disk encryption easier
Win 7 new tool reveals: mobile data protection can be achieved
How to cancel desktop icon color shadow
Vista Explorer to play Microsoft free 25G network hard drive
Win10 official version does not receive the 10586 version of the update push how to do?
Win10 preview version update download speed is slow how to solve what methods
Windows 10 official release conference live broadcast live July 29th 19:00 start
How to prevent users from opening the win7 control panel interface
IDC predicts that global share of Win10 Mobile will grow to 3.6% in 2019