1. 程式人生 > >centos5安裝yum源

centos5安裝yum源

1、目前國內網易、阿里源已經不可用了。

2、

阿里源:

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo

網易源:

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS5-Base-163.repo

3、可以執行上面命令,下載下來,不過已經無法使用了。

4、可以把內容修改為國外的源:

cd /etc/yum.repos.d

vi 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-$releasever - Base  
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os  
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/  
baseurl=http://vault.centos.org/5.11/os/$basearch/  
gpgcheck=1  
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5  


#released updates   
[updates]  
name=CentOS-$releasever - Updates  
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates  
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/  
baseurl=http://vault.centos.org/5.11/updates/$basearch/  
gpgcheck=1  
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5  


#additional packages that may be useful  
[extras]  
name=CentOS-$releasever - Extras  
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras  
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/  
baseurl=http://vault.centos.org/5.11/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-$releasever - Plus  
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus  
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/  
baseurl=http://vault.centos.org/5.11/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-$releasever - Contrib  
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib  
#baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/  
baseurl=http://vault.centos.org/5.11/contrib/$basearch/  
gpgcheck=1  
enabled=0  
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5</span></strong></span>  
5、然後清除yum快取: [[email protected] yum.repos.d]# yum clean all
Loaded plugins: fastestmirror, security
Cleaning up Everything
Cleaning up list of fastest mirrors

6、重新載入新快取:
yum makecache  [[email protected] yum.repos.d]# yum makecache
Loaded plugins: fastestmirror, security
Determining fastest mirrors
base                                                     | 1.1 kB     00:00     
base/filelists                                           | 3.7 MB     00:38     
base/other                                               |  14 MB     01:47     
base/group                                               | 1.1 MB     00:06     
base/primary                                             | 1.3 MB     00:01     
extras                                                   | 2.1 kB     00:00     
extras/filelists_db                                      | 224 kB     00:00     
extras/other_db                                          | 442 kB     00:00     
extras/group                                             | 9.7 kB     00:00     
extras/primary_db                                        | 173 kB     00:01     
updates                                                  | 1.9 kB     00:00     
updates/filelists_db                                     | 5.2 MB     00:08     
updates/other_db                                         |  30 MB     00:13     
updates/primary_db                                       | 1.0 MB     00:02     
base                                                                  3667/3667
base                                                                  3667/3667
base                                                                  3667/3667
Metadata Cache Created
[
[email protected]
yum.repos.d]# yum -y install gcc
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package gcc.x86_64 0:4.1.2-55.el5 set to be updated
--> Processing Dependency: cpp = 4.1.2-55.el5 for package: gcc
--> Processing Dependency: libgcc >= 4.1.2-55.el5 for package: gcc
--> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc
--> Running transaction check
---> Package cpp.x86_64 0:4.1.2-55.el5 set to be updated
---> Package glibc-devel.x86_64 0:2.5-123.el5_11.3 set to be updated
--> Processing Dependency: glibc = 2.5-123.el5_11.3 for package: glibc-devel
--> Processing Dependency: glibc-headers = 2.5-123.el5_11.3 for package: glibc-devel
--> Processing Dependency: glibc-headers for package: glibc-devel
---> Package libgcc.i386 0:4.1.2-55.el5 set to be updated
---> Package libgcc.x86_64 0:4.1.2-55.el5 set to be updated
--> Running transaction check
--> Processing Dependency: glibc = 2.5-81 for package: nscd
---> Package glibc.i686 0:2.5-123.el5_11.3 set to be updated
--> Processing Dependency: glibc-common = 2.5-123.el5_11.3 for package: glibc
---> Package glibc.x86_64 0:2.5-123.el5_11.3 set to be updated
---> Package glibc-headers.x86_64 0:2.5-123.el5_11.3 set to be updated
--> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers
--> Processing Dependency: kernel-headers for package: glibc-headers
--> Running transaction check
---> Package glibc-common.x86_64 0:2.5-123.el5_11.3 set to be updated
---> Package kernel-headers.x86_64 0:2.6.18-419.el5 set to be updated
---> Package nscd.x86_64 0:2.5-123.el5_11.3 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package              Arch         Version                  Repository     Size
================================================================================
Installing:
 gcc                  x86_64       4.1.2-55.el5             base          5.3 M
Installing for dependencies:
 glibc-devel          x86_64       2.5-123.el5_11.3         updates       2.4 M
 glibc-headers        x86_64       2.5-123.el5_11.3         updates       602 k
 kernel-headers       x86_64       2.6.18-419.el5           updates       1.5 M
Updating for dependencies:
 cpp                  x86_64       4.1.2-55.el5             base          2.9 M
 glibc                i686         2.5-123.el5_11.3         updates       5.4 M
 glibc                x86_64       2.5-123.el5_11.3         updates       4.8 M
 glibc-common         x86_64       2.5-123.el5_11.3         updates        17 M
 libgcc               i386         4.1.2-55.el5             base           97 k
 libgcc               x86_64       4.1.2-55.el5             base          100 k
 nscd                 x86_64       2.5-123.el5_11.3         updates       178 k

Transaction Summary
================================================================================
Install       4 Package(s)
Upgrade       7 Package(s)

Total download size: 40 M
Downloading Packages:
(1/11): libgcc-4.1.2-55.el5.i386.rpm                     |  97 kB     00:00     
(2/11): libgcc-4.1.2-55.el5.x86_64.rpm                   | 100 kB     00:00     
(3/11): nscd-2.5-123.el5_11.3.x86_64.rpm                 | 178 kB     00:01     
(4/11): glibc-headers-2.5-123.el5_11.3.x86_64.rpm        | 602 kB     00:01     
(5/11): kernel-headers-2.6.18-419.el5.x86_64.rpm         | 1.5 MB     00:03     
(6/11): glibc-devel-2.5-123.el5_11.3.x86_64.rpm          | 2.4 MB     00:04     
(7/11): cpp-4.1.2-55.el5.x86_64.rpm                      | 2.9 MB     00:05     
(8/11): glibc-2.5-123.el5_11.3.x86_64.rpm                | 4.8 MB     00:06     
(9/11): gcc-4.1.2-55.el5.x86_64.rpm                      | 5.3 MB     00:05     
(10/11): glibc-2.5-123.el5_11.3.i686.rpm                 | 5.4 MB     00:05     
(11/11): glibc-common-2.5-123.el5_11.3.x86_64.rpm        |  17 MB     00:08     
--------------------------------------------------------------------------------
Total                                           833 kB/s |  40 MB     00:48     
warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID e8562897
base/gpgkey                                              | 1.5 kB     00:00     
Importing GPG key 0xE8562897 "CentOS-5 Key (CentOS 5 Official Signing Key) <
[email protected]
>" from /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating       : libgcc                                                  1/18
  Updating       : glibc-common                                            2/18
  Updating       : glibc                                                   3/18
  Updating       : cpp                                                     4/18
  Updating       : nscd                                                    5/18
  Updating       : glibc                                                   6/18
  Updating       : libgcc                                                  7/18
  Installing     : kernel-headers                                          8/18
  Installing     : glibc-headers                                           9/18
  Installing     : glibc-devel                                            10/18
  Installing     : gcc                                                    11/18
  Cleanup        : nscd                                                   12/18
  Cleanup        : glibc                                                  13/18
  Cleanup        : glibc                                                  14/18
  Cleanup        : glibc-common                                           15/18
  Cleanup        : libgcc                                                 16/18
  Cleanup        : libgcc                                                 17/18
  Cleanup        : cpp                                                    18/18

Installed:
  gcc.x86_64 0:4.1.2-55.el5                                                     

Dependency Installed:
  glibc-devel.x86_64 0:2.5-123.el5_11.3                                         
  glibc-headers.x86_64 0:2.5-123.el5_11.3                                       
  kernel-headers.x86_64 0:2.6.18-419.el5                                        

Dependency Updated:
  cpp.x86_64 0:4.1.2-55.el5           glibc.i686 0:2.5-123.el5_11.3             
  glibc.x86_64 0:2.5-123.el5_11.3     glibc-common.x86_64 0:2.5-123.el5_11.3    
  libgcc.i386 0:4.1.2-55.el5          libgcc.x86_64 0:4.1.2-55.el5              
  nscd.x86_64 0:2.5-123.el5_11.3     

Complete!
[[email protected] yum.repos.d]#

相關推薦

centos5安裝yum

1、目前國內網易、阿里源已經不可用了。 2、 阿里源: wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo 網易源: wget -O /etc/yum

阿裏雲centos5升級yum為6

content graph plugins url edi .py gnu .tar.gz manual 升級後出現Errno -3] Error performing checksum 需要安裝 python-hashlib Python 2.4 安裝 hashlib

安裝yum

src yum源 roc mar ext alt com watermark ges Yum源掛載yum原安裝FTP安裝yum源

Linux配置IP,安裝yum

rm -rf The bootp 目錄 .com 編輯模式 com 進入 alt 修改IP:(斷電易失) ip addr add 192.168.1.110/24 dev ens33 語法格式 、想要添加的地址 、設備的名字 修改網絡配置文件(斷電不易失)

Linux下安裝yum相關命令

成功 cal 全部 eps ins 顯示 pack shell 刪除 install:安裝rpm軟件包;update:更新rpm軟件包;check-update:檢查是否有可用的更新rpm軟件包;remove:刪除指定的rpm軟件包;list:顯示軟件包的信息;search

linux 快速安裝yum

1、虛擬機器安裝後第一步先掛載mount /dev/cdrom /mnt 如果掛載出錯可以關機再啟動 2、備份 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak 3、再裝wget rpm -ivh

deepin 15.8桌面版安裝yum

安裝yum原 1. sudo apt-get install yum 2. 如果安裝的是pyhton3 那麼編輯/usr/bin/yum #! /usr/bin/python2 (yum用的是python2) 解決錯誤File "/usr/bin/yum", line 30 except Keybo

redhat7.3安裝yum

#檢查rehat自帶的yum源[[email protected] ~]# rpm -qa | grep yum yum-langpacks-0.4.2-7.el7.noarch yum-3.4.3-150.el7.noarch yum-rhn-plugin-2.0.1-6.el7.noarch

從零搭建Hadoop叢集(一)——離線安裝YUM搭建

概述 Cloudera版本(Cloudera’s Distribution Including Apache Hadoop,簡稱“CDH”),基於Web的使用者管理介面,支援大部分Hadoop元件,包括HDFS、YARN、Hive、 Hbase、Zookeep

【linux】安裝yum或者yum安裝軟體時候報錯

cd / var / lib / rpm / for i in ` ls | grep 'db.' ` ; do mv $i $i .bak ; done rpm -- rebuilddb yum clean all

centos5.X yum地址變更

下載了阿里和163的centos5.x的源,yum makecache的時候報錯 [[email protected] yum.repos.d]# yum makecache Loaded plugins: fastestmirror, securi

CentOS下安裝yum的流程和操作

自動 parser ins 提高 -i pack 成對 inf pre 一般公司都用Linux來搭建服務器,Linux安裝軟件時能夠用yum安裝依賴包是一件非常簡單而幸福的事情,因為你只需一個簡單的安裝命令yum install []即可安裝相應的軟件,yum工具會自動的從

在CentOS 7上使用Yum安裝 Zabbix 3.2

zabbix mysql centos 在CentOS 7上使用Yum源安裝 Zabbix 3.2 1. 環境準備[[email protected]/* */ ~]# setenforce 0 [[email protected]/* */ ~]# sed -i "s/S

在CentOS 7上使用Yum安裝和卸載 MongoDB 3.4

enabled 1.配置Yum源1vim /etc/yum.repos.d/mongodb-org-3.4.repo[mongodb-org-3.4] name=MongoDB Repository baseurl=https://repo.mongodb.org/yum/redhat/$relea

配置網絡YUM和第三方YUM及編譯安裝Apache

yum ftp repo httpd 編譯安裝 配置網絡YUM源和第三方YUM源及編譯安裝Apache系統軟硬件環境平臺:VMware Workstation Pro 12.5.5 build-5234757CentOS Linux release 7.3.1611內核版本:3.10.0-

CentOS 開啟安裝EPEL YUM

fedora 安裝 pri get 折騰 eas 技術分享 enter ora 我們用yum安裝軟件時,經常發現我們的yum源裏面沒有該軟件,需要自己去wget,然後configure,make,make install,太折騰了。 其實,CentOS 還有一個源叫做 EP

筆記-centos6安裝EPEL YUM

epel yum源 CentOS默認自帶系統安裝後的CentOS-Base.repo源,但官方源軟件少、版本更新慢。基於此可以安裝第三方yum原EPEL。 EPEL的全稱叫Extra Packages for Enterprise linux 。EPEL是由 Fedora 社區打造,為 RHEL

yum安裝zabbix圖形中文亂碼解決

zabbixzabbix在切換成中文的時候,圖形總有些英文翻譯過來是方塊形,通過親測,終於解決。把SIMKAI.ttf拷貝到/usr/share/zabbix/fonts然後進入/usr/share/zabbix/include/defines.inc.php修改#define(‘ZBX_GRAPH_FONT

安裝本地yum

linux環境準備環境:在沒有外網的情況下,只有一張centos鏡像,如何安裝本地yum源?環境準備:[[email protected] ~]# cat /etc/redhat-release CentOS release 6.8 (Final)[[email protected] ~]

安裝阿裏雲yum

yum linux1、備份mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup2、下載新的CentOS-Base.repo 到/etc/yum.repos.d/CentOS 5wget -O /etc