1.1修改主机名
vim /etc/sysconfig/network(重启生效)
1.2修改IP
vim /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
BOOTPROTO="static" ###
HWADDR="00:0C:29:BF:45:8B"
IPV6INIT="yes"
NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"
UUID="99339c27-0884-46c0-85d5-2612e5c1f149"
IPADDR="192.168.1.110" ###
NETMASK="255.255.255.0" ###
GATEWAY="192.192.1.1" ###
vim /etc/hosts
192.168.1.110 itcast
1.4关闭防火墙
查看防护墙状态
service iptables status
关闭
service iptables stop
查看防火墙开机启动状态
chkconfig iptables --list
关闭开机启动
chkconfig iptables off
vim /etc/sysconfig/network(重启生效)
1.2修改IP
vim /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
BOOTPROTO="static" ###
HWADDR="00:0C:29:BF:45:8B"
IPV6INIT="yes"
NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"
UUID="99339c27-0884-46c0-85d5-2612e5c1f149"
IPADDR="192.168.1.110" ###
NETMASK="255.255.255.0" ###
GATEWAY="192.192.1.1" ###
DNS1=8.8.8.8
DNS2=8.8.4.4
vim /etc/hosts
192.168.1.110 itcast
1.4关闭防火墙
查看防护墙状态
service iptables status
关闭
service iptables stop
查看防火墙开机启动状态
chkconfig iptables --list
关闭开机启动
chkconfig iptables off