一、 准备工作:
1、 配置静态 IP 地址使电脑连上网
[root@localhost network-scripts]# vi /etc/sysconfig/network-scripts/ifcfg-ens160
2、 关闭防火墙和 selinux
[root@localhost a]# systemctl disable firewalld
[root@localhost selinux]# vi /etc/selinux/config
[root@localhost a]# reboot
[root@localhost a]# sestatus (检查状态)
SELinux status: disabled (关闭状态)
二、配置 yum 源和 epel 源
① [root@localhost a]# cd /etc/yum.repos.d 进入源目录
②[root@localhost yum.repos.d]# rm -rf * 删除所有文件
③[root@localhost yum.repos.d]# wget -O /etc/yum.repos.d/CentOS-Base.repo