这篇文章主要讲解了“Linux中yum常用命令和yum源详解”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“Linux中yum常用命令和yum源详解”吧!
==基础源==
Base/Extras/Updates: 默认(国外源)
[root@tianyun ~]# ls /etc/yum.repos.d/
CentOS-Base.repo CentOS-fasttrack.repo CentOS-Vault.repo
CentOS-CR.repo CentOS-Media.repo
CentOS-Debuginfo.repo CentOS-Sources.repo
[root@tianyun ~]# yum repolist
repo id repo name status
base/7/x86_64 CentOS-7 - Base 9,363
extras/7/x86_64 CentOS-7 - Extras 449
updates/7/x86_64 CentOS-7 - Updates 2,146
repolist: 11,958
/etc/yum.re
aliyun:
[root@tianyun ~]# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
[root@tianyun ~]# curl -o /etc/yum.repos.d/CentOS-Base.repo //mirrors.aliyun.com/repo/Centos-7.repo
[root@tianyun ~]# yum clean all // 清除原来旧的YUM 数据库信息
[root@tianyun ~]# yum makecache // 更新新的YUM仓库信息
yum -y install lftp
163:
[root@tianyun ~]# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
[root@tianyun ~]# curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS7-Base-163.repo
EPEL:
[root@tianyun ~]# yum -y install epel-release (国外源)
或
[root@tianyun ~]# mv /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel.repo.backup
[root@tianyun ~]# wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
==软件官方源==
Nginx:
nginx.org
[root@tianyun ~]# vim /etc/yum.repos.d/nginx.repo
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/7/$basearch/
gpgcheck=0
enabled=1
yum -y install https://dev.mysql.com/get/mysql57-community-release-el7-9.noarch.rpm
Zabbix:
# rpm -ivh http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm
openstack:
感谢各位的阅读,以上就是“Linux中yum常用命令和yum源详解”的内容了,经过本文的学习后,相信大家对Linux中yum常用命令和yum源详解这一问题有了更深刻的体会,具体使用情况还需要大家实践验证。这里是编程网,小编将为大家推送更多相关知识点的文章,欢迎关注!