1.修改主机名
vim /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=itcast01 ###
2.修改IP(改成静态IP)
修改配置文件方式
vim /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
BOOTPROTO="static" ###
HWADDR="00:0C:29:3C:BF:E7"
IPV6INIT="yes"
NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"
UUID="ce22eeca-ecde-4536-8cc2-ef0dc36d4a8c"
IPADDR="192.168.8.118" ###
NETMASK="255.255.255.0" ###
GATEWAY="192.168.8.1" ###
3.修改主机名和IP的映射关系
vim /etc/hosts
192.168.8.118 itcast01
4.关闭防火墙
#查看防火墙状态
service iptables status
#关闭防火墙
service iptables stop
#查看防火墙开机启动状态
chkconfig iptables --list
#关闭防火墙开机启动
chkconfig iptables off
5.重启Linux