虚拟机设置主机名,关闭防火墙
1、vim /etc/sysconfig/network
2、NETWORKING=yes HOSTNAME=master
3、:wq
关闭防火墙:
CentOS6.5:
1、永久性生效,重启后不会复原
开启:chkconfig iptables on
关闭:chkconfig iptables off
2、即时生效,重启后复原
开启:service iptables start
关闭:service iptables stop
CentOS7 关闭防火墙
1、停止firewall
systemctl stop firewalld.service
2、禁止firewall开机启动
systemctl disable firewalld.service
临时关闭内核防火墙
setenforce 0
永久关闭内核防火墙
vim /etc/selinux/config -> SELINUX=disabled -> :wq