Linux系列 CentOS6 7檢視和關閉防火牆

2021-10-02 22:07:51 字數 942 閱讀 6855

#檢視防火牆狀態(centos 6)

iptables -s

#檢視防火牆狀態(centos 7)

firewall-cmd --list-all

setenforce 0

vi /etc/selinux/config 將selinux=enforcing改為selinux=disabled

或者sed -i 『s/^selinux=enforcing$/selinux=permissive/』 /etc/selinux/config

centos 7.0預設使用的是firewall作為防火牆

啟動乙個服務: systemctl start firewalld.service

關閉乙個服務: systemctl stop firewalld.service

重啟乙個服務: systemctl restart firewalld.service

顯示乙個服務的狀態: systemctl status firewalld.service

在開機時啟用乙個服務: systemctl enable firewalld.service

在開機時禁用乙個服務: systemctl disable firewalld.service

service iptable status

servcie iptables stop --臨時關閉防火牆

chkconfig iptables off --永久關閉防火牆

CentOS 6 7 配置網路

1.路徑位置 vi etc sysconfig network scripts ifcfg eth0 ifcfg eth0則根據情況進行修改 2.網路配置 device ens33 驅動名稱 hwaddr 00 00 00 00 00 00 mac位址 type ethernet 網絡卡型別 uui...

centos6 7 搭建 redis集群

一,準備工作 二,建立redis使用者 useradd redis passwd redis 輸入密碼 三,安裝 1,建立redis安裝目錄 mkdir p usr local redis chown r redis.redis usr local redis 1,將redis安裝包上傳到 usr ...

CentOS6 7 常用操作命令

centos 安裝py環境 1.安裝wget工具 yum install wget 2.安裝python 2.7.8 wget no check certificate tar zxvf python 2.7.8.tgz cd python 2.7.8 configure prefix usr lo...