【1.13】服务器安装 Linux 常用命令yum更新软件
https://developer.aliyun.com/mirror/centos?spm=a2c6h.13651102.J_4121707010.2.3e221b11VID2Xe
yum
检测软件
yum check-update
更新软件以及依赖关系
yum upgrade -y
删除软件
yum remove firefox
1.注意备份
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
更换yum源时请先备份系统原有yum源
2.阿里云镜像站
2.1.基础源
2.1.1.CentOS8.X
curl -o /etc/yum.repos.d/CentOS-8.repo http://mirrors.aliyun.com/repo/Centos-8.repo
2.1.2.CentOS7.X
curl -o /etc/yum.repos.d/Centos-7.repo http://mirrors.aliyun.com/repo/Centos-7.repo
2.1.3.CentOS6.X
curl -o /etc/yum.repos.d/Centos-6.repo http://mirrors.aliyun.com/repo/Centos-6.repo
2.2.epel源
2.2.2.CentOS7.X
curl -o /etc/yum.repos.d/epel-7.repo http://mirrors.aliyun.com/repo/epel-7.repo
2.2.3.CentOS6.X
curl -o /etc/yum.repos.d/epel-6.repo http://mirrors.aliyun.com/repo/epel-6.repo
3.清华大学镜像站
官方网站:点击到达
4.科学技术大学
官方网站:点击到达
5.网易镜像站
官方网站:点击到达
5.1.基础源
5.1.2.CentOS7.X
curl -o /etc/yum.repos.d/CentOS7-Base-163.repo http://mirrors.163.com/.help/CentOS7-Base-163.repo
5.1.3.CentOS6.X
curl -o /etc/yum.repos.d/CentOS6-Base-163.repo http://mirrors.163.com/.help/CentOS6-Base-163.repo
5.1.4.CentOS5.X
curl -o /etc/yum.repos.d/CentOS5-Base-163.repo http://mirrors.163.com/.help/CentOS5-Base-163.repo
6.微软源
6.1.CentOS7.X
方法1:
rpm -Uvh https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpm
方法2:
yum install -y https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpm
方法3:
cat >>/etc/yum.repos.d/microsoft-prod.repo<<EOF
[packages-microsoft-com-prod]
name=packages-microsoft-com-prod
baseurl=https://packages.microsoft.com/centos/7/prod
enabled=1
gpgcheck=1
gpgkey=https://packages.microsoft.com/keys/microsoft.asc
sslverify=1
EOF
清除原有的yum信息
yum clean all
生成缓存
yum makecache
查看配置好的yum源
yum repolist
点波关注 系统搭建(docker)