Words don't say more directly on the steps
1. Use Ifconfig to view the network card name, IP address, subnet mask
2. Configure DNS
Step: vi/etc/resolv.conf write the following content nameserver 192.168.0.1 nameserver 8.8.8.8 nameserver 8.8.4.4
3. Configure the Gateway
Step: Vi/etc/sysconfig/network write the following: Networking=yes
Hostname=localhost.localdomain #HOSTNAME的内容通过cat/etc/hostname View
gateway=192.168.0.1
4. Configure static IP
Steps:
Cd/etc/sysconfig/network-scripts
Vim Ifcfg-ens33
Modify the following to read:
Type=ethernet proxy_method=none browser_only=no bootproto= "static" defroute= "yes" ipv4_ Failure_fatal= "No" ipv6init= "no" ipv6_autoconf= "no" ipv6_defroute= "yes" ipv6_failure_fatal= "no " ipv6_addr_gen_mode=stable-privacy name=" ens33 " uuid=" d536b74f-a67c-43f8-946a-156ab4065899 " device= "Ens33" onboot= "yes" ipaddr= "192.168.1.111" gateway= "192.168.0.1" netmask= "255.255.255.0" dns1= 8.8.8.8 dns2=8.8.4.4
5. Restart Network
Systemctl Restart Network
Configuration complete
Reference Documentation:
Http://www.jb51.net/os/RedHat/189963.html
Linux02:centos7 Configuring static IP