CentOS更换源和关闭SELinux
CentOS更换源
1、更换CentOS-Base.repo源:
centos 6版本
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
centos 7版本
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
centos 8版本
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-8.repo
2、运行 yum makecache
3、安装epel源
yum -y install epel-release
关闭SELinux
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
sed -i 's/SELINUX=permissive/SELINUX=disabled/g' /etc/selinux/config
最后重启: /sbin/reboot
4、CentOS 7 关闭打开防火墙
1、启动防火墙: systemctl start firewalld
2、禁用防火墙: systemctl stop firewalld
3、设置开机启动: systemctl enable firewalld
4、停止并禁用开机启动: sytemctl disable firewalld
5、重启防火墙: firewall-cmd --reload
6、查看状态: systemctl status firewalld