The tools used for this upgrade are provided by Su Yan
1. Preparations before upgrading
1.1 Precautions
● The migration tool is installed in the auxiliary machine (the machine that does not perform system migration)
● The auxiliary machine should reserve at least 1.6G memory space for the installation of the migration tool.
● Special requirements for turning off the firewall and SELinux before installation
● The tool installation environment needs to open tool port 18082
1.2 System to be upgraded
This upgrade system takes centos7.6 as an example. The upgrade software supports centos7.x, redhat7.x, bclinx7.x to bclinux_for_openEuler21.10
The upgrade process does not have absolute requirements for the performance of the upgraded system, but at least 2G of space must be reserved for users to install the upgrade software, and a certain amount of space must be reserved for users to back up the system according to time conditions (the specific reserved space depends on the actual size of the system)
1.3. Auxiliary machine
The upgrade process requires at least one auxiliary machine. The upgrade software needs to be installed on the auxiliary machine. The auxiliary machine and the node to be upgraded cannot be the same machine.
The auxiliary machine operating system needs to be centos7.6 or bclinux7.6
1.3 Upgrade software
The upgrade software provides Su Yan with the Tianyuan Yixing migration tool (Euler). Currently, the Tianyuan Yixing migration tool (Euler) only supports x86_64 and ARM 64-bit servers, and does not support IBM PowerPCLE and other architecture servers.
If the intranet upgrade does not correspond to bclinux-for-euler2110, you need to mount the intranet yum source through the iso image file.
2. Install and upgrade software on auxiliary machine
2.1. Auxiliary machine preparation operation
Execute the following command to check whether the firewall is enabled
systemctl status firewalld
Displaying "inactive" means the firewall is not turned on
Displaying "active" indicates that the firewall is on.
[root@fuzhuji_zfk ~]# systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2023-06-21 10:47:53 EDT; 5min ago
Docs: man:firewalld(1)
Main PID: 8765 (firewalld)
CGroup: /system.slice/firewalld.service
└─8765 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid
Jun 21 10:47:53 fuzhuji_zfk.localdomain systemd[1]: Starting firewalld - dynamic firewall daemon...
Jun 21 10:47:53 fuzhuji_zfk.localdomain systemd[1]: Started firewalld - dynamic firewall daemon.
If it is not enabled, execute the following command to check whether the port is enabled.
[root@fuzhuji_zfk ~]# firewall-cmd --query-port=18082/tcp
no
The prompt "no" indicates that the port is not open.
Execute the following command to permanently open the port:
firewall-cmd --add-port=18082/tcp --permanent
[root@fuzhuji_zfk ~]# firewall-cmd --add-port=18082/tcp --permanent
success
After reloading the configuration, check whether port 18082 is opened.
firewall-cmd --reload
firewall-cmd --query-port=18082/tcp
[root@fuzhuji_zfk ~]# firewall-cmd --reload
success
[root@fuzhuji_zfk ~]# firewall-cmd --query-port=18082/tcp
yes
[root@fuzhuji_zfk ~]#
2.2. Install the upgrade tool
If there is no yum source available for the auxiliary machine, you need to manually upload the rpm package of bclinux-sysmt-core, then make the local source through the local image, and then install the tool and its required dependencies through yum.
Upload the installation package to any location on the auxiliary machine node (this time, /mnt/soft is used as an example)
cd /mnt
mkdir soft
cd soft
ls
[root@fuzhuji_zfk mnt]# cd /mnt
[root@fuzhuji_zfk mnt]# mkdir soft
[root@fuzhuji_zfk mnt]# cd soft
[root@fuzhuji_zfk soft]# ls
bclinux-sysmt-core-2.0.0-1.x86_64.rpm
Install this rpm package
yum install -y bclinux-sysmt-core-2.0.0-1.x86_64.rpm
[root@fuzhuji_zfk soft]# yum install -y bclinux-sysmt-core-2.0.0-1.x86_64.rpm
Loaded plugins: fastestmirror, langpacks
Examining bclinux-sysmt-core-2.0.0-1.x86_64.rpm: bclinux-sysmt-core-2.0.0-1.x86_64
Marking bclinux-sysmt-core-2.0.0-1.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package bclinux-sysmt-core.x86_64 0:2.0.0-1 will be installed
--> Processing Dependency: java-1.8.0-openjdk for package: bclinux-sysmt-core-2.0.0-1.x86_64
Determining fastest mirrors
* base: mirrors.nju.edu.cn
* extras: mirrors.nju.edu.cn
* updates: mirrors.nju.edu.cn
base | 3.6 kB 00:00:00
extras | 2.9 kB 00:00:00
updates | 2.9 kB 00:00:00
Dependencies Resolved
===========================================================================================================
Package Arch Version Repository Size
===========================================================================================================
Installing:
bclinux-sysmt-core x86_64 2.0.0-1 /bclinux-sysmt-core-2.0.0-1.x86_64 2.1 G
Installing for dependencies:
atk x86_64 2.28.1-2.el7 base 263 k
avahi-libs x86_64 0.6.31-20.el7 base 62 k
cairo x86_64 1.15.12-4.el7 base 741 k
tzdata-java noarch 2023c-1.el7 updates 186 k
xorg-x11-font-utils x86_64 1:7.5-21.el7 base 104 k
xorg-x11-fonts-Type1 noarch 7.5-9.el7 base 521 k
Transaction Summary
===========================================================================================================
Install 1 Package (+66 Dependent packages)
Total size: 2.2 G
Total download size: 58 M
Installed size: 2.3 G
Downloading packages:
(1/66): avahi-libs-0.6.31-20.el7.x86_64.rpm | 62 kB 00:00:00
(2/66): atk-2.28.1-2.el7.x86_64.rpm | 263 kB 00:00:00
| 1.9 MB 00:00:00
(64/66): xorg-x11-fonts-Type1-7.5-9.el7.noarch.rpm | 521 kB 00:00:00
(65/66): tzdata-java-2023c-1.el7.noarch.rpm | 186 kB 00:00:00
(66/66): java-1.8.0-openjdk-headless-1.8.0.372.b07-1.el7_9.x86_64.rpm | 33 MB 00:00:04
-----------------------------------------------------------------------------------------------------------
Total 11 MB/s | 58 MB 00:00:05
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : libjpeg-turbo-1.2.90-8.el7.x86_64 1/67
Installing : mesa-libglapi-18.3.4-12.el7_9.x86_64 2/67
63/67
Installing : 1:java-1.8.0-openjdk-devel-1.8.0.372.b07-1.el7_9.x86_64 64/67
Installing : 1:tcl-8.5.13-8.el7.x86_64 65/67
Installing : expect-5.45-14.el7_1.x86_64 66/67
Installing : bclinux-sysmt-core-2.0.0-1.x86_64 67/67
Please enter /usr/local/x2openEuler/portal/service/ and execute bash service_init.sh to
start service.
Verifying : libXext-1.3.3-3.el7.x86_64 1/67
64/67
Verifying : copy-jdk-configs-3.3-11.el7_9.noarch 65/67
Verifying : libX11-common-1.6.7-4.el7_9.noarch 66/67
Verifying : avahi-libs-0.6.31-20.el7.x86_64 67/67
Installed:
bclinux-sysmt-core.x86_64 0:2.0.0-1
Dependency Installed:
atk.x86_64 0:2.28.1-2.el7
avahi-libs.x86_64 0:0.6.31-20.el7
xorg-x11-font-utils.x86_64 1:7.5-21.el7
xorg-x11-fonts-Type1.noarch 0:7.5-9.el7
Complete!
After the installation is complete, run the upgrade program
Enter /usr/local/x2openEuler/portal/service
the directory and enter the command sh service_init.sh
to run the upgrade program
cd /usr/local/x2openEuler/portal/service
sh service_init.sh
[root@fuzhuji_zfk soft]# cd /usr/local/x2openEuler/portal/service
[root@fuzhuji_zfk service]# ls -ltr
total 60
-rwxr-x---. 1 root root 3179 Apr 12 05:25 service_nginx.sh
-rwxr-x---. 1 root root 15381 Apr 12 05:25 service_init.sh
-rwxr-x---. 1 root root 231 Apr 12 05:25 service_gunicorn.sh
-rwxr-x---. 1 root root 762 Apr 12 05:25 service_daemon.sh
-rwxr-x---. 1 root root 591 Apr 12 05:25 nginx_x2openEuler.service
-rwxr-x---. 1 root root 579 Apr 12 05:25 gunicorn_x2openEuler.service
-rwxr-x---. 1 root root 1839 Apr 12 05:25 delete_file.sh
-rwxr-x---. 1 root root 57 Apr 12 05:25 const.conf
-rwxr-x---. 1 root root 14451 Apr 13 04:57 change_ip_x2openEuler.sh
#################################################################################
# 中间默认回车即可
[root@fuzhuji_zfk service]# sh service_init.sh
Start Nginx service and Gunicorn service
Ip address list:
sequence_number ip_address device
[1] 192.168.122.130 ens33
Enter the sequence number of listed ip as web server ip(default: 1):
Set the web server IP address 192.168.122.130
Please enter HTTPS port(default: 18082):
The HTTPS port 18082 is valid. Set the HTTPS port to 18082 (y/n default: y):
Set the HTTPS port 18082
Please enter gunicorn port(default: 18080):
The GUNICORN port 18080 is valid. Set the GUNICORN port to 18080 (y/n default: y):
Set the GUNICORN port 18080
The Nginx and Gunicorn ports are set up successfully.
Installing the django dependent environment.
The django dependency environment is installed successfully.
Generating the Django secret key.
Generate the Django secret key successfully.
Migrations for 'certificatemanager':
/usr/local/x2openEuler/portal/src/certificatemanager/migrations/0001_initial.py
- Create model CertificateInfo
- Create model CertPathConfig
- Create model ScheduleTask
Migrations for 'config':
/usr/local/x2openEuler/portal/src/config/migrations/0001_initial.py
- Create model RollbackFilterConfig
- Create model UserConfig
Migrations for 'operationlogmanager':
/usr/local/x2openEuler/portal/src/operationlogmanager/migrations/0001_initial.py
- Create model OperationLog
Installed 2 object(s) from 1 fixture(s)
Encrypting phase successfully.
It may take a few minutes to generate the certificate, please wait...
Certificate generated successfully. You can import the root certificate to the browser to mask security alarms when you access the tool. The root certificate is stored in /usr/local/x2openEuler/portal/thirdapp/nginx-install/webui/ca.crt.
Web console is now running, go to: # https://192.168.122.130:18082/x2openEuler/#/login
Enter the URL above in your browser and choose to continue visiting
You can enter the upgrade software login interface
Initial login requires a custom password
Interface after login
3. Configure local yum source
Since the system upgrade is performed on the intranet, the installation package required for downloading and upgrading can only be obtained through the intranet yum source. Here we obtain the intranet yum source by mounting the Euler image.
3.1. Upload the image source to the secondary machine
Store in the directory BCLinux-for-Euler-21.10-dvd-x86_64-230324.iso
of the auxiliary node/mnt/iso
[root@fuzhuji_zfk service]# cd /mnt/iso/
[root@fuzhuji_zfk iso]# ls
BCLinux-for-Euler-21.10-dvd-x86_64-230324.iso
3.2. Install httpd and start the service
You also need to upload the httpd installation package to the auxiliary machine before installing it.
Upload the rpm installation package of httpd to /mnt/soft
the directory for installation
[root@fuzhuji_zfk soft]# cd /mnt/soft/
[root@fuzhuji_zfk soft]# ls -ltr
total 576408
-rw-r--r--. 1 root root 587387992 Jun 21 11:06 bclinux-sysmt-core-2.0.0-1.x86_64.rpm
-rw-r--r--. 1 root root 2849200 Jun 25 06:30 httpd-2.4.6-99.el7.centos.1.x86_64.rpm
[root@fuzhuji_zfk soft]# yum install -y httpd-2.4.6-99.el7.centos.1.x86_64.rpm
Loaded plugins: fastestmirror, langpacks
Examining httpd-2.4.6-99.el7.centos.1.x86_64.rpm: httpd-2.4.6-99.el7.centos.1.x86_64
Marking httpd-2.4.6-99.el7.centos.1.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package httpd.x86_64 0:2.4.6-99.el7.centos.1 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
============================================================================================================
Package Arch Version Repository Size
============================================================================================================
Installing:
httpd x86_64 2.4.6-99.el7.centos.1 /httpd-2.4.6-99.el7.centos.1.x86_64 9.4 M
Transaction Summary
============================================================================================================
Install 1 Package
Total size: 9.4 M
Installed size: 9.4 M
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : httpd-2.4.6-99.el7.centos.1.x86_64 1/1
Verifying : httpd-2.4.6-99.el7.centos.1.x86_64 1/1
Installed:
httpd.x86_64 0:2.4.6-99.el7.centos.1
Complete!
After the installation is complete, start related services
systemctl enable --now httpd
systemctl status httpd
[root@fuzhuji_zfk soft]# systemctl enable --now httpd
Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.
[root@fuzhuji_zfk soft]#
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: active (running) since Sun 2023-06-25 06:32:32 EDT; 22s ago
Docs: man:httpd(8)
man:apachectl(8)
Main PID: 32805 (httpd)
Status: "Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec"
CGroup: /system.slice/httpd.service
├─32805 /usr/sbin/httpd -DFOREGROUND
├─33361 /usr/sbin/httpd -DFOREGROUND
├─33362 /usr/sbin/httpd -DFOREGROUND
├─33363 /usr/sbin/httpd -DFOREGROUND
├─33364 /usr/sbin/httpd -DFOREGROUND
└─33365 /usr/sbin/httpd -DFOREGROUND
Jun 25 06:32:06 fuzhuji_zfk.localdomain systemd[1]: Starting The Apache HTTP Server...
Jun 25 06:32:21 fuzhuji_zfk.localdomain httpd[32805]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fuzhuji_zfk.l...s message
Jun 25 06:32:32 fuzhuji_zfk.localdomain systemd[1]: Started The Apache HTTP Server.
Hint: Some lines were ellipsized, use -l to show in full.
3.3. Mount the image
/var/www/html
Create a directory under the directory euler2110
and mount the Euler image in this directory
For the Euler mirror version, choose everything
[root@fuzhuji_zfk /]# cd /var/www/html/
[root@fuzhuji_zfk html]# mkdir euler2110
[root@fuzhuji_zfk html]# mount -o loop /mnt/iso/BCLinux-for-Euler-21.10-everything-x86_64-230324.iso /var/www/html/euler2110/
mount: /dev/loop0 is write-protected, mounting read-only
# 此挂载方式关机重启后会失效
Turn off system firewall
[root@fuzhuji_zfk html]# systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2023-06-25 04:58:39 EDT; 1h 42min ago
Docs: man:firewalld(1)
Main PID: 8713 (firewalld)
CGroup: /system.slice/firewalld.service
└─8713 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid
Jun 25 04:58:39 fuzhuji_zfk.localdomain systemd[1]: Starting firewalld - dynamic firewall daemon...
Jun 25 04:58:39 fuzhuji_zfk.localdomain systemd[1]: Started firewalld - dynamic firewall daemon.
[root@fuzhuji_zfk html]# systemctl stop firewalld
[root@fuzhuji_zfk html]# systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
Active: inactive (dead) since Sun 2023-06-25 06:41:39 EDT; 1s ago
Docs: man:firewalld(1)
Process: 8713 ExecStart=/usr/sbin/firewalld --nofork --nopid $FIREWALLD_ARGS (code=exited, status=0/SUCCESS)
Main PID: 8713 (code=exited, status=0/SUCCESS)
Jun 25 04:58:39 fuzhuji_zfk.localdomain systemd[1]: Starting firewalld - dynamic firewall daemon...
Jun 25 04:58:39 fuzhuji_zfk.localdomain systemd[1]: Started firewalld - dynamic firewall daemon.
Jun 25 06:41:37 fuzhuji_zfk.localdomain systemd[1]: Stopping firewalld - dynamic firewall daemon...
Jun 25 06:41:39 fuzhuji_zfk.localdomain systemd[1]: Stopped firewalld - dynamic firewall daemon.
When the browser opens and http://ip地址/euler2110
the following image appears, it means the mounting is successful.
4. System upgrade
4.1. Log in to x2openEuler
Open in the browser (Google Chrome 72.0 and above): https://deployment auxiliary machine ip:port number/x2openEuler/#/login
Enter the username and password when entering the login interface for the first time. The default username is x2openEulerAdmin and the password is set by yourself. After setting the password, you will re-enter the login page. Log in again with the password you set previously.
Select– 新建任务
>系统升级
choose添加节点
The node to be upgraded must be on the same network segment as the auxiliary machine node.
Fill in the relevant information and check the system information of the node to be upgraded before upgrading.
[root@localhost ~]# cat /etc/os-release
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
[root@localhost ~]# cat /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)
[root@localhost ~]# uname -a
Linux localhost.localdomain 3.10.0-957.el7.x86_64 #1 SMP Thu Nov 8 23:39:32 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
[root@localhost ~]# hostnamectl
Static hostname: localhost.localdomain
Icon name: computer-vm
Chassis: vm
Machine ID: 7b52ccee24244c15ac0f0858010e6d08
Boot ID: cd3b13ff6afd49ee87823b4ef3e699e4
Virtualization: vmware
Operating System: CentOS Linux 7 (Core)
CPE OS Name: cpe:/o:centos:centos:7
Kernel: Linux 3.10.0-957.el7.x86_64
Turn off the firewall of the node to be upgraded
systemctl stop fiurewalld
Fill in the upgrade information
Repo source selection customization
Add repo source
Add the following information
[shengji]
name=shengji
baseusrl=http://192.168.122.130/euler2110/
enabled=1
gpgcheck=0
Click OK
Click OK again
4.2. Environmental inspection
Entering the environmental inspection stage
4.3. Environmental check before upgrade
Next step, check before upgrading
4.3. Upgrade
If the pre-check is passed, the next step is to perform the upgrade operation.
Upgrade successful, waiting for restart to complete
Restart completed
Post-upgrade environment check
4.3. Environmental cleanup
Clean and upgrade software after checking
The cleanup is completed. If there are any problems, download the log to view relevant information. If there are no problems, choose to delete the upgrade task.
Log in to the upgraded node and view operating system information
[root@localhost ~]# cat /etc/os-release
NAME="BigCloud Enterprise Linux"
VERSION="21.10 (LTS-SP2)"
ID="bclinux"
VERSION_ID="21.10"
PRETTY_NAME="BigCloud Enterprise Linux For Euler 21.10 LTS"
ANSI_COLOR="0;31"
[root@localhost ~]# cat /etc/redhat-release
BigCloud Enterprise Linux For Euler release 21.10 (LTS-SP2)
[root@localhost ~]# uname -a
Linux localhost.localdomain 4.19.90-2107.6.0.0100.oe1.bclinux.x86_64 #1 SMP Wed Dec 1 19:59:44 CST 2021 x86_64 x86_64 x86_64 GNU/Linux
[root@localhost ~]# hostnamectl
Static hostname: localhost.localdomain
Icon name: computer-vm
Chassis: vm
Machine ID: 4192080af16f4dee8d7d40286a4dd35b
Boot ID: 5575a9660e84460b9d808c6dc054120b
Virtualization: vmware
Operating System: BigCloud Enterprise Linux For Euler 21.10 LTS
Kernel: Linux 4.19.90-2107.6.0.0100.oe1.bclinux.x86_64
Architecture: x86-64
5. Problem description
5.1 yum configuration issues
To select the mounted upgrade source image, select the everything version.
For exampleBCLinux-for-Euler-21.10-everything-x86_64
Mirror download address: https://mirrors.cmecloud.cn/bclinux/oe21.10/ISO/x86_64/release/
Otherwise, there may be missing files.
5.2. Missing database
The upgrade software has built-in database for upgrading centos7.6, bclinux7.6 to openeuler. If you upgrade centos7.x, or bclinux7.x, redhat7.x, you need to download the corresponding database.
Download address: https://repo.oepkgs.net/openEuler/rpm/openEuler-20.03-LTS-SP1/contrib/x2openEuler/x86_64/Packages/