Centos防火墙&SELINUX关闭及yum源配置

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Centos防火墙&SELINUX关闭及yum源配置相关的知识,希望对你有一定的参考价值。

Centos防火墙及SELINUX关闭

Centos6.x

/etc/init.d/iptables stop
chkconfig iptables off
sed -i ‘s/SELINUX=enforcing/SELINUX=disabled/‘ /etc/selinux/config
grep SELINUX=disabled /etc/selinux/config
setenforce 0

Centos7.x

systemctl stop firewalld.service
systemctl disable firewalld.service
sed -i ‘s/SELINUX=enforcing/SELINUX=disabled/‘ /etc/selinux/config
grep SELINUX=disabled /etc/selinux/config
setenforce 0

Centos配置yum源

centos6.x

cd /etc/yum.repos.d/
cp CentOS-Base.repo CentOS-Base.repo.$(date +%F)
wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
eple源
yum -y install epel-release

centos7.x

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
cd /etc/yum.repos.d/
wget http://mirrors.163.com/.help/CentOS7-Base-163.repo
yum clean all
yum makecache

eple源

 yum -y install epel-release

以上是关于Centos防火墙&SELINUX关闭及yum源配置的主要内容,如果未能解决你的问题,请参考以下文章

centos6.6关闭防火墙和selinux

centos7——关闭防火墙和SElinux

CentOS 7下JumpServer安装及配置

CentOS 7下JumpServer安装及配置

Gitlab安装汉化及使用

Centos6.5搭建LAMP