CentOS无损升级AlmaLinux OS
1. 更新CentOS软件源(国内适用)
{tabs}
{tabs-pane label="CentOS 6"}
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-6.repo
{/tabs-pane}
{tabs-pane label="CentOS 7"}
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
{/tabs-pane}
{/tabs-pane}
{tabs-pane label="CentOS 8"}
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-8.repo
{/tabs-pane}
{/tabs}
2. 生成缓存
yum makecache
3. 升级至最新版本
sudo dnf update -y
sudo reboot
4. 转换AlmaLinux OS
4.1 准备脚本
{tabs}
{tabs-pane label="国外"}
curl -O https://raw.githubusercontent.com/AlmaLinux/almalinux-deploy/master/almalinux-deploy.sh
{/tabs-pane}
{tabs-pane label="国内"}
curl -O https://cdn.jsdelivr.net/gh/AlmaLinux/almalinux-deploy@master/almalinux-deploy.sh
{/tabs-pane}
{/tabs}
注意: 需要赋予almalinux-deploy.sh文件完全的可执行权限,否则很可能升级不成功!
4.2 转换
sudo bash almalinux-deploy.sh
耐心等候,几分钟至十几分钟(根据自身服务器性能而定)后重启
sudo reboot
4.3 升级AlmaLinux OS
sudo yum update -y
当前页面是本站的「Google AMP」版。查看和发表评论请点击:完整版 »