标签:linu img linux hosts 静态 prot boot 动态 地址
1.修改主机名
vi /etc/sysconfig/network
2.修改ip地址
vi /etc/sysconfig/network-scripts/ifcfg-eth0
ONBOOT=yes 指明在系统启动时是否激活网卡,只有在激活状态的网卡才能去连接网络,进行网络通讯
BOOTPROTO=static (static静态IP dhcp动态IP none不指定)
配置完重启网卡生效:service network restart
3.修改ip地址和主机名的映射关系
vi /etc/hosts
4.关闭iptables并设置其开机启动/不启动
service iptables stop
chkconfig iptables on
chkconfig iptables off
标签:linu img linux hosts 静态 prot boot 动态 地址
原文地址:http://www.cnblogs.com/ahu-lichang/p/6718040.html