2、DNS配置文件:cat /etc/resolv.conf
主机和IP绑定:cat /etc/hosts
主机名:cat /etc/hostname
3、关闭防火墙并设置开机不启动
centos 7
查看防火墙状态:systemctl status firewalld
关闭:systemctl stop firewalld
开启:systemctl start firewalld
开机自动关闭:systemctl disable firewalld
开机自动启动:systemctl enable firewalld
centos6
关闭防火墙
chkconfig iptables off
开启防火墙
chkconifg iptables on
查看开机是否启动:chkconfig --list|grep network(centos 6 )
chkconfig iptables --list
4、临时和永久关闭Selinux
临时关闭:
getenforce
[root@centos7 ~]# getenforce
Enforcing
setenforce 0
[root@centos7 ~]# setenforce
usage: setenforce [ Enforcing | Permissive | 1 | 0 ]
setenforce:SELinux is disabled
修改配置文件:
vim /etc/selinux/config
centos 网卡重启/防火墙/selinux/hosts-dns
原文:https://blog.51cto.com/13718453/2468397