這篇文章主要講解了“Linux中yum常用命令和yum源詳解”,文中的講解內(nèi)容簡(jiǎn)單清晰,易于學(xué)習(xí)與理解,下面請(qǐng)大家跟著小編的思路慢慢深入,一起來研究和學(xué)習(xí)“Linux中yum常用命令和yum源詳解”吧!
網(wǎng)站建設(shè)哪家好,找成都創(chuàng)新互聯(lián)公司!專注于網(wǎng)頁設(shè)計(jì)、網(wǎng)站建設(shè)、微信開發(fā)、微信小程序、集團(tuán)企業(yè)網(wǎng)站建設(shè)等服務(wù)項(xiàng)目。為回饋新老客戶創(chuàng)新互聯(lián)還提供了城中免費(fèi)建站歡迎大家使用!
==基礎(chǔ)源==
Base/Extras/Updates: 默認(rèn)(國(guó)外源)
[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 數(shù)據(jù)庫(kù)信息
[root@tianyun ~]# yum makecache // 更新新的YUM倉(cāng)庫(kù)信息
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 (國(guó)外源)
或
[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
MySQL:
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源詳解”的內(nèi)容了,經(jīng)過本文的學(xué)習(xí)后,相信大家對(duì)Linux中yum常用命令和yum源詳解這一問題有了更深刻的體會(huì),具體使用情況還需要大家實(shí)踐驗(yàn)證。這里是創(chuàng)新互聯(lián),小編將為大家推送更多相關(guān)知識(shí)點(diǎn)的文章,歡迎關(guān)注!