Centos7/8迁移龙晰系统

owner
2024-09-04 / 0 评论 / 32 阅读 / 正在检测是否收录...

==================centos8==================

####======================添加an8_baseos苍老 (IP替换为搭建仓库的IP)======================

echo """[an8_baseos]
name=AnolisOS-8 - BaseOS
baseurl=http://mirrors.aliyun.com/anolis/8/BaseOS/\$basearch/os
gpgcheck=0
enabled=1

[an8_appstream]
name=AnolisOS-8 - AppStream
baseurl=http://mirrors.aliyun.com/anolis/8/AppStream/\$basearch/os
gpgcheck=0
enabled=1""">>/etc/yum.repos.d/switch-to-anolis.repo

####======================添加migration仓库  (IP替换为搭建仓库的IP)======================
echo """# Anolis OS migration repo

[migration]
name=Anolis OS - migration repo
baseurl=https://mirrors.openanolis.cn/anolis/migration/\$releasever/\$basearch/os/
gpgcheck=0
gpgkey=https://mirrors.openanolis.cn/anolis/RPM-GPG-KEY-ANOLIS
#failovermethod=priority
enabled=1

[migration-debug]
name=Anolis OS - migration debug repo
baseurl=https://mirrors.openanolis.cn/anolis/migration/\$releasever/\$basearch/debug/
gpgcheck=1
gpgkey=https://mirrors.openanolis.cn/anolis/RPM-GPG-KEY-ANOLIS
#failovermethod=priority
enabled=0

[migration-source]
name=Anolis OS - migration source repo
baseurl=https://mirrors.openanolis.cn/anolis/migration/\$releasever/source/
gpgcheck=1
gpgkey=https://mirrors.openanolis.cn/anolis/RPM-GPG-KEY-ANOLIS
#failovermethod=priority
enabled=0""" >> /etc/yum.repos.d/anolis-migration.repo

==================centos7==================

####======================添加an7_baseos苍老 (IP替换为搭建仓库的IP)======================
echo """[an7_baseos]
name=AnolisOS-7 - BaseOS
baseurl=http://192.168.88.50/anolis/7.9/os/\$basearch/os
gpgcheck=0
enabled=1

[an7_updates]
name=AnolisOS-7 - Updates
baseurl=http://192.168.88.50/anolis/7.9/updates/\$basearch/os
gpgcheck=0
enabled=1""">>/etc/yum.repos.d/switch-to-anolis.repo


####======================添加migration仓库  (IP替换为搭建仓库的IP)======================
echo """# Anolis OS migration repo

[migration]
name=Anolis OS - migration repo
baseurl=http://192.168.88.50/anolis/migration/\$releasever/\$basearch/os/
gpgcheck=1
gpgkey=http://192.168.88.50/anolis/RPM-GPG-KEY-ANOLIS
failovermethod=priority
enabled=1

[migration-debug]
name=Anolis OS - migration debug repo
baseurl=http://192.168.88.50/anolis/migration/\$releasever/\$basearch/debug/
gpgcheck=1
gpgkey=http://192.168.88.50/anolis/RPM-GPG-KEY-ANOLIS
failovermethod=priority
enabled=0

[migration-source]
name=Anolis OS - migration source repo
baseurl=http://192.168.88.50/anolis/migration/\$releasever/source/
gpgcheck=1
gpgkey=http://192.168.88.50/anolis/RPM-GPG-KEY-ANOLIS
failovermethod=priority
enabled=0""" >> /etc/yum.repos.d/anolis-migration.repo 
####======================                执行安装迁移工具            ======================
yum -y install centos2anolis

####======================        开始迁移系统(过程可能会报错)        ======================
centos2anolis.py -l

####======================        迁移报错python依赖问题处理            ======================
python-chardet-2.2.1-3.el7.noarch.rpm
python-kitchen-1.1.1-5.el7.noarch.rpm
python36-psutil-5.6.7-1.el7.x86_64.rpm
将上述三个包传到服务器上
执行命令 yum localinstall python* -y
安装完成后再次执行        yum -y install centos2anolis

####======================            迁移成功后更新龙蜥软件包        ======================
yum distro-sync
0

评论 (0)

取消