前言:
楼主给服务器安装宝塔,发现下载文件有时莫名其妙变得很慢,10Mbps的带宽用出了0.几Mbps的感觉,很恼火,特意寻找了一下解决方法。
发现宝塔控制面板安装慢的解决方法有两种。
方法一:只需充钱,世界可及。
方法二:更换默认YUM源。
下面教程正式开始。
1、先备份,输入下方命令,再按回车。
「mv /etc/yum/repos.d/CentOS-Base.repo{,.date -I}」
2、下载新的CentOS-Base.repo
CentOS 6用这个命令↓
curl -o /etc/yum.repos.d/CentOS-Base.repo
http://mirrors.aliyun.com/repo/Centos-6.repoCentOS 7用这个命令↓
curl -o /etc/yum.repos.d/CentOS-Base.repo
http://mirrors.aliyun.com/repo/Centos-7.repo3、添加EPEL
CentOS 6用这个命令↓
wget -O /etc/yum.repos.d/epel-6.repo
http://mirrors.aliyun.com/repo/epel-6.repoCentOS 7用这个命令↓
wget -O /etc/yum.repos.d/epel.repo
http://mirrors.aliyun.com/repo/epel-7.repo4、清理缓存并生成新的缓存
先输入下面的这个命令,回车
yum clean all
再输入这个命令,按回车,等待处理完成
yum makecache
