1.vim /etc/sysconfig/network-scripts/ifcfg-eth0
2.IP : 192.168.52.128-254 之间
网关:192.168.52.2
子网掩码:255.255.255.0
-----------------------------
DEVICE=eth0
BOOTPROTO=static
NM_CONTROLLED=yes #NetworkManager
ONBOOT=yes
IPV6INIT=yes
TYPE=Ethernet
IPADDR=192.168.52.129
NETMASK=255.255.255.0
GATEWAY=192.168.52.2
DNS1=192.168.52.2
配置完后要 service network start
配置端口号 vim /etc/sysconfig/iptables
配置端口号后 service iptables restart