1.配置文件/etc/hosts(本地主机ip地址映射,可以有多个别名)。/etc/services(端口号与标准服务之间的对应关系)。/etc/work(设置主机名,网关,域名)。HOSTANME=(主机名)(需要重启计算机才有效)GATEWAY=192.168.1.1(网关)/etc/rc.d/workrestart(脚本服务启动)workrestart(同上,是命令执行)
2.和DNS相关/etc/host.conf/etc/nsswitch.conf/etc/resolv.conf(配置dns)
3.网卡配置文件/etc/work-scripts/ifcfg-eth0DEVICE=eth0(哪张网卡)ONBOOT=yesBOOTPROTO=static(静态ip状态设置)BOOTPROTO=dhcp(dhcp获取)IPADDR=192.168.1.8(静态ip地址)NETMASK=255.255.255.0GATEWAY=192.168.1.1(网关)(如果在此设置网关,则上面的无效)MACADDR=00:0C:29:96:38:F8(修改mac地址)(永久有效)/etc/rc.d/workrestart(脚本启动)workrestart(命令启动)
4.IP配置方法及自动获取ipifconfigeth.168.0.10将采用默认子网掩码mask255.255.255.252(手动定义子网掩码)ifconfigeth0up(激活网卡)/etc/work-scripts/ifupeth0(脚本激活网卡)或者ifupeth0(指向/sbin/ifup的符号链接)。注:修改mac地址,用此好像无效,切记。ifconfigeth0down(关闭网卡)/etc/owrk-scripts/h0(脚本关闭网卡)或者h0(指向/sbin/ifdown的符号链接