1.首先保證windows與linux能雙向ping通
若是ping不通,關閉windows和linux防火牆
2.若windows端提示多個連接
cmd刪除所有連接
net use * /del /y
3.關閉SELinux
臨時生效:
setenforce 0 (臨時生效可以直接用setenforce 0 )
1 啓用
0 告警,不啓用
永久生效:
cp /etc/selinux/config /etc/selinux/config.bak
cat /etc/selinux/config
# 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.
# 更改setlinux級別
sed -i 's/SELINUX=enforcing/\SELINUX=permissive/' /etc/selinux/config
==> vim /etc/selinux/config/ --> SELINUX=enforcing[效果同上]
# SELINUX參數enforcing代表打開,disabled代表關閉
# 查看selinux狀態:
getenforce