更换yum源

yum源的默认仓库文件夹是 /etc/yum.repos.d/,只有在这个目录第一层的*.repo结尾的文件,才会被yum读取

具体流程如下:

1.下载wget命令
yum install wget -y   #wget命令就是在线下载一个url的静态资源

2.备份旧的yum仓库源
cd /etc/yum.repos.d

mkdir repobak
mv *.repo   repobak #备份repo文件

3.下载新的阿里的yum源仓库,阿里的开源镜像站https://developer.aliyun.com/mirror/
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

4.继续下载第二个仓库 epel仓库
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo

5.此时已经配置完毕,2个新的yum仓库,可以自由的嗨皮,下载软件了
[root@s25linux yum.repos.d]# ls
CentOS-Base.repo epel.repo repobak

6.下载一个redis玩一玩
[root@s25linux yum.repos.d]# yum install redis -y #就能够自动的下载redis,且安装redis

7.此时可以启动redis软件了,通过yum安装的redis,这么启动
systemctl start redis  

8.使用redis的客户端命令,连接redis数据库
[root@s25linux yum.repos.d]# redis-cli

127.0.0.1:6379> ping
PONG


原文链接:https://www.cnblogs.com/zlx960303/p/12339862.html
目前正在学习Python中,如果有什么不对的地方 希望广大朋友,指出错误指出,深表感谢
原文地址:https://www.cnblogs.com/shiguanggege/p/12965486.html