由于CentOS 7 社区版本在2024-6-30号之后停止更新,如果使用CentOS的话需要调整yum源
1、CentOS调整yum源
1.1、备份yum源
cd /etc/yum.repos.d/
# 备份Yum源
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
1.2、更新yum 源
cd /etc/yum.repos.d
# 执行替换
cat > CentOS-Base.repo <<'EOF'
[base]
name=CentOS-7.9.2009
enabled=1
failovermethod=priority
baseurl=https://vault.centos.org/7.9.2009/os/$basearch/
gpgcheck=1
gpgkey=https://vault.centos.org/RPM-GPG-KEY-CentOS-7
[updates]
name=CentOS-7.9.2009
enabled=1
failovermethod=priority
baseurl=https://vault.centos.org/7.9.2009/updates/$basearch/
gpgcheck=1
gpgkey=https://vault.centos.org/RPM-GPG-KEY-CentOS-7
[extras]
name=CentOS-7.9.2009
enabled=1
failovermethod=priority
baseurl=https://vault.centos.org/7.9.2009/extras/$basearch/
gpgcheck=1
gpgkey=https://vault.centos.org/RPM-GPG-KEY-CentOS-7
EOF
1.3、更新EPEL源
cd /etc/yum.repos.d
cat > epel.repo <<'EOF'
[epel]
name=Extra Packages for Enterprise Linux 7 - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch
metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
[epel-debuginfo]
name=Extra Packages for Enterprise Linux 7 - $basearch - Debug
#baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch/debug
metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-7&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1
[epel-source]
name=Extra Packages for Enterprise Linux 7 - $basearch - Source
#baseurl=http://download.fedoraproject.org/pub/epel/7/SRPMS
metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-source-7&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1
EOF
1.4、更新本地缓存
yum clean all
yum makecache
2、在线安装宝塔
2.1、CentOS 安装
yum install -y wget && wget -O install.sh http://v7.hostcli.com/install/install_6.0.sh && sh install.sh
2.2、ubuntu/deepin安装
wget -O install.sh http://v7.hostcli.com/install/install-ubuntu_6.0.sh && sudo bash install.sh
2.3、debian安装
wget -O install.sh http://v7.hostcli.com/install/install-ubuntu_6.0.sh && bash install.sh
2.4、fedora 安装
wget -O install.sh http://v7.hostcli.com/install/install_6.0.sh && bash install.sh
3、官方面板升级到纯净版
curl http://v7.hostcli.com/install/update6.sh|bash
4、其它费官方版本升级到纯净版
curl http://v7.hostcli.com/install/update6.sh|bash
5、任意非官方版本还原到官方最新版本
curl http://download.bt.cn/install/update6.sh|bash
6、宝塔纯净版弹出需要登录绑定处理
sed -i "s|if (bind_user == 'True') {|if (bind_user == 'REMOVED') {|g" /www/server/panel/BTPanel/static/js/index.js
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END
暂无评论内容