因为之前配置过一次,成功了,当时关闭了iptables,并且设置成了不自动启动,但是忘记了还有一个selinux
关闭linux 防火墙
[root@dga01 ~]# iptables -F
[root@dga01 ~]# service iptables stop
iptables: Flushing firewall rules: [ OK ]
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Unloading modules: [ OK ]
[root@dga01 log]# chkconfig iptables off
关闭selinux 服务
[root@dga01 ~]# setenforce 0
编辑selinux配置文件修改 为SELINUX=disabled
[root@dga01 ~]# vim /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
再次查看linux防火墙与selinux服务
[root@dga01 ~]# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
[root@dga01 log]# getenforce
Permissive