x2openEuler 升级实操(centos7.8 to openEuler 20.03)

news2024/11/17 21:34:11
通过 x2openEuler 工具,将 centos 7.8 迁移至 OpenEuler 上,实际感受迁移过程。

x2openEuler https://docs.openeuler.org/zh/docs/20.03_LTS_SP1/docs/x2openEuler/x2openEuler.html

环境准备

下载 x2openEuler 安装包

wget https://repo.oepkgs.net/openEuler/rpm/openEuler-20.03-LTS-SP1/contrib/x2openEuler/x86_64/Packages/x2openEuler-core-3.0.0-20240118.x86_64.rpm

image-20240129113854902

安装 x2openEuler

开始之前,关闭防火墙,selinux等常规操作

安装升级rpm

[root@olnode01 data]# dnf install x2openEuler-core-3.0.0-20240118.x86_64.rpm 
OS                                                               27 kB/s | 2.5 kB     00:00    
everything                                                       32 kB/s | 2.5 kB     00:00    
EPOL                                                             32 kB/s | 2.5 kB     00:00    
debuginfo                                                        30 kB/s | 2.5 kB     00:00    
source                                                           30 kB/s | 2.4 kB     00:00    
update                                                           26 kB/s | 2.2 kB     00:00    
update-source                                                    35 kB/s | 2.7 kB     00:00    
Dependencies resolved.
================================================================================================
 Package                     Architecture Version                      Repository          Size
================================================================================================
Installing:
 x2openEuler-core            x86_64       3.0.0-20240118               @commandline       552 M
Installing dependencies:
 expect                      x86_64       1:5.45.4-7.oe2203sp3         OS                 241 k
 mariadb                     x86_64       1:10.5.22-1.oe2203sp3        OS                 6.0 M
 mariadb-common              x86_64       1:10.5.22-1.oe2203sp3        OS                  28 k
 mariadb-config              x86_64       1:10.5.22-1.oe2203sp3        OS                 8.4 k
 mariadb-errmsg              x86_64       1:10.5.22-1.oe2203sp3        OS                 232 k
 mariadb-server              x86_64       1:10.5.22-1.oe2203sp3        OS                  18 M
 mysql-selinux               noarch       1.0.0-2.oe2203sp3            everything          34 k
 perl-DBD-MariaDB            x86_64       1.21-3.oe2203sp3             OS                 122 k
Installing weak dependencies:
 mariadb-backup              x86_64       1:10.5.22-1.oe2203sp3        OS                 6.6 M
 mariadb-gssapi-server       x86_64       1:10.5.22-1.oe2203sp3        OS                  14 k
 mariadb-server-utils        x86_64       1:10.5.22-1.oe2203sp3        OS                 1.1 M

Transaction Summary
================================================================================================
Install  12 Packages

Total size: 584 M
Total download size: 32 M
Installed size: 2.3 G
Is this ok [y/N]: y
Downloading Packages:
(1/11): expect-5.45.4-7.oe2203sp3.x86_64.rpm                    145 kB/s | 241 kB     00:01    
(2/11): mariadb-common-10.5.22-1.oe2203sp3.x86_64.rpm           235 kB/s |  28 kB     00:00    
(3/11): mariadb-config-10.5.22-1.oe2203sp3.x86_64.rpm            82 kB/s | 8.4 kB     00:00    
(4/11): mariadb-errmsg-10.5.22-1.oe2203sp3.x86_64.rpm            92 kB/s | 232 kB     00:02    
(5/11): mariadb-gssapi-server-10.5.22-1.oe2203sp3.x86_64.rpm     87 kB/s |  14 kB     00:00    
(6/11): mariadb-backup-10.5.22-1.oe2203sp3.x86_64.rpm           634 kB/s | 6.6 MB     00:10    
(7/11): mariadb-10.5.22-1.oe2203sp3.x86_64.rpm                  336 kB/s | 6.0 MB     00:18    
(8/11): perl-DBD-MariaDB-1.21-3.oe2203sp3.x86_64.rpm             48 kB/s | 122 kB     00:02    
(9/11): mysql-selinux-1.0.0-2.oe2203sp3.noarch.rpm               20 kB/s |  34 kB     00:01    
(10/11): mariadb-server-10.5.22-1.oe2203sp3.x86_64.rpm          454 kB/s |  18 MB     00:40    
(11/11): mariadb-server-utils-10.5.22-1.oe2203sp3.x86_64.rpm     33 kB/s | 1.1 MB     00:35    
------------------------------------------------------------------------------------------------
Total                                                           714 kB/s |  32 MB     00:46     
retrieving repo key for OS unencrypted from http://repo.openeuler.org/openEuler-22.03-LTS-SP3/OS/x86_64/RPM-GPG-KEY-openEuler
OS                                                               60 kB/s | 3.0 kB     00:00    
Importing GPG key 0xB675600B:
 Userid     : "openeuler <openeuler@compass-ci.com>"
 Fingerprint: 8AA1 6BF9 F2CA 5244 010D CA96 3B47 7C60 B675 600B
 From       : http://repo.openeuler.org/openEuler-22.03-LTS-SP3/OS/x86_64/RPM-GPG-KEY-openEuler
Is this ok [y/N]: y
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                        1/1 
  Installing       : mariadb-config-1:10.5.22-1.oe2203sp3.x86_64                           1/12 
  Installing       : mariadb-common-1:10.5.22-1.oe2203sp3.x86_64                           2/12 
  Installing       : mariadb-errmsg-1:10.5.22-1.oe2203sp3.x86_64                           3/12 
  Running scriptlet: mysql-selinux-1.0.0-2.oe2203sp3.noarch                                4/12 
  Installing       : mysql-selinux-1.0.0-2.oe2203sp3.noarch                                4/12 
  Running scriptlet: mysql-selinux-1.0.0-2.oe2203sp3.noarch                                4/12 
libsemanage.semanage_direct_install_info: Overriding mysql module at lower priority 100 with module at priority 200.

uavc:  op=setenforce lsm=selinux enforcing=0 res=1uavc:  op=load_policy lsm=selinux seqno=2 res=  Installing       : perl-DBD-MariaDB-1.21-3.oe2203sp3.x86_64                              5/12 
  Installing       : expect-1:5.45.4-7.oe2203sp3.x86_64                                    6/12 
  Installing       : mariadb-1:10.5.22-1.oe2203sp3.x86_64                                  7/12 
  Installing       : mariadb-backup-1:10.5.22-1.oe2203sp3.x86_64                           8/12 
  Installing       : mariadb-gssapi-server-1:10.5.22-1.oe2203sp3.x86_64                    9/12 
  Running scriptlet: mariadb-server-1:10.5.22-1.oe2203sp3.x86_64                          10/12 
  Installing       : mariadb-server-1:10.5.22-1.oe2203sp3.x86_64                          10/12 
  Running scriptlet: mariadb-server-1:10.5.22-1.oe2203sp3.x86_64                          10/12 
  Running scriptlet: x2openEuler-core-3.0.0-20240118.x86_64                               11/12 
  Installing       : x2openEuler-core-3.0.0-20240118.x86_64                               11/12 
  Running scriptlet: x2openEuler-core-3.0.0-20240118.x86_64                               11/12 
Please enter /usr/local/x2openEuler/portal/service/ and execute bash service_init.sh to start service.

  Installing       : mariadb-server-utils-1:10.5.22-1.oe2203sp3.x86_64                    12/12 
  Running scriptlet: mysql-selinux-1.0.0-2.oe2203sp3.noarch                               12/12 
  Running scriptlet: mariadb-server-utils-1:10.5.22-1.oe2203sp3.x86_64                    12/12 
  Verifying        : expect-1:5.45.4-7.oe2203sp3.x86_64                                    1/12 
  Verifying        : mariadb-1:10.5.22-1.oe2203sp3.x86_64                                  2/12 
  Verifying        : mariadb-backup-1:10.5.22-1.oe2203sp3.x86_64                           3/12 
  Verifying        : mariadb-common-1:10.5.22-1.oe2203sp3.x86_64                           4/12 
  Verifying        : mariadb-config-1:10.5.22-1.oe2203sp3.x86_64                           5/12 
  Verifying        : mariadb-errmsg-1:10.5.22-1.oe2203sp3.x86_64                           6/12 
  Verifying        : mariadb-gssapi-server-1:10.5.22-1.oe2203sp3.x86_64                    7/12 
  Verifying        : mariadb-server-1:10.5.22-1.oe2203sp3.x86_64                           8/12 
  Verifying        : mariadb-server-utils-1:10.5.22-1.oe2203sp3.x86_64                     9/12 
  Verifying        : perl-DBD-MariaDB-1.21-3.oe2203sp3.x86_64                             10/12 
  Verifying        : mysql-selinux-1.0.0-2.oe2203sp3.noarch                               11/12 
  Verifying        : x2openEuler-core-3.0.0-20240118.x86_64                               12/12 

Installed:
  expect-1:5.45.4-7.oe2203sp3.x86_64                                                            
  mariadb-1:10.5.22-1.oe2203sp3.x86_64                                                          
  mariadb-backup-1:10.5.22-1.oe2203sp3.x86_64                                                   
  mariadb-common-1:10.5.22-1.oe2203sp3.x86_64                                                   
  mariadb-config-1:10.5.22-1.oe2203sp3.x86_64                                                   
  mariadb-errmsg-1:10.5.22-1.oe2203sp3.x86_64                                                   
  mariadb-gssapi-server-1:10.5.22-1.oe2203sp3.x86_64                                            
  mariadb-server-1:10.5.22-1.oe2203sp3.x86_64                                                   
  mariadb-server-utils-1:10.5.22-1.oe2203sp3.x86_64                                             
  mysql-selinux-1.0.0-2.oe2203sp3.noarch                                                        
  perl-DBD-MariaDB-1.21-3.oe2203sp3.x86_64                                                      
  x2openEuler-core-3.0.0-20240118.x86_64                                                        

Complete!

除了 x2openEuler 之外,主要还安装了 mariadb 数据库

安装 x2openEuler

cd /usr/local/x2openEuler/portal/service
bash service_init.sh
[root@olnode01 service]# bash service_init.sh 
Start the MariaDB custom configuration for the use of the x2openEuler tool.
Has MariaDB been installed on the server and can be used properly? [Y/n] (default: n) y
Enter the password of the root user of the MariaDB again: 
Set the password of the x2openEuler user for MariaDB: 
If the selected database already exists, it will be overwritten.
Use default x2openEulerDb database? [Y/n] (default: Y)      
Enter password: 
MariaDB is configured successfully.
If authentication is enabled,
the SSH connection fails after the fingerprint of the machine changes.
Please confirm whether public key authentication is not required for SSH connection(y/n default: n): 
Start Nginx service and Gunicorn service
Not support the current OS: openEuler release 22.03 (LTS-SP3).
Only CentOS 7.x, CentOS 8.x and openEuler are supported.
Ip address list:
sequence_number         ip_address              device
[1]                     192.168.2.5             enp0s3
[2]                     10.0.3.15               enp0s8
[3]                     192.168.3.3             enp0s9
Enter the sequence number of listed ip as web server ip(default: 1): 3
Set the web server IP address 192.168.3.3
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
Migrations for 'taskmanager':
  /usr/local/x2openEuler/portal/src/taskmanager/migrations/0001_initial.py
    - Create model Node
    - Create model Repo
    - Create model Report
    - Create model SoftwareAssessment
    - Create model Step
    - Create model Task
    - Create model SoftwareAssessmentReport
Migrations for 'usermanager':
  /usr/local/x2openEuler/portal/src/usermanager/migrations/0001_initial.py
    - Create model User
    - Create model FailedLogin
    - Create model LockedIp
    - Create model UserExtend
Migrations for 'weakpasswordmanager':
  /usr/local/x2openEuler/portal/src/weakpasswordmanager/migrations/0001_initial.py
    - Create model WeakPassword
Operations to perform:
  Apply all migrations: auth, certificatemanager, config, contenttypes, operationlogmanager, sessions, taskmanager, usermanager, weakpasswordmanager
Running migrations:
  Applying contenttypes.0001_initial... OK
  Applying contenttypes.0002_remove_content_type_name... OK
  Applying auth.0001_initial... OK
  Applying auth.0002_alter_permission_name_max_length... OK
  Applying auth.0003_alter_user_email_max_length... OK
  Applying auth.0004_alter_user_username_opts... OK
  Applying auth.0005_alter_user_last_login_null... OK
  Applying auth.0006_require_contenttypes_0002... OK
  Applying auth.0007_alter_validators_add_error_messages... OK
  Applying auth.0008_alter_user_username_max_length... OK
  Applying auth.0009_alter_user_last_name_max_length... OK
  Applying auth.0010_alter_group_name_max_length... OK
  Applying auth.0011_update_proxy_permissions... OK
  Applying auth.0012_alter_user_first_name_max_length... OK
  Applying certificatemanager.0001_initial... OK
  Applying config.0001_initial... OK
  Applying operationlogmanager.0001_initial... OK
  Applying sessions.0001_initial... OK
  Applying taskmanager.0001_initial... OK
  Applying usermanager.0001_initial... OK
  Applying weakpasswordmanager.0001_initial... OK
Installed 1 object(s) from 1 fixture(s)
Installed 1 object(s) from 1 fixture(s)
Installed 13 object(s) from 1 fixture(s)
Installed 52 object(s) from 1 fixture(s)
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.3.3:18082/x2openEuler/#/login

密码设置成: x2open@1234

查看服务进程

[root@olnode01 service]# ps -ef|grep python
root         957       1  0 15:16 ?        00:00:02 /usr/bin/python3 -Es /usr/sbin/tuned -l -P
x2openE+    9323       1  0 15:25 ?        00:00:00 /bin/bash /usr/local/x2openEuler/portal/service/service_gunicorn.sh /usr/local/x2openEuler/portal/thirdapp/python-install/bin/gunicorn -c resources/gunicorn-conf.py resources.wsgi
x2openE+    9325    9323  0 15:25 ?        00:00:00 /usr/local/x2openEuler/portal/thirdapp/python-install/bin/python3 /usr/local/x2openEuler/portal/thirdapp/python-install/bin/gunicorn -c resources/gunicorn-conf.py resources.wsgi
x2openE+    9345    9325  0 15:25 ?        00:00:01 /usr/local/x2openEuler/portal/thirdapp/python-install/bin/python3 /usr/local/x2openEuler/portal/thirdapp/python-install/bin/gunicorn -c resources/gunicorn-conf.py resources.wsgi
root       10260    4606  0 15:28 pts/1    00:00:00 grep --color=auto python
[root@olnode01 service]# ps -ef|grep mariadb
mysql       5557       1  0 15:23 ?        00:00:00 /usr/libexec/mariadbd --basedir=/var/lib/mysql/
root       10263    4606  0 15:28 pts/1    00:00:00 grep --color=auto mariadb

当前版本

[root@olnode01 webui]# rpm -qa x2openEuler-core
x2openEuler-core-3.0.0-20240118.x86_64

登陆使用

https://192.168.3.3:18082/x2openEuler/#/login

初始化密码

image-20240129153545051

image-20240129153718719

重启服务

[root@olnode01 webui]# rpm -qa x2openEuler-core
x2openEuler-core-3.0.0-20240118.x86_64
[root@olnode01 webui]# init 6

systemctl start mariadb
systemctl start nginx_x2openEuler.service
systemctl start gunicorn_x2openEuler.service

# django.db.utils.OperationalError: (2003, "Can't connect to MySQL server on '127.0.0.1' ([Errno 111] Connection refused)")
# 遇到上面的错误再次重启即可

创建升级任务

准备好被升级的系统

[root@mysqldb etc]# cat centos-release 
CentOS Linux release 7.8.2003 (Core)

这是一个以二进制形式安装了 MySQL 数据库的主机

输入被升级系统的信息和选择目标OS信息

https://docs.openeuler.org/zh/docs/20.03_LTS_SP1/docs/x2openEuler/FeatureGuide.html

image-20240129155325437

image-20240129155352932

image-20240129155420117

image-20240129155425741

image-20240129160336850

image-20240129160404585

image-20240129160435421

image-20240129160450710

SHA256	ED25519	FWax7fck4TGEidPrZCqOZsZ+Yyq69xijrAXle2bIrRY
SHA256	RSA		ssAWfnoOebOMOinTXVitTXkOTeCMseGkvj6uMP38dtQ
SHA256	ECDSA	03kB6juavFHZbVAtdquULJxFe3fXW2HifYU4h7/zjrI
MD5		ED25519	e0:5a:46:d8:2e:62:6a:6a:f0:47:77:8a:ca:db:1c:10
MD5		RSA		cb:75:96:8a:2c:d8:3e:d8:86:e0:54:b8:e9:6c:3a:69
MD5		ECDSA	f2:c8:55:40:73:ab:66:7e:86:de:be:a4:53:27:df:06

到此完成了升级任务的创建,确认无误后点击确认按钮开始升级

image-20240129160710053

升级任务管理

首页这里发现有丰富的帮助引导

image-20240129161045168

环境检查

image-20240129160952481

检查不通过,似乎是网络问题

image-20240129161438425

重试就好了

image-20240129161708603

升级前检查

点击上一步的开始检查按钮

image-20240129165606855

检查中

image-20240129162025629

这里就开始下载目标OS ISO文件?是否应该可以有本地下载好的镜像上传上去?

检查通过

image-20240129164751400

目标主机检查文件-文件在目标主机上

/opt/x2openEuler-upgrade/output/upgrade-check/d74fda75-be7e-11ee-bd85-08002774f1d0/hw_compat-d74fda75-be7e-11ee-bd85-08002774f1d0.json
{
  "summary": {
    "system_info": {
      "manufacturer": "innotek GmbH",
      "product_name": "VirtualBox"
    },
    "bios_info": {
      "vendor": "innotek GmbH",
      "version": "VirtualBox"
    },
    "cpu_info": {
      "architecture": "x86_64",
      "model_name": "12th Gen Intel(R) Core(TM) i7-1255U"
    },
    "generate_time": "20240129162315",
    "is_virtual_machine": true
  },
  "count_info": {
    "all_cards_count": "0",
    "compatible_cards_count": "0",
    "cards_proportion": "100%",
    "total_proportion": "100%",
    "level_zero_num": 0,
    "level_one_num": 0,
    "level_two_num": 0,
    "level_three_num": 0
  },
  "table": []
}

各个标签页的内容

升级前检查报告

image-20240129164943904

配置文件升级策略

image-20240129165009388

业务软件评估报告

image-20240129165026632

硬件兼容性评估报告

image-20240129165050334

软件冲突检查报告

image-20240129165114809

检查日志-最后一个日志tab页
2024-01-29 16:23:18,893 - Client_IP:192.168.3.4 - USER_ID:0 - INFO - GrubCheckActor register success

2024-01-29 16:23:18,893 - Client_IP:192.168.3.4 - USER_ID:0 - INFO - import src.env_check.check_actor.env_check.grub_check_actor success

2024-01-29 16:23:18,894 - Client_IP:192.168.3.4 - USER_ID:0 - INFO - src.env_check.check_actor.env_check.high_important_dir_mount_check_actor

2024-01-29 16:23:18,894 - Client_IP:192.168.3.4 - USER_ID:0 - INFO - HighImportantDirMountCheckActor register success

xxxxxxxxxxxxxxxxx

2024-01-29 16:36:14,521 - Client_IP:192.168.3.4 - USER_ID:0 - UUID:d74fda75-be7e-11ee-bd85-08002774f1d0 - INFO - check results are re-saved: /opt/x2openEuler-upgrade/output/upgrade-check/d74fda75-be7e-11ee-bd85-08002774f1d0/check_result-d74fda75-be7e-11ee-bd85-08002774f1d0.json

2024-01-29 16:36:14,522 - Client_IP:192.168.3.4 - USER_ID:0 - UUID:d74fda75-be7e-11ee-bd85-08002774f1d0 - INFO - Upgrade results are re-saved: /opt/x2openEuler-upgrade/output/upgrade-check/d74fda75-be7e-11ee-bd85-08002774f1d0/upgrade-d74fda75-be7e-11ee-bd85-08002774f1d0.json

2024-01-29 16:36:14,522 - Client_IP:192.168.3.4 - USER_ID:0 - UUID:d74fda75-be7e-11ee-bd85-08002774f1d0 - INFO - check file conflicts finished

x2openEuler 下载的内容

[root@olnode01 database_2.0.0.630]# pwd
/etc/x2openEuler/database_2.0.0.630
[root@olnode01 database_2.0.0.630]# ls
centos6.8                         centos7.6                         centos8.2                         openEuler20.03-LTS-SP1
centos6.8-openEuler20.03-LTS-SP1  centos7.6-openEuler20.03-LTS-SP1  centos8.2-openEuler20.03-LTS-SP1
[root@olnode01 database_2.0.0.630]#

升级

image-20240129165226981

image-20240130101510811

image-20240130101527559

image-20240130101658030

image-20240130101718343

[root@mysqldb ~]# ps -ef|grep 4927
root      4927     1  0 10:15 ?        00:00:00 sh /opt/x2openEuler-upgrade/upgrade/8d884abd-3ee7-4894-a70c-dacafefce75b.sh
root      4931  4927  0 10:15 ?        00:00:00 sh /usr/lib/x2openEuler-upgrade/src/centos2openEuler.sh upgrade /opt/x2openEuler-upgrade/upgrade/upgrade-pkg.json /opt/x2openEuler/repo_files/migrate-x86.repo /usr,/run,/boot,/var,/etc empty_dir /.osbak crashkernel=512M,net.ifnames=1,biosdevname=0 /opt/x2openEuler-upgrade/pkg_download_dir
root      7434  6035  0 10:17 pts/0    00:00:00 grep --color=auto 4927

image-20240130102206790

升级到95%失败了

image-20240130104145240

  • 具体错误如下:
Running scriptlet: java-11-openjdk-headless-1:11.0.21.9-1.oe1.x86_64 1/1
Preparing : 1/1
Upgrading : java-11-openjdk-headless-1:11.0.21.9-1.oe1.x86_64 1/2Error unpacking rpm package java-11-openjdk-headless-1:11.0.21.9-1.oe1.x86_64
Verifying : java-11-openjdk-headless-1:11.0.21.9-1.oe1.x86_64 1/2
Verifying : java-11-openjdk-headless-1:11.0.21.0.9-1.el7_9.x86_6 2/2
Failed:
java-11-openjdk-headless-1:11.0.21.0.9-1.el7_9.x86_64
java-11-openjdk-headless-1:11.0.21.9-1.oe1.x86_64
Error: Transaction failed
[ ERROR ] - [initramfs]: dnf upgrade system error.
[ ERROR ] - [initramfs]: failed to upgrade your system.
[ ERROR ] - [initramfs]: failed to upgrade system.
[ ERROR ] - [x2openEuler-upgrade] - failed to upgrade system
6
##THE END##
  • 查看java包
[root@mysqldb ~]# rpm -qa|grep java
javapackages-tools-5.3.0-3.oe1.noarch
tzdata-java-2023c-1.el7.noarch
python3-javapackages-5.3.0-3.oe1.noarch
java-11-openjdk-11.0.21.9-1.oe1.x86_64
javapackages-filesystem-5.3.0-3.oe1.noarch
java-1.8.0-openjdk-headless-1.8.0.392.b08-2.oe1.x86_64
java-11-openjdk-devel-11.0.21.9-1.oe1.x86_64
java-11-openjdk-headless-11.0.21.0.9-1.el7_9.x86_64
  • 手动dnf安装依然失败
[root@mysqldb ~]# dnf install java-11-openjdk-headless-1:11.0.21.9-1.oe1.x86_64
Last metadata expiration check: 0:01:51 ago on Tue 30 Jan 2024 10:47:31 AM CST.
Dependencies resolved.
========================================================================================================================================
 Package                                   Architecture            Version                            Repository                   Size
========================================================================================================================================
Upgrading:
 java-11-openjdk-headless                  x86_64                  1:11.0.21.9-1.oe1                  local-repo                   39 M

Transaction Summary
========================================================================================================================================
Upgrade  1 Package

Total size: 39 M
Is this ok [y/N]: y
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Running scriptlet: java-11-openjdk-headless-1:11.0.21.9-1.oe1.x86_64                                                              1/1 
  Preparing        :                                                                                                                1/1 
  Upgrading        : java-11-openjdk-headless-1:11.0.21.9-1.oe1.x86_64                                                              1/2 
Error unpacking rpm package java-11-openjdk-headless-1:11.0.21.9-1.oe1.x86_64
  Verifying        : java-11-openjdk-headless-1:11.0.21.9-1.oe1.x86_64                                                              1/2 
  Verifying        : java-11-openjdk-headless-1:11.0.21.0.9-1.el7_9.x86_64                                                          2/2 

Failed:
  java-11-openjdk-headless-1:11.0.21.0.9-1.el7_9.x86_64                java-11-openjdk-headless-1:11.0.21.9-1.oe1.x86_64               

Error: Transaction failed

  • 怀疑是rpm包的问题,找到 local-repo /etc/yum.repos.d/migrate-x86_copy.repo
[local-repo]
name=local-repo
baseurl=file:///opt/x2openEuler-upgrade
enabled=1
gpgcheck=0
priority=1
  • 在升级包目录下找到该文件
[root@mysqldb x2openEuler-upgrade]# dnf list|grep headless
gdb-headless.x86_64                                     9.2-7.oe1                                 @local-repo                  
java-1.8.0-openjdk-headless.x86_64                      1:1.8.0.392.b08-2.oe1                     @local-repo                  
java-11-openjdk-headless.x86_64                         1:11.0.21.0.9-1.el7_9                     @System                      
java-1.8.0-openjdk-headless-slowdebug.x86_64            1:1.8.0.392.b08-2.oe1                     openEuler-2003-lts-sp1-update
java-1.8.0-openjdk-headless-slowdebug.x86_64            1:1.8.0.392.b08-2.oe1                     update                       
java-11-openjdk-headless.x86_64                         1:11.0.21.9-1.oe1                         local-repo                   
java-11-openjdk-headless-slowdebug.x86_64               1:11.0.21.9-1.oe1                         openEuler-2003-lts-sp1-update
java-11-openjdk-headless-slowdebug.x86_64               1:11.0.21.9-1.oe1                         update                       
java-latest-openjdk-headless.x86_64                     1:21.0.0.35-1.rolling.oe1                 openEuler-2003-lts-sp1-update
java-latest-openjdk-headless.x86_64                     1:21.0.0.35-1.rolling.oe1                 update                       

[root@mysqldb pkg_download_dir]# pwd
/opt/x2openEuler-upgrade/pkg_download_dir
[root@mysqldb pkg_download_dir]# ls -ltr|grep headless
-rw-r----- 1 root root  40215640 Nov 17 18:53 java-1.8.0-openjdk-headless-1.8.0.392.b08-2.oe1.x86_64.rpm
-rw-r----- 1 root root  41329520 Nov 24 20:02 java-11-openjdk-headless-11.0.21.9-1.oe1.x86_64.rpm
-rw-r----- 1 root root   3275392 Dec  1 18:49 gdb-headless-9.2-7.oe1.x86_64.rpm

从镜像中找到这个文件进行对比

https://mirrors.aliyun.com/openeuler/openEuler-20.03-LTS-SP1/update/x86_64/Packages/?spm=a2c6h.25603864.0.0.3a6a6442zyi3bb

image-20240130112509168

对比结果却是一致的

[root@mysqldb pkg_download_dir]# md5sum java-11-openjdk-headless-11.0.21.9-1.oe1.x86_64.rpm
cbf9a124d6278edb59e0dd4dac20b39a  java-11-openjdk-headless-11.0.21.9-1.oe1.x86_64.rpm
[root@mysqldb pkg_download_dir]# md5sum /tmp/java-11-openjdk-headless-11.0.21.9-1.oe1.x86_64.rpm 
cbf9a124d6278edb59e0dd4dac20b39a  /tmp/java-11-openjdk-headless-11.0.21.9-1.oe1.x86_64.rpm

回退

找不到原因,先回退了

image-20240130113948844

image-20240130114044017

image-20240130141319885

image-20240130141815462

删除掉java*

[root@mysqldb yum.repos.d]# rpm -qa|grep -i java
javapackages-tools-3.4.1-11.el7.noarch
tzdata-java-2023c-1.el7.noarch
python-javapackages-3.4.1-11.el7.noarch
java-11-openjdk-devel-11.0.21.0.9-1.el7_9.x86_64
java-11-openjdk-11.0.21.0.9-1.el7_9.x86_64
java-11-openjdk-headless-11.0.21.0.9-1.el7_9.x86_64
[root@mysqldb yum.repos.d]# yum remove java-11*
Loaded plugins: fastestmirror, langpacks, priorities
Resolving Dependencies
--> Running transaction check
---> Package java-11-openjdk.x86_64 1:11.0.21.0.9-1.el7_9 will be erased
---> Package java-11-openjdk-devel.x86_64 1:11.0.21.0.9-1.el7_9 will be erased
---> Package java-11-openjdk-headless.x86_64 1:11.0.21.0.9-1.el7_9 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

===============================================================================================================================
 Package                                Arch                 Version                              Repository              Size
===============================================================================================================================
Removing:
 java-11-openjdk                        x86_64               1:11.0.21.0.9-1.el7_9                @updates               578 k
 java-11-openjdk-devel                  x86_64               1:11.0.21.0.9-1.el7_9                @updates               5.2 M
 java-11-openjdk-headless               x86_64               1:11.0.21.0.9-1.el7_9                @updates               164 M

Transaction Summary
===============================================================================================================================
Remove  3 Packages

Installed size: 170 M
Is this ok [y/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Erasing    : 1:java-11-openjdk-devel-11.0.21.0.9-1.el7_9.x86_64                                                          1/3 
  Erasing    : 1:java-11-openjdk-11.0.21.0.9-1.el7_9.x86_64                                                                2/3 
  Erasing    : 1:java-11-openjdk-headless-11.0.21.0.9-1.el7_9.x86_64                                                       3/3 
  Verifying  : 1:java-11-openjdk-headless-11.0.21.0.9-1.el7_9.x86_64                                                       1/3 
  Verifying  : 1:java-11-openjdk-11.0.21.0.9-1.el7_9.x86_64                                                                2/3 
  Verifying  : 1:java-11-openjdk-devel-11.0.21.0.9-1.el7_9.x86_64                                                          3/3 

Removed:
  java-11-openjdk.x86_64 1:11.0.21.0.9-1.el7_9                    java-11-openjdk-devel.x86_64 1:11.0.21.0.9-1.el7_9          
  java-11-openjdk-headless.x86_64 1:11.0.21.0.9-1.el7_9          

Complete!
[root@mysqldb yum.repos.d]# rpm -qa|grep -i java
javapackages-tools-3.4.1-11.el7.noarch
tzdata-java-2023c-1.el7.noarch
python-javapackages-3.4.1-11.el7.noarch
[root@mysqldb yum.repos.d]# rpm -qa|grep -i jdk
copy-jdk-configs-3.3-10.el7_5.noarch

重新初始化升级

image-20240130151235346

image-20240130151250594

image-20240130154752469

升级成功

这次顺利完成升级步骤

image-20240130155003552

升级后环境检查

开始检查

image-20240130155020143

检查进行中

image-20240130155053454

检查结束

image-20240130155202573

登陆OS查看

[root@mysqldb ~]# cat /etc/os-release 
NAME="openEuler"
VERSION="20.03 (LTS-SP1)"
ID="openEuler"
VERSION_ID="20.03"
PRETTY_NAME="openEuler 20.03 (LTS-SP1)"
ANSI_COLOR="0;31"

[root@mysqldb ~]# cd /.osbak/
[root@mysqldb .osbak]# du -sh *
153M    boot
64M     etc
11M     opt
20K     root
61M     run
2.7M    tools
7.3G    usr
1.4G    var
[root@mysqldb .osbak]#

清理环境

image-20240130155305737

image-20240130155455655

image-20240130155505037

检查 MySQL 是否能正常启动

[root@mysqldb .osbak]# du -sh *
153M    boot
64M     etc
11M     opt
20K     root
61M     run
2.7M    tools
7.3G    usr
1.4G    var
[root@mysqldb .osbak]# du -sh *
du: cannot access '*': No such file or directory
[root@mysqldb .osbak]# cd /tmp
[root@mysqldb tmp]# cd /.o
-bash: cd: /.o: No such file or directory
[root@mysqldb tmp]# /etc/init.d/mysqld start
Starting MySQL. SUCCESS! 
[root@mysqldb tmp]# ps -ef|grep mysql
avahi        880       1  0 15:48 ?        00:00:00 avahi-daemon: running [mysqldb.local]
root        8076       1  0 15:55 pts/0    00:00:00 /bin/sh /usr/local/mysql/bin/mysqld_safe --datadir=/data/mysql/3306/data --pid-file=/usr/local/mysql/mysql.pid
mysql       8659    8076  5 15:55 pts/0    00:00:00 /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --datadir=/data/mysql/3306/data --plugin-dir=/usr/local/mysql/lib/plugin --user=mysql --log-error=/data/mysql/3306/log/error.log --pid-file=/usr/local/mysql/mysql.pid --socket=/usr/local/mysql/mysql.sock --port=3306
root        8689    7806  0 15:55 pts/0    00:00:00 grep --color=auto mysql
[root@mysqldb tmp]# mysql -uroot
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.43-log MySQL Community Server (GPL)

Copyright (c) 2000, 2023, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

root@localhost 15:55:44 [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| sys                |
| world              |
+--------------------+
5 rows in set (0.00 sec)

​ 至此,centos7.8 升级到 openEuler 20.03-LTS-SP1 完成。整个升级过程如果顺利的话,并不需要多少人工介入,其中回退功能则十分方便的在出问题的时候进行回滚操作,赞一个~~

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1423259.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

Spring AOP原理的常见面试题

Spring AOP原理的常见面试题 .Spring AOP是怎么实现的什么是代理模式静态代理动态代理怎么实现的JDK动态代理CGLIB动态代理引入依赖 JDK与CJLIB的区别什么时候使用JDK与CJLIB . Spring AOP是怎么实现的 答:Spring AOP是通过动态代理来实现AOP的 什么是代理模式 答:代理模式也…

C++数据结构与算法——链表

C第二阶段——数据结构和算法&#xff0c;之前学过一点点数据结构&#xff0c;当时是基于Python来学习的&#xff0c;现在基于C查漏补缺&#xff0c;尤其是树的部分。这一部分计划一个月&#xff0c;主要利用代码随想录来学习&#xff0c;刷题使用力扣网站&#xff0c;不定时更…

LeetCode 834. 树中距离之和

简单换根DP 其实就是看好变化量&#xff0c;然后让父亲更新儿子就好了&#xff5e; 上图2当根节点的时候&#xff0c;ans[2] ans[0] -sz[2]n-sz[2]; class Solution { public:vector<int> sumOfDistancesInTree(int n, vector<vector<int>>& edges) {v…

OCP NVME SSD规范解读-8.SMART日志要求-2

SMART-7&#xff1a; 软错误ECC计数可能是记录了被第一级ECC&#xff08;比如LDPC Hard Decode&#xff09;成功纠正过的读取错误次数。这意味着数据恢复成功&#xff0c;但依然表明存储介质出现了某种程度上的可靠性下降。 LDPC码是一种基于稀疏矩阵的纠错码&#xff0c;它由…

鸿蒙会取代Android吗?听风就是雨

现在说取代还谈不上&#xff0c;毕竟这需要时间。安卓作为全球第一的手机操作系统&#xff0c;短时间内还无法取代。持平iOS甚至超过iOS有很大可能&#xff0c;最终会呈现“三足鼎立”有望超过安卓基数。 作为全新的鸿蒙操作系统&#xff0c;其现在已经是全栈自研底座。按照鸿…

【前端工程化】环境搭建 nodejs npm

文章目录 前端工程化是什么&#xff1f;前端工程化实现技术栈前端工程化环境搭建 &#xff1a;什么是Nodejs如何安装nodejsnpm 配置和使用npm 介绍npm 安装和配置npm 常用命令 总结 前端工程化是什么&#xff1f; 前端工程化是使用软件工程的方法来单独解决前端的开发流程中模块…

模拟电路之运放

滞回比较器&#xff1a; 小幅度波动时候不受影响&#xff0c;除非超过一点范围 当输入信号慢慢增加到UT&#xff0c;就变成负电压 当输入信号慢慢减压到—UT&#xff0c;就变成正电压 电路反向接信号 正反馈&#xff0c;串联电阻接地 调整回差的方法 1.调整电阻的分压 2.…

python实现贪吃蛇小游戏(附源码)

文章目录 导入所需的模块坐标主游戏循环模块得分 贪吃蛇小游戏&#xff0c;那个曾经陪伴着00后和90后度过无数欢笑时光的熟悉身影&#xff0c;仿佛是一把打开时光之门的钥匙。它不仅是游戏世界的经典之一&#xff0c;更是我们童年岁月中不可或缺的一部分&#xff0c;一个承载回…

使用宝塔面板访问MySQL数据库

文章目录 前言一、安装访问工具二、查看数据库总结 前言 前面我们已经部署了前后端项目&#xff0c;但是却不能得到数据库的信息&#xff0c;看有谁再使用你的项目。例如员工、用户等等。本次博客进行讲解如何在宝塔面板里面访问MySQL数据库。 一、安装访问工具 1、打开软件商…

微信小程序(二十六)列表渲染基础核心

注释很详细&#xff0c;直接上代码 上一篇 新增内容&#xff1a; 1.列表渲染基础写法 2.外部索引和自身索引 源码&#xff1a; index.wxml <view class"students"><view class"item"><text>序号</text><text>姓名</text…

C++-内存管理(1)

1. C/C内存分布 首先我们需要知道&#xff0c;在C中的内存分为5个区。 1. 栈 又叫堆栈 -- 非静态局部变量 / 函数参数 / 返回值等等&#xff0c;栈是向下增长的。 2. 内存映射段 是高效的 I/O 映射方式&#xff0c;用于装载一个共享的动态内存库。用户可使用系统接口 创建…

微调入门篇:大模型微调的理论学习

1、为什么大模型微调 之前在《大模型这块蛋糕,想吃吗》介绍了普通人如何搭上大模型这块列车, 其中有一个就是模型微调,这个也是未来很多IT公司需要发力的方向,以及在《垂直领域大模型的应用更亲民》中论述了为什么微调适合大家,以及微调有什么价值? 作为小程序猿在开始进行微…

C#,打印漂亮的贝尔三角形(Bell Triangle)的源程序

以贝尔数为基础&#xff0c;参考杨辉三角形&#xff0c;也可以生成贝尔三角形&#xff08;Bell triangle&#xff09;&#xff0c;也称为艾特肯阵列&#xff08;Aitkens Array&#xff09;&#xff0c;皮埃斯三角形&#xff08;Peirce Triangle&#xff09;。 贝尔三角形的构造…

常用抓包软件集合(Fiddler、Charles)

1. Fiddler 介绍&#xff1a;Fiddler是一个免费的HTTP和HTTPS调试工具&#xff0c;支持Windows平台。它可以捕获HTTP和HTTPS流量&#xff0c;并提供了丰富的调试和分析功能。优点&#xff1a;易于安装、易于使用、支持多种扩展、可以提高开发效率。缺点&#xff1a;只支持Wind…

Linux内核源码

记得看目录哦&#xff01; 1. 为什么要阅读Linux内核2. Linux0.01内核源码3. 阅读linux内核源码技巧4. linux升级内核5. linux的备份和恢复5.1 安装dump和restore5.2 使用dump完成备份5.3 使用restore完成恢复 1. 为什么要阅读Linux内核 2. Linux0.01内核源码 3. 阅读linux内核…

dvwa靶场xss储存型

xss储存型 xxs储存型lowmessage框插入恶意代码name栏插入恶意代码 medium绕过方法 high xxs储存型 攻击者事先将恶意代码上传或储存到漏洞服务器中&#xff0c;只要受害者浏览包含此恶意代码的页面就会执行恶意代码。产生层面:后端漏洞特征:持久性的、前端执行、储存在后端数据…

刨析数据结构(一)

&#x1f308;个人主页&#xff1a;小田爱学编程 &#x1f525; 系列专栏&#xff1a;数据结构————"带你无脑刨析" &#x1f3c6;&#x1f3c6;关注博主&#xff0c;随时获取更多关于数据结构的优质内容&#xff01;&#x1f3c6;&#x1f3c6; &#x1f600;欢迎…

【百度Apollo】轨迹绘制:探索路径规划和可视化技术的应用

&#x1f3ac; 鸽芷咕&#xff1a;个人主页 &#x1f525; 个人专栏: 《linux深造日志》《粉丝福利》 ⛺️生活的理想&#xff0c;就是为了理想的生活! ⛳️ 推荐 前些天发现了一个巨牛的人工智能学习网站&#xff0c;通俗易懂&#xff0c;风趣幽默&#xff0c;忍不住分享一下…

element -table,多行或列合并

需求&#xff1a;后端返回的表格数据&#xff0c;如果某列值一样&#xff0c;前端表格样式需要合并他们&#xff0c;需要合并的列的行数未知&#xff08;所以需要有数据后遍历后端数据对需要合并的属性进行计数&#xff09;即动态遍历表格合并 效果 - 重点方法&#xff1b;ta…

html+css+js 我的学校网页设计与制作实例(6个页面)

一、作品介绍 HTMLCSSJS网页设计与制作&#xff0c;我的学校网页设计与制作实例&#xff0c; 本实例适合于初学HTMLCSSJS的同学。该案例里面有divcss的样式布局设置&#xff0c;这个实例比较全面&#xff0c;有一级页、二级页、详情页、输入表单等&#xff0c;共6个页面。本文…