Centos6.5
關(guān)閉selinux:
永久有效:
vim /etc/sysconfig/selinux
將文本中的SELINUX=enforcing
,改為SELINUX=disabled
。然后重啟網(wǎng)卡
即時(shí)有效:
setenforce 0
查看狀態(tài):getenforce
關(guān)閉防火墻:
永久性生效:
chkconfig iptables off
,然后重啟網(wǎng)卡
即時(shí)生效:
service iptables stop
查看防火墻狀態(tài):
service iptables status
(或者iptables -L
)
檢查防火墻是否開機(jī)自啟:
chkconfig iptables --list
(--list
這是兩個(gè)橫線)
Centos7
關(guān)閉selinux:
永久關(guān)閉:
vim /etc/selinux/config
將文本中的SELINUX=enforcing
概行,改為SELINUX=disabled
。然后重啟網(wǎng)卡
即時(shí)有效:
setenforce 0
關(guān)閉防火墻:
臨時(shí)關(guān)閉:
systemctl stop firewalld
防火墻開機(jī)關(guān)閉:
systemctl disable firewalld
開機(jī)啟動(dòng):
systemctl enable firewalld
查看狀態(tài):
systemctl status firewalld
獲取
firewalld
狀態(tài):firewall-cmd --state
其他命令:
重啟網(wǎng)卡:systemctl restart network
修改主機(jī)名命令:hostnamectl set-hostname master
將hadoop
的安全模式關(guān)了命令:hadoop dfsadmin -safemode leave
首先看是否設(shè)置static
如果設(shè)置了
輸入命令ip addr
查看里邊是否有兩個(gè)ip地址弧岳,如果有
systemctl stop NetworkManagersystemctl
systemctl disable NetworkManagersystemctl
systemctl restart network
然后在查看ip addr
和ifconfig
是否一致