赞
踩
cat /etc/issue
Red Hat Enterprise Linux Server release 6.3 (Santiago)
Kernel \r on an \m
步骤1:进入/etc/yum.repos.d/目录
cd /etc/yum.repos.d/
wget http://mirrors.163.com/.help/CentOS6-base-163.repo
cp rhel-source.repo rhel-source.repo.bak
mv CentOS-Base.repo rhel-source.repo
可以用vi工具编辑,也可以下载到pc上改完后再传上去,处理后文件如下
# 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.7 - Base - 163.com
baseurl=http://mirrors.163.com/centos/6.7/os/i386/
#mirrorlist=http://mirrorlist.centos.org/?release=6.7&arch=i386&repo=os
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
#released updates
[updates]
name=CentOS-$6.7 - Updates - 163.com
baseurl=http://mirrors.163.com/centos/6.7/updates/i386/
#mirrorlist=http://mirrorlist.centos.org/?release=6.7&arch=i386&repo=updates
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
#additional packages that may be useful
[extras]
name=CentOS-6.7 - Extras - 163.com
baseurl=http://mirrors.163.com/centos/6.7/extras/i386/
#mirrorlist=http://mirrorlist.centos.org/?release=6.7&arch=i386&repo=extras
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-6.7 - Plus - 163.com
baseurl=http://mirrors.163.com/centos/6.7/centosplus/i386/
#mirrorlist=http://mirrorlist.centos.org/?release=6.7&arch=i386&repo=centosplus
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
#contrib - packages by Centos Users
[contrib]
name=CentOS-6.7 - Contrib - 163.com
baseurl=http://mirrors.163.com/centos/6.7/contrib/i386/
#mirrorlist=http://mirrorlist.centos.org/?release=6.7&arch=i386&repo=contrib
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
yum -y install gcc
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。