CentOS7 宝塔面板更换镜像源 -crontab

查看当前正在运行的yum进程

ps aux | grep yum

杀掉进程

kill -9 32466

更新镜像源

sudo curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
wget -O /etc/yum.repos.d/epel.repo https://mirrors.aliyun.com/repo/epel-7.repo

清理yum缓存

yum clean all

 重新生成缓存

sudo yum makecache

 

 

 

 

手动安装cronie

wget http://mirrors.aliyun.com/centos/7/os/x86_64/Packages/cronie-1.4.11-23.el7.x86_64.rpm
wget http://mirrors.aliyun.com/centos/7/os/x86_64/Packages/cronie-anacron-1.4.11-23.el7.x86_64.rpm
wget http://mirrors.aliyun.com/centos/7/os/x86_64/Packages/crontabs-1.11-6.20121102git.el7.noarch.rpm

sudo yum localinstall cronie-*.rpm crontabs-*.rpm

 

 

 

宝塔运行脚本的位置

/www/server/panel/script/

yum源配置文件位置

/etc/yum.repos.d/

 

posted @ 2025-12-16 02:20  悬剑丶  阅读(7)  评论(0)    收藏  举报