一.CentOS 7.X 关闭SELinux 1.查看 getenforce permissive 或者 enforcing模式 2.临时设置 setenforce 1 成为permissive模式 setenforce 0 成为enforcing模式 3.永久设置 vi /etc/selinux/config 将SELINUX=enforcing改为SELINUX=disabled 设置后需要重启才能生效 二.Centos 7防火墙设置 1.查看 systemctl status firewa…
如果你的系统上没有安装使用命令安装 #yum install firewalld  //安装firewalld 防火墙 开启服务 # systemctl start firewalld.service 关闭防火墙 # systemctl stop firewalld.service 开机自动启动 # systemctl enable firewalld.service 关闭开机制动启动 # systemctl disable firewalld.service 查看状态 #systemctl s…
1.查看firewall服务状态 systemctl status firewalld 2.查看firewall的状态 firewall-cmd --state 3.开启.重启.关闭.firewalld.service服务 # 开启 service firewalld start # 重启 service firewalld restart # 关闭 service firewalld stop 4.查看防火墙规则 firewall-cmd --list-all 5.查询.开放.关闭端口 # 查…
添加80端口  重启后永久生效 firewall-cmd --zone=public --add-port=80/tcp --permanent   查看防火墙状态 systemctl status firewalld.service 启动防火墙 systemctl start firewalld.service 关闭防火墙 systemctl stop firewalld.service 重启防火墙 systemctl restart firewalld.service 禁用防火墙 . 禁止防…
壹  安装Linux系统后调优及安全设置: 1 关闭SELinux功能: [root@localhost data]# sed 's#SELINUX=enforcing#SELINUX=disabled#g' /etc/selinux/config  (先用sed命令修改输出内容,再加-i修改文件内容,生产环境中也是要这样操作的) # This file controls the state of SELinux on the system.# SELINUX= can take one of…
桥接模式,给一台物理机,有自己独立的IP. boot分区,引导分区,系统启动,内核文件. swap分区,内存扩展分区.1.5或2倍.内存不够的时候,会写入其中.正常给8G或者16G就够了.不需要非要1.5或2倍. / 根.所有文件的根. 腾讯课堂毕业证颁发的证书,跟大学毕业证一样是所有企业都认可的. 知识面,决定你有没有思路.当你一切方法都解决不了问题的时候,从内核出发,一定能解决问题. 一个月拿个4,5千,确实不应该是一个男人拿的薪资.--MK Ctrl+L 清屏 nmtui 管理网卡(确保是…
在虚拟机里面开启多个服务,对应多个端口,在防火墙开启的情况下,就要对外开放端口,这样客户端才能正常访问,但比较繁琐,关闭更直接点. 防火墙 临时关闭防火墙 systemctl stop firewalld 永久防火墙开机自关闭 systemctl disable firewalld 临时打开防火墙 systemctl start firewalld 防火墙开机启动 systemctl enable firewalld 查看防火墙状态 systemctl status firewalld SELi…
关闭SELINUXvi /etc/selinux/config#SELINUX=enforcing #注释掉#SELINUXTYPE=targeted #注释掉SELINUX=disabled #增加:wq! #保存退出setenforce 0 #使配置立即生效…
关闭SELinux的两种方法 1 永久方法 – 需要重启服务器 修改/etc/selinux/config文件中设置SELINUX=disabled ,然后重启服务器. 2 临时方法 – 设置系统参数 使用命令setenforce 0 附:setenforce 1 设置SELinux 成为enforcing模式setenforce 0 设置SELinux 成为permissive模式 谢谢! Centos7 关闭防火墙 CentOS 7.0默认使用的是firewall作为防火墙,使用iptabl…
前言 CentOS7 与之前版本在防火墙配置上不同,防火墙从iptables变成了firewalld Centos7默认安装了firewalld,如果没有安装的话,可以使用yum命令进行安装 yum install firewalld firewalld-config Centos7以上的发行版都试自带了firewalld防火墙的,firewalld去带了iptables防火墙.其原因是iptables的防火墙策略是交由内核层面的netfilter网络过滤器来处理的,而firewalld则是交由…