标签:boot sys linux sts order add eth0 hosts tab
1.修改主机名
vi /etc/sysconfig/network
NETWORKING=yes HOSTNAME=server1.cn |
2.修改ip地址
vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0 TYPE=Ethernet ONBOOT=yes BOOTPROTO=static IPADDR=192.168.0.101 NETMASK=255.255.255.0 |
service network restart
3.修改ip地址和主机名的映射关系
vi /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 192.168.0.101 server1.cn |
4.关闭iptables并设置其开机启动/不启动
service iptables stop
chkconfig iptables on
chkconfig iptables off
标签:boot sys linux sts order add eth0 hosts tab
原文地址:http://www.cnblogs.com/atomicbomb/p/6664297.html