最近还是在centos官网上找到了,下面的实践没有达到想要的要求。
http://mirror.centos.org/centos/6.3/os/i386/Packages/gdb-7.2-56.el6.i686.rpm
=========================================================================
root@192.168.137.159:~/software# wget http://mirror.centos.org/centos/6.3/os/i386/Packages/gdb-7.2-56.el6.i686.rpm
--2013-04-08 21:55:46-- http://mirror.centos.org/centos/6.3/os/i386/Packages/gdb-7.2-56.el6.i686.rpm
正在解析主机 mirror.centos.org... 202.76.233.2
正在连接 mirror.centos.org|202.76.233.2|:80...败:连接超时。
重试中。
http://mirrors.163.com/centos/6/os/i386/repodata/repomd.xml
试了N种方法,没法解决,后来发现是因为文件yum.conf里面设置了proxy,注释掉就行了
运行yum clean all清楚缓存
运行yum makecache生成缓存
出现如下错误:
Loading mirror speeds from cached hostfile
http://mirrors.163.com/centos/6/os/i386/repodata/repomd.xml: [Errno 14] PYCURL ERROR 7 - "couldn't connect to host"
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again
vi ./etc/yum.conf
proxy=http://10.33.26.112:808
--2013-04-08 21:56:50-- (尝试次数: 2)
......
卡在这儿了。
=========================================================================
得出:是自己虚拟机的配置或网络的缘故,和163的源无太大关系,NAT配置正确,宽带这块好像有限定,对某些域名都无法ping通呀,嗨,什么玩意,想换个联通的ADSL,小宽带运营商这些都太多限定了。
解决办法:直接通过浏览器下载后,通过rz放入centos6.3的系统里,再rpm -ihv gdb-7.2-56.el6.i686.rpm
=========================================================================
写在前面:网易给人感觉有点像中国IT业的脊梁,低调耐用实用实在,其掌门人丁磊在很久前就有这样那样的源开放出来供下载,想法比较特立独行,其颇具执行力,我觉得这也算是作为IT业的一份贡献吧,从这个角度来看就不难想像丁磊去养猪了,呵呵。
背景:家里的vmware里的centos6.3没法安gdb,出现:
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
配置网易163的yum源
1. 下载repo文件
下载地址:http://mirrors.163.com/.help/CentOS6-Base-163.repo
2. 备份并替换系统的repo文件
[root@localhost ~]# cd /etc/yum.repos.d/
[root@localhost ~]# mv CentOS-Base.repo CentOS-Base.repo.bak
[root@localhost ~]# mv /root/CentOS6-Base-163.repo CentOS-Base.repo
3. 执行yum源更新
[root@localhost ~]# yum clean all
[root@localhost ~]# yum makecache
[root@localhost ~]# yum update
4. 到此已结束,用yum安装一下文件,看是否OK
[root@localhost ~]# yum install vim*
5. 安装centos常用的软件包及工具
常见压缩工具 zip unzip bzip2
[root@localhost ~]# yum -y install unzip zip bzip2 bzip2-devel
gcc gcc++编译器
[root@localhost ~]# yum install gcc gcc-c++ -y
cmake编译器
[root@localhost ~]# yum install cmake make -y
图片资源
[root@localhost ~]# yum -y install gd libjpeg libjpeg-devel libpng libpng-devel freetype-devel
其它常用资源包工具
[root@localhost ~]# yum -y install autoconf bison automake zlib* fiex* libxml* ncurses-devel libmcrypt* libtool-ltdl-devel*
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
CentOS 6.3安装第三方yum源
# wget http://www.atomicorp.com/installers/atomic[/url]
下载完成后执行以下命令
# sh ./atomic
里面涉及到的rpm:http://3es.atomicrocketturtle.com/packages/atomic-release/atomic-release-1.0-16.el6.art.noarch.rpm
1.
cat /etc/yum.repos.d/CentOS-Base.repo
然后修改
2.
# 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-6.3 - Base
#mirrorlist=http://mirrorlist.centos.org/?release=6.3&arch=$basearch&repo=os
baseurl=http://mirrors.163.com/centos/6.3/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
#released updates
[updates]
name=CentOS-6.3 - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=6.3&arch=$basearch&repo=updates
baseurl=http://mirrors.163.com/centos/6.3/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
#additional packages that may be useful
[extras]
name=CentOS-6.3 - Extras
#mirrorlist=http://mirrorlist.centos.org/?release=6.3&arch=$basearch&repo=extras
baseurl=http://mirrors.163.com/centos/6.3/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-6.3 - Plus
#mirrorlist=http://mirrorlist.centos.org/?release=6.3&arch=$basearch&repo=centosplus
baseurl=http://mirrors.163.com/centos/6.3/centosplus/$basearch/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
#contrib - packages by Centos Users
[contrib]
name=CentOS-6.3 - Contrib
#mirrorlist=http://mirrorlist.centos.org/?release=6.3&arch=$basearch&repo=contrib
baseurl=http://mirrors.163.com/centos/6.3/contrib/$basearch/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
# yum clean all
# yum makecache #将服务器上的软件包信息缓存到本地,以提高搜索安装软件的速度
# yum install vim* #测试域名是否可用
检查好后,如果还报错http://mirrorlist.centos.org/解析错误,请检查网络配置是否正确
来自:http://www.linuxidc.com/Linux/2012-10/72750.htm
http://hi.baidu.com/woniu421/item/09649c18b1ad662ff6625ce0
http://mirror.centos.org/centos/6.3/os/i386/Packages/gdb-7.2-56.el6.i686.rpm
=========================================================================
root@192.168.137.159:~/software# wget http://mirror.centos.org/centos/6.3/os/i386/Packages/gdb-7.2-56.el6.i686.rpm
--2013-04-08 21:55:46-- http://mirror.centos.org/centos/6.3/os/i386/Packages/gdb-7.2-56.el6.i686.rpm
正在解析主机 mirror.centos.org... 202.76.233.2
正在连接 mirror.centos.org|202.76.233.2|:80...败:连接超时。
重试中。
http://mirrors.163.com/centos/6/os/i386/repodata/repomd.xml
试了N种方法,没法解决,后来发现是因为文件yum.conf里面设置了proxy,注释掉就行了
运行yum clean all清楚缓存
运行yum makecache生成缓存
出现如下错误:
Loading mirror speeds from cached hostfile
http://mirrors.163.com/centos/6/os/i386/repodata/repomd.xml: [Errno 14] PYCURL ERROR 7 - "couldn't connect to host"
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again
vi ./etc/yum.conf
proxy=http://10.33.26.112:808
--2013-04-08 21:56:50-- (尝试次数: 2)
......
卡在这儿了。
=========================================================================
得出:是自己虚拟机的配置或网络的缘故,和163的源无太大关系,NAT配置正确,宽带这块好像有限定,对某些域名都无法ping通呀,嗨,什么玩意,想换个联通的ADSL,小宽带运营商这些都太多限定了。
解决办法:直接通过浏览器下载后,通过rz放入centos6.3的系统里,再rpm -ihv gdb-7.2-56.el6.i686.rpm
=========================================================================
写在前面:网易给人感觉有点像中国IT业的脊梁,低调耐用实用实在,其掌门人丁磊在很久前就有这样那样的源开放出来供下载,想法比较特立独行,其颇具执行力,我觉得这也算是作为IT业的一份贡献吧,从这个角度来看就不难想像丁磊去养猪了,呵呵。
背景:家里的vmware里的centos6.3没法安gdb,出现:
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
配置网易163的yum源
1. 下载repo文件
下载地址:http://mirrors.163.com/.help/CentOS6-Base-163.repo
2. 备份并替换系统的repo文件
[root@localhost ~]# cd /etc/yum.repos.d/
[root@localhost ~]# mv CentOS-Base.repo CentOS-Base.repo.bak
[root@localhost ~]# mv /root/CentOS6-Base-163.repo CentOS-Base.repo
3. 执行yum源更新
[root@localhost ~]# yum clean all
[root@localhost ~]# yum makecache
[root@localhost ~]# yum update
4. 到此已结束,用yum安装一下文件,看是否OK
[root@localhost ~]# yum install vim*
5. 安装centos常用的软件包及工具
常见压缩工具 zip unzip bzip2
[root@localhost ~]# yum -y install unzip zip bzip2 bzip2-devel
gcc gcc++编译器
[root@localhost ~]# yum install gcc gcc-c++ -y
cmake编译器
[root@localhost ~]# yum install cmake make -y
图片资源
[root@localhost ~]# yum -y install gd libjpeg libjpeg-devel libpng libpng-devel freetype-devel
其它常用资源包工具
[root@localhost ~]# yum -y install autoconf bison automake zlib* fiex* libxml* ncurses-devel libmcrypt* libtool-ltdl-devel*
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
CentOS 6.3安装第三方yum源
# wget http://www.atomicorp.com/installers/atomic[/url]
下载完成后执行以下命令
# sh ./atomic
里面涉及到的rpm:http://3es.atomicrocketturtle.com/packages/atomic-release/atomic-release-1.0-16.el6.art.noarch.rpm
1.
cat /etc/yum.repos.d/CentOS-Base.repo
然后修改
2.
# 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-6.3 - Base
#mirrorlist=http://mirrorlist.centos.org/?release=6.3&arch=$basearch&repo=os
baseurl=http://mirrors.163.com/centos/6.3/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
#released updates
[updates]
name=CentOS-6.3 - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=6.3&arch=$basearch&repo=updates
baseurl=http://mirrors.163.com/centos/6.3/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
#additional packages that may be useful
[extras]
name=CentOS-6.3 - Extras
#mirrorlist=http://mirrorlist.centos.org/?release=6.3&arch=$basearch&repo=extras
baseurl=http://mirrors.163.com/centos/6.3/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-6.3 - Plus
#mirrorlist=http://mirrorlist.centos.org/?release=6.3&arch=$basearch&repo=centosplus
baseurl=http://mirrors.163.com/centos/6.3/centosplus/$basearch/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
#contrib - packages by Centos Users
[contrib]
name=CentOS-6.3 - Contrib
#mirrorlist=http://mirrorlist.centos.org/?release=6.3&arch=$basearch&repo=contrib
baseurl=http://mirrors.163.com/centos/6.3/contrib/$basearch/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
# yum clean all
# yum makecache #将服务器上的软件包信息缓存到本地,以提高搜索安装软件的速度
# yum install vim* #测试域名是否可用
检查好后,如果还报错http://mirrorlist.centos.org/解析错误,请检查网络配置是否正确
来自:http://www.linuxidc.com/Linux/2012-10/72750.htm
http://hi.baidu.com/woniu421/item/09649c18b1ad662ff6625ce0
作者:jackxiang@向东博客 专注WEB应用 构架之美 --- 构架之美,在于尽态极妍 | 应用之美,在于药到病除
地址:https://jackxiang.com/post/6222/
版权所有。转载时必须以链接形式注明作者和原始出处及本声明!
最后编辑: jackxiang 编辑于2013-4-13 11:51
评论列表