Illegal websites should not initiate any form of manual service requests to our staff. It is strictly prohibited to use honmau Media's technical support services and products to engage in any illegal activities. If discovered, no technical support will be provided.×
Current location:home> news > help and support

CentOS 7 Migration Anolis OS 7 System Manual

Warm reminder: If you are performing a migration operation, it is recommended to take a snapshot of the backup server first to avoid problems and restore the snapshot in time.

1 Migration considerations

Anolis OS 7 remains compatible with CentOS7.x in terms of ecology and dependency management. The one-click migration script centos2anolis.py enables a smooth migration from CentOS7.x to Anolis OS 7.

You need to pay attention to the following points before using the migration script:

Migration involves the reinstallation of software packages and is an irreversible process. You must make a system backup before performing the migration.

The migration process involves accessing the official repo of Anolis OS, and it is necessary to ensure that the network in the environment to be migrated can normally access the Anolis OS repo.

Requires execution using root user.

The migration process relies on yum to ensure that yum components are running properly.

The migration script provides the function of accelerating access to the Anolis OS repo. If the speed of accessing the official Anolis OS repo is slow, you can use the-s option to accelerate access.

Anolis OS does not provide i686 architecture software packages. If CentOS i686 architecture software packages are installed on your system, you cannot migrate normally.

2 Deploy migration tools

Option 1 Install the migration tool from a local yum source

If the system to be migrated cannot access Dragon Lizard Mirror, it is first recommended to build a local yum source on the intranet. (How to make a local yum source username: rsync_user, password: Rsync@2020), and then install the migration tool through the local source. Assuming that the local source address is http://local.repo.com/anolis, download the migration tool software source:

wget http://local.repo.com/anolis/migration/anolis-migration.repo -O /etc/yum.repos.d/anolis-migration.repo

Then execute the following command to replace the baseurl address in/etc/yum.repos.d/anolis-migration.repo with the local source address.

sed -i "s#baseurl=https://mirrors.openanolis.cn/#baseurl=http://local.repo.com/#"

Install the migration tool centos2anolis:

yum -y install centos2anolis

Option 2 Install the migration tool from the community yum source (mirrors.openanolis.cn)

If the system to be migrated can be connected to the Internet, download the migration tool software source:

wget https://mirrors.openanolis.cn/anolis/migration/anolis-migration.repo -O /etc/yum.repos.d/anolis-migration.repo

Install the migration tool centos2anolis:

yum -y install centos2anolis

3 Migration execution

Option 1 Use local yum sources to perform migration

How can I use the migration tool to migrate a locally configured dragon lizard yum source?

When you cannot access mirrors.openanolis.cn or mirrors.aliyun.com, you can use the local source migration system. (How to do local yum source user name: rsync_user, password: Rsync@2020)

1. Before running the tool, create or edit the repo file of the Anolis repository: /etc/yum.repos.d/switch-to-anolis.repo (note, make sure the file name is switch-to-anolis.repo), and change the corresponding repo baseurl address to the local source repo address. For example, assuming the local source address is http://local.repo.com/anolis, the configuration file is as follows

[an7_baseos]

name=AnolisOS-7 - BaseOS

baseurl=http://local.repo.com/anolis/7.9/os/$basearch/os

gpgcheck=0

enabled=1


[an7_updates]

name=AnolisOS-7 - Updates

baseurl=http://local.repo.com/anolis/7.9/updates/$basearch/os

gpgcheck=0

enabled=1

1. Execute the following command to migrate

centos2anolis.py -l

The above command is to migrate to Dragon Lizard OS with ANCK kernel by default. If you want to migrate to Dragon Lizard OS with RCK kernel, please execute the following command to migrate

centos2anolis.py -l --rhck

Option 2 Use the community yum source (mirrors.openanolis.cn) to perform the migration

Simply execute the following command

centos2anolis.py

The above command is to migrate to Dragon Lizard OS with ANCK kernel by default. If you want to migrate to Dragon Lizard OS with RCK kernel, please execute the following command to migrate

centos2anolis.py --rhck

After the migration is completed, the system will prompt the following message, indicating that the migration was successful and you can enter the Anolis OS system after restarting.

Centos2anolis.py provides the-V option to record package information before and after migration. You can decide whether to add an option as needed. Add the-V option, and after the migration is completed, rpm information before and after the migration will be generated in the/var/tmp directory. The naming format is:

#Before migration

$(hostname)-rpms-list-before.log

$(hostname)-rpms-verified-before.log

#After migration

$(hostname)-rpms-list-after.log

$(hostname)-rpms-verified-after.log

4 Post-migration verification

Check the OS version:

# cat /etc/os-release

NAME="Anolis OS"

VERSION="7.9"

ID="anolis"

ID_LIKE="rhel fedora centos"

VERSION_ID="7.9"

PRETTY_NAME="Anolis OS 7.9"

ANSI_COLOR="0;31"

HOME_URL="https://openanolis.cn/"

BUG_REPORT_URL="https://bugs.openanolis.cn/"


CENTOS_MANTISBT_PROJECT="CentOS-7"

CENTOS_MANTISBT_PROJECT_VERSION="7"

REDHAT_SUPPORT_PRODUCT="centos"

REDHAT_SUPPORT_PRODUCT_VERSION="7"

5 FAQ

1) Can the in-place migration fail be rolled back?

The migration tool does not support rollback. If the migration fails, the migration cannot be restored to the original state of the migration. You must make a system backup before migrating.

2) What should I do if there is a problem with migration?

a. First check in the Dragon Lizard Community Knowledge Base to see if there is the same problem.

b. Save the error information reported by the migration tool execution, provide initial system information (system version, kernel, software package list, etc.), attach the migration log file/var/log/centos2anolis.log, and contact us in time for help.

© Website copyright and disclaimer

1.[honmau Media] independently owns the copyright of all materials on relevant pages of this website;

2. No one is allowed to copy it without the express written permission of [honmau Media];

3. The articles that do not indicate "honmau Media" on this website are all from the Internet and are only for everyone to learn and refer;

4. If there is any infringement/violation/irregularity, please contact customer service QQ or email to delete it, please understand;

5.[honmau Media] reserves the right to correct, modify and update this statement at any time.legal notice

Message Board
* Contact customer service for urgent issues
submitted
submission
Working days: 8:30 - 22:00 Online QQ

customer service

Company Introduction
top