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

首頁(yè) > 系統(tǒng) > CentOS > 正文

給RHEL系統(tǒng)替換軟件更新源的方法

2020-06-21 12:55:13
字體:
來(lái)源:轉(zhuǎn)載
供稿:網(wǎng)友

RHEL5.X 替換更新
 

復(fù)制代碼
代碼如下:

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

 

復(fù)制代碼
代碼如下:

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

 

2.下載Yum
 

復(fù)制代碼
代碼如下:

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
 

復(fù)制代碼
代碼如下:

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文件,使用網(wǎng)易文件
切換目錄到 /etc/yum.repos.d/目錄下
 

復(fù)制代碼
代碼如下:

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

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

復(fù)制代碼
代碼如下:

# 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.
#
#


復(fù)制代碼
代碼如下:

[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


復(fù)制代碼
代碼如下:

#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


復(fù)制代碼
代碼如下:

#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


復(fù)制代碼
代碼如下:

#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


復(fù)制代碼
代碼如下:

#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.最后一步
 

復(fù)制代碼
代碼如下:

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

 


發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 富源县| 营山县| 陕西省| 延寿县| 金昌市| 临沂市| 永善县| 瓮安县| 大连市| 安远县| 榆社县| 霸州市| 铁岭县| 福鼎市| 濮阳县| 巴青县| 昌宁县| 大关县| 吉木乃县| 昆山市| 鄱阳县| 昌江| 响水县| 罗山县| 眉山市| 浦东新区| 抚宁县| 盈江县| 湾仔区| 长汀县| 临洮县| 淳安县| 荥经县| 博爱县| 青浦区| 云梦县| 修水县| 九台市| 灌南县| 灯塔市| 阳谷县|