Centos 的 yum yum安装失败

   在Linux下,安装软件,对菜鸟来言,是比较困难的,一个是通过rpm 的安装包进行安装

   如:# rpm -ivh  ****.rpm

  如果没有相应的安装包,源码包的安装方式,命令参数让人害怕,出现编译错误不各所措。

 现在系统自带的yum安装软件却是自动化的,但是发现系统自带的yum源却有问题,安装的时候,老是显示404错误,故在root权限下修改相应的yum源,

      /etc/yum.repos.d/CentOS-Base.repo是相应山高皇帝远的配置文件:

加了几个相应的源

[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/
    http://mirror.be10.com/centos/$releaserver/os/$basearch/
    http://centos.candishosting.com.cn/$releaserver/os/$basearch/
    http://ftp.hostrno.com/pub/centos/$releaserver/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

 

 


#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/
       http://mirror.be10.com/centos/$releaserver/os/$basearch/
        http://centos.candishosting.com.cn/$releaserver/os/$basearch/
        http://ftp.hostrno.com/pub/centos/$releaserver/os/$basearch/
gpgcheck=1

 

 

后来又进行了修改

baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
       http://mirror.be10.com/centos/$releaserver/os/$basearch/
        http://centos.candishosting.com.cn/$releaserver/os/$basearch/
        http://ftp.hostrno.com/pub/centos/$releaserver/os/$basearch/
        http://mirrors.163.com/$releaserver/os/$basearch/
        http://mirrors.sohu.com/$releaserver/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6


 

$releasever:这是版本叼,我用的是Centos6.3这个版本

$basearch:这是体系号,就是指x86_64,i386,i586这类东西

#mirrorlist:是指向一个镜像表表,

http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=updates

这儿注掉了

 

 

然后在通过yum

[root@localhost yum.repos.d]# yum install cvs
Loaded plugins: fastestmirror, refresh-packagekit, security
……………………………………。

Installed:
  cvs.x86_64 0:1.11.23-16.el6                                                  

Complete!

验证cvs是否已经安装上了:
[root@localhost yum.repos.d]# rpm -qa cvs
cvs-1.11.23-16.el6.x86_64


************************************************************************************************

 

这儿是从这儿参考的

http://www.360doc.com/content/10/1208/11/2614615_76081510.shtml

 http://www.gzidc.org/serverq/n487.html

 

http://lxsym.blog.51cto.com/1364623/289151

 

centOS下yum安装配置samba

http://lxsym.blog.51cto.com/1364623/289156

 

如果yum也没有请参考这个链接

http://blog.csdn.net/cyxlxp8411/article/details/8781021

CentOS不注册的话,yum是用不了,Redhat即使注册了,貌似yum还是用不了。不知道rhel官方yum源是不是要另外收费的?哪位筒子给我扫下盲

 


 

**********************************************************************

RedHat linux配置yum本地资源

http://blog.csdn.net/cyxlxp8411/article/details/8780991

 

 

 

http://wenku.baidu.com/link?url=CpMTZ8PGCHKLmgzyK2nWHJGUzUSZ6-WJJ1viZ_DTCoy8snd00_N9vhPxVLk8xjimoHgK-6lvOxdYe19qpYWg_3zUb7yZMw_VwFc5MpDefoC

 

http://tst.a9188.com/yum/46.html

 

你可能感兴趣的:(centos)