需要修改的文件常有
/etc/sysconfig/network /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/resolv.conf /etc/hosts /etc/sysconfig/network 这里主要是指定了网关 NETWORKING=yes NETWORKING_IPV6=no GATEWAY=192.168.1.1 HOSTNAME=localhost.localdomain /etc/sysconfig/network-scripts/ifcfg-eth0 这里主要指定IP获得方式(static),ip地址,子网掩码,网络类型 # Broadcom Corporation NetXtreme BCM5721 Gigabit Ethernet PCI Express DEVICE=eth0 BOOTPROTO=static IPADDR=192.168.1.21 NETMASK=255.255.255.0 TYPE=Ethernet
GATEWAY=192.168.1.1
HWADDR=XX:XX:XX:XX:XX:XX ONBOOT=yes /etc/resolv.conf 指定DNS search localdomain nameserver 192.168.1.1
/etc/hosts
(责任编辑:IT)没设置,是用来定义主机名的。 |