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

首頁 > 系統 > CentOS > 正文

RHEL配置Centos yum源的方法

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

由于RHEL的yum在線更新是收費的,如果沒有注冊的話是不能使用的,即不能在線安裝軟件。在這種情況下,如果我們使用的機器安裝的是RHEL系統要是每次安裝軟件先掛載本地光盤會很繁瑣,而且有些軟件也是老版本的,這種情況下我們可以借助CentOS的YUM源來滿足我們的需求。

一、刪除RHEL原有的YUM

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

二、下載CentOS的yum安裝包(163源)

wget http://mirrors.163.com/centos/5/os/x86_64/CentOS/yum-3.2.22-40.el5.centos.noarch.rpm

wget http://mirrors.163.com/centos/5/os/x86_64/CentOS/yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm

wget http://mirrors.163.com/centos/5/os/x86_64/CentOS/yum-metadata-parser-1.1.2-4.el5.x86_64.rpm  

wget http://mirrors.163.com/centos/5/os/x86_64/RPM-GPG-KEY-CentOS-5

三、安裝CentOS的YUM安裝包

yum和yum-plugin-fastestmirror需要一起安裝,這兩個包存在依賴關系,分開安裝會失敗,安裝之前先把RPM-GPG-KEY導入系統,否則會出現警告信息

rpm -ivh yum-metadata-parser-1.1.2-4.el5.x86_64.rpm  

rpm --import RPM-GPG-KEY-CentOS-5

rpm –ivh yum-3.2.22-40.el5.centos.noarch.rpm  yum-fastestmirror-1.1.16-21.el5.centos.noarch.rm

至此我們就可以在線使用yum了

四、修改yum源

為了使用在線使用Yum安裝軟件更快,我們可以使用國內的網易Yum源或者其他國內yum源

五、更改yum源 

#我們使用網易的CentOS鏡像源

cd /etc/yum.repos.d/

vi rhel-debuginfo.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-5 - Base - 163.com

mirrorlist=http://mirrorlist.centos.org/?release=5&arch=$basearch&repo=os

baseurl=http://mirrors.163.com/centos/5/os/$basearch/

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#released updates

[updates]

name=CentOS-5 - Updates - 163.com

mirrorlist=http://mirrorlist.centos.org/?release=5&arch=$basearch&repo=updates

baseurl=http://mirrors.163.com/centos/5/updates/$basearch/

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#packages used/produced in the build but not released

[addons]

name=CentOS-5 - Addons - 163.com

mirrorlist=http://mirrorlist.centos.org/?release=5&arch=$basearch&repo=addons

baseurl=http://mirrors.163.com/centos/5/addons/$basearch/

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#additional packages that may be useful

[extras]

name=CentOS-5 - Extras - 163.com

mirrorlist=http://mirrorlist.centos.org/?release=5&arch=$basearch&repo=extras

baseurl=http://mirrors.163.com/centos/5/extras/$basearch/

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#additional packages that extend functionality of existing packages

[centosplus]

name=CentOS-5 - Plus - 163.com

mirrorlist=http://mirrorlist.centos.org/?release=5&arch=$basearch&repo=centosplus

baseurl=http://mirrors.163.com/centos/5/centosplus/$basearch/

gpgcheck=1

enabled=0

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#contrib - packages by Centos Users

[contrib]

name=CentOS-5 - Contrib - 163.com

mirrorlist=http://mirrorlist.centos.org/?release=5&arch=$basearch&repo=contrib

baseurl=http://mirrors.163.com/centos/5/contrib/$basearch/

gpgcheck=1

enabled=0

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

六、清理

yum clean all

yum makecache

七、更新

yum update

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 开化县| 昂仁县| 大冶市| 楚雄市| 龙门县| 宝坻区| 自治县| 萍乡市| 定结县| 聂荣县| 来凤县| 凤台县| 五大连池市| 南涧| 汽车| 星子县| 德保县| 高淳县| 溆浦县| 雅安市| 芦溪县| 福州市| 建德市| 浦县| 松桃| 犍为县| 禄劝| 克拉玛依市| 青岛市| 怀安县| 肇州县| 新巴尔虎右旗| 宽甸| 雷波县| 台江县| 漳浦县| 江陵县| 平阳县| 诸城市| 唐海县| 枣强县|