Oracle Linux R5
configuration: IP, subnet mask
Vi/etc/sysconfig/network-scripts/ifcfg-eth0
Device=eth0//NIC Interface nameBootproto=none//(none | static (Specify address manually) | DHCP (dynamic acquisition) | BOOTP)Onboot=yes//Whether the system is loaded at startupHwaddr=00:0c:29:5e:90:12//Network card Physical AddressType=ethernet//network card typeUserctl=no//Whether to allow normal users to enable and disable network devicesIpv6init=no Peerdns=yes//If you use DHCP to get the address, the server assigns an IP address, whether to modify the default point of Server DNS (the default is YES)netmask=255.255.255.0//Subnet maskipaddr=192.168.1.118//IP Addressgateway=192.168.1.1//gateway address (routed IP address) Save and exit/sbin/service Network restart//restart networking to make the configured IP address effective
Configuration: Gatewayvi/etc/sysconfig/networkNetworking=yesnetworking_ipv6=no Hostname=huayan_linux//Host namegateway=192.168.1.1//Gateway
Configuration: DNSvi/etc/resolv.conf nameserver 192.168.1.1nameserver 192.168.0.1search local domain
Immediate effect ConfigurationModify Ip:ifconfig eth0 192.168.0.20 netmask 255.255.255.0
To Modify the gateway:Route add default GW 192.168.0.254Modify hostname:Hostname Webcenter