国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 系統 > Linux > 正文

給RHEL系統替換軟件更新源的方法

2020-07-08 12:51:22
字體:
來源:轉載
供稿:網友

RHEL5.X 替換更新源

復制代碼
代碼如下:

cd /etc/yum.repos.d
wget http://docs.linuxtone.org/soft/lemp/CentOS-Base.repo
mv CentOS-Base.repo rhel-debuginfo.repo
rpm --import http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

RHEL6.1替換更新源
1.移除Yum

復制代碼
代碼如下:

rpm -aq|grep yum|xargs rpm -e --nodeps

2.下載Yum

復制代碼
代碼如下:

wget http://mirrors.163.com/centos/6.2/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm
wget http://mirrors.163.com/centos/6.2/os/x86_64/Packages/yum-3.2.29-22.el6.centos.noarch.rpm
wget http://mirrors.163.com/centos/6.2/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
wget http://mirrors.163.com/centos/6.2/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-10.el6.noarch.rpm


3.安裝Yum

復制代碼
代碼如下:

rpm -ivh python-iniparse-0.3.1-2.1.el6.noarch.rpm
rpm -ivh yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
rpm -ivh yum-3.2.29-22.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-10.el6.noarch.rpm


4.更新repo文件,使用網易文件
切換目錄到 /etc/yum.repos.d/目錄下

復制代碼
代碼如下:

cd /etc/yum.repos.d/
wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
vi CentOS6-Base-163.repo

編輯文件,把文件里面的$releasever全部替換為版本號,即6 最后保存!或者直接把下面的內存拷貝到CentOS6-Base-163.repo文件中即可(已經修改好)。

復制代碼
代碼如下:

# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#


復制代碼
代碼如下:

[base]
name=CentOS-6 - Base - 163.com
baseurl=http://mirrors.163.com/centos/6/os/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=os
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6


復制代碼
代碼如下:

#released updates
[updates]
name=CentOS-6 - Updates - 163.com
baseurl=http://mirrors.163.com/centos/6/updates/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=updates
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6


復制代碼
代碼如下:

#additional packages that may be useful
[extras]
name=CentOS-6 - Extras - 163.com
baseurl=http://mirrors.163.com/centos/6/extras/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=extras
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6


復制代碼
代碼如下:

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-6 - Plus - 163.com
baseurl=http://mirrors.163.com/centos/6/centosplus/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=centosplus
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6


復制代碼
代碼如下:

#contrib - packages by Centos Users
[contrib]
name=CentOS-6 - Contrib - 163.com
baseurl=http://mirrors.163.com/centos/6/contrib/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=contrib
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

5.最后一步

復制代碼
代碼如下:

yum clean all #清理yum緩存
yum makecache #將服務器上的軟件包信息緩存到本地,以提高搜索安裝軟件的速度。
yum list yum #測試配置的yum源是否已經生效。

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 家居| 铁岭县| 鹤峰县| 和政县| 东至县| 镶黄旗| 汾西县| 兰西县| 巴塘县| 佛教| 烟台市| 海晏县| 彩票| 广丰县| 肇庆市| 安义县| 黄石市| 封丘县| 沅陵县| 星子县| 北碚区| 泰来县| 康定县| 平乡县| 英山县| 英超| 东光县| 长岛县| 商都县| 德化县| 乌海市| 孝昌县| 乌兰县| 宜州市| 鸡西市| 西昌市| 田林县| 西昌市| 重庆市| 武川县| 泽库县|