1、配置IP地址

#vim /etc/sysconfig/network-scripts/ifcfg-eth0 


BOOTPROTO=static

ONBOOT=yes

IPADDR=192.168.1.2

NETMASK=255.255.255.0

GATEWAY=192.168.1.254


#vim /etc/udev/rules.d/70-persistent-net.rules 


2、配置主机名:

# vim /etc/sysconfig/network

NETWORKING=yes

HOSTNAME=localhost.localdomain


#vim /etc/hosts 

192.168.1.2 hostname


3、关闭防火墙:

(1)关闭开机启动

开启:chkconfig iptables on

关闭:chkconfig iptables off


(2)关闭服务

开启:service iptables start

关闭:service iptables stop