用了半年多的腾讯云和ucloud,发现他们都是和阿里云同样自建的软件源php
http://centos.mirrors.cs.ucloud.cn/centos
http://mirrors.tencentyun.com/centos
linux
特别是软件包很是全,并且也很稳定。nginx
之前要yum
安装nginx
php-fpm
等等还要下载源码编译,或者添加安装epel yum源
vim
rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
centos
用过的都知道,此源位于国外,国内访问很慢。那咱们大能够把yum源换成腾讯或者是ucloud的地址便可!服务器
但你有没发觉上面的地址不能访问呢?是的,咱们发现这域名指向了腾讯云的内网。php-fpm
不要紧,在腾讯云内经过nginx使用反向代理创建一个mirrors吧,nginx配置信息以下,其中mirrors.linux48.com改为你本身的服务器地址。阿里云
[root@VM_190_46_centos /etc/nginx/conf.d]# vim mirrors.linux48.com.conf server { listen 80; server_name mirrors.linux48.com; location / { proxy_pass http://mirrors.tencentyun.com; proxy_redirect default; } }
service nginx restart 便可访问 http://mirrors.linux48.com/ 是否是很赞呢!url
附腾讯云的epel.repo
和centos.repo
spa
[root@tx-dispatch ~]# vim /etc/yum.repos.d/epel.repo [epel] name=Extra Packages for Enterprise Linux 6 - $basearch baseurl=http://mirrors.tencentyun.com/centos/epel/$basearch/ failovermethod=priority enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 ~ [root@VM_190_46_centos ~]# vim /etc/yum.repos.d/centos.repo [os] name=Extra Packages for tlinux(Qcloud) - $basearch baseurl=http://mirrors.tencentyun.com/centos/ustc/$releasever/os/$basearch/ enabled=1 gpgcheck=0 [updates] name=Extra Packages for tlinux(Qcloud) - $basearch baseurl=http://mirrors.tencentyun.com/centos/ustc/$releasever/updates/$basearch/ enabled=1 gpgcheck=0 [centosplus] name=Extra Packages for tlinux(Qcloud) - $basearch baseurl=http://mirrors.tencentyun.com/centos/ustc/$releasever/centosplus/$basearch/ enabled=1 gpgcheck=0 [contrib] name=Extra Packages for tlinux(Qcloud) - $basearch baseurl=http://mirrors.tencentyun.com/centos/ustc/$releasever/contrib/$basearch/ enabled=1 gpgcheck=0 [cr] name=Extra Packages for tlinux(Qcloud) - $basearch baseurl=http://mirrors.tencentyun.com/centos/ustc/$releasever/cr/$basearch/ enabled=1 gpgcheck=0 [extras] name=Extra Packages for tlinux(Qcloud) - $basearch baseurl=http://mirrors.tencentyun.com/centos/ustc/$releasever/extras/$basearch/ enabled=1 gpgcheck=0 [fasttrack] name=Extra Packages for tlinux(Qcloud) - $basearch baseurl=http://mirrors.tencentyun.com/centos/ustc/$releasever/fasttrack/$basearch/ enabled=1 gpgcheck=0 ~ [root@VM_190_46_centos ~]#