##下载阿里云的源
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
修改阿里云的系统版本
sed -i ‘s/$releasever/6/g‘ CentOS-Base.repo
然后就可以使用了阿里云的源了
##下载epel的源
wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
rpm -ivh epel-release-6-8.noarch.rpm
源于epel的源,需要注意一下就几点:
1.can not connection to metalink?
解决:
vi /etc/yum.repos.d/epel.repo
将第三行的注释打开,将第四行的注释掉,即:
[epel]
name=Extra Packages for Enterprise Linux 6 - $basearch
baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
2.http://download.fedoraproject.org/pub/epel/6/x86_64/repodata/de6a02cff57c89b6ccb3c8d3d8700f9616af988510c36d6c2f1d18ad36bbd04b-comps-el6.xml.bz2: [Errno 14] problem making ssl connection
尝试其他镜像。
epel/primary_db | 5.9 MB 00:12
http://download.fedoraproject.org/pub/epel/6/x86_64/repodata/1c39425dc34eee21f07f32b9b374f8775f8b72d1020b6ac56ab5c631f7a38a65-filelists.sqlite.bz2: [Errno 14] problem making ssl connection
尝试其他镜像。
错误:failure: repodata/1c39425dc34eee21f07f32b9b374f8775f8b72d1020b6ac56ab5c631f7a38a65-filelists.sqlite.bz2 from epel: [Errno 256] No more mirrors to try.
如果报上面的错:
1.将epel的enable 的1 改为0
2.yum install ca-certificates
3.将epel的enable 的0 改为1
ok可以使用了