Linux5 5下配置Centos的yum源

2021-06-04 18:17:25 字數 2689 閱讀 9597

linux5.5下配置centos的yum源**)

[root@lvs-master ~]# rpm -qa |grep yum

yum-metadata-parser-1.1.2-3.el5

yum-updatesd-0.9-2.el5

yum-3.2.22-26.el5

yum-security-1.1.16-13.el5

yum-rhn-plugin-0.5.4-15.el5

2.修改源配置檔案 #vim /etc/yum.repos.d/centos-base.repo

[base]

name=centos-5-base

#mirrorlist=

#baseurl=

baseurl=

gpgcheck=1

gpgkey=

#released updates

[update]

name=centos-5-updates

#mirrorlist=

baseurl=

gpgcheck=1

gpgkey=

#packages used/produced in the build but not released

[addons]

name=centos-5-addons

#mirrorlist=

baseurl=

gpgcheck=1

gpgkey=

#additional packages that may be useful

[extras]

name=centos-5-extras

#mirrorlist=

baseurl=

gpgcheck=1

gpgkey=

#additional packages that extend functionality of existing packages

[centosplus]

name=centos-5-plus

#mirrorlist=

baseurl=

gpgcheck=1

enabled=0

gpgkey=

#contrib - packages by centos users

[contrib]

name=centos-5-contrib

#mirrorlist=

baseurl=

gpgcheck=1

enabled=0

gpgkey=

# vi dag.repo

[dag]

name=dag rpm repository for rhel5

baseurl=

enabled=1

gpgcheck=1

gpgkey=

3. 匯入key

#rpm --import

4. 執行,測試

#yum update

5.#yum clean all

方法二:

# cd /etc/yum.repos.d/

#mv centos-base.repo centos-base.repo.bak

#wget

該檔案內容如下:

[base]

name=centos-5 - base

baseurl=

gpgcheck=1

gpgkey=

#released updates

[update]

name=centos-5 - updates

baseurl=

gpgcheck=1

gpgkey=

#packages used/produced in the build but not released

[addons]

name=centos-5 - addons

baseurl=

gpgcheck=1

gpgkey=

#additional packages that may be useful

[extras]

name=centos-5 - extras

baseurl=

gpgcheck=1

gpgkey=

#additional packages that extend functionality of existing packages

[centosplus]

name=centos-5 - plus

baseurl=

gpgcheck=1

enabled=0

gpgkey=

#contrib - packages by centos users

[contrib]

name=centos-5 - contrib

baseurl=

gpgcheck=1

enabled=0

gpgkey=

#packages in testing

[testing]

name=centos-5 - testing

baseurl=

gpgcheck=1

enabled=0

gpgkey=

Linux下安裝nginx教程 Centos7

環境 centos7 準備 確保系統中安裝了gcc pcre devel zlib devel openssl devel。linux下檢查是否安裝過某軟體包 安裝命令 yum y install gcc pcre devel zlib devel openssl openssl devel 指定目...

Linux安裝和配置ssh(基於Centos 7)

1.安裝openssh server yum install y openssl openssh server2.修改配置檔案 用 vi 開啟配置檔案 etc ssh sshd config 將上圖的permitrootlogin rsaauthentication pubkeyauthentica...

Linux下Redis開機自啟(Centos)

特別說明 1.以下這些變數得配置成自己的。且 pidfile 應為 var run redis pid.不修改這裡,stop的時候關不掉。redisport 6379 exec usr redisbin redis server redis cli usr redisbin redis cli pi...