当前位置: 首页 > news >正文

centos 7.9 迁移到 openEuler22.03-LTS-SP3

openEuler移植案例 | 移植操作指南 | openEuler社区官网

  cat /etc/redhat-release 
CentOS Linux release 7.9.2009 (Core)

需要两台机器,

不通过原因 在待升级节点检查是否有安装x2openEuler-core时, 发现已经安装了,不能作为升级节点。该节点为:

解决方案 请到待升级节点使用‘rpm -qa | grep x2openEuler-core’命令检查是否有安装包, 请换一台机器

下载x2openEuler-core-3.0.0-20240125.x86_64.rpm

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

 更换阿里yum源

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
curl -s -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
curl -s -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.reposed -i -e '/mirrors.cloud.aliyuncs.com/d' -e '/mirrors.aliyuncs.com/d' /etc/yum.repos.d/CentOS-Base.repo

 使用mariadb,需要先设置密码

[root@localhost ~]# cd /usr/local/x2openEuler/portal/service/[root@localhost service]# ll
total 84
-rwxr-x---. 1 root root 14616 Jan 25  2024 change_ip_x2openEuler.sh
-rwxr-x---. 1 root root    57 Jan 25  2024 const.conf
-rwxr-x---. 1 root root  1897 Jan 25  2024 delete_file.sh
-rwxr-x---. 1 root root   579 Jan 25  2024 gunicorn_x2openEuler.service
-rwxr-x---. 1 root root  6143 Jan 25  2024 mariadb.sh
-rwxr-x---. 1 root root   591 Jan 25  2024 nginx_x2openEuler.service
-rwxr-x---. 1 root root   784 Jan 25  2024 service_daemon.sh
-rwxr-x---. 1 root root   237 Jan 25  2024 service_gunicorn.sh
-rwxr-x---. 1 root root 16497 Jan 25  2024 service_init.sh
-rwxr-x---. 1 root root  3237 Jan 25  2024 service_nginx.sh
-rwxr-x---. 1 root root  1614 Jan 25  2024 set_ssh_host_key_check_config.sh
-rwxr-x---. 1 root root  3107 Jan 25  2024 update_db_pwd.sh
-rwxr-x---. 1 root root   828 Jan 25  2024 upgrade_migrate_data.sh[root@localhost service]# yum install mariadb -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile* base: mirrors.bupt.edu.cn* extras: mirrors.bupt.edu.cn* updates: mirrors.bupt.edu.cn
Package 1:mariadb-5.5.68-1.el7.x86_64 already installed and latest version
Nothing to do
[root@localhost service]# systemctl enable mariadb --now
[root@localhost service]# systemctl status mariadb
● mariadb.service - MariaDB database serverLoaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)Active: active (running) since Mon 2024-08-19 04:55:43 CST; 2min 30s agoMain PID: 1503 (mysqld_safe)CGroup: /system.slice/mariadb.service├─1503 /bin/sh /usr/bin/mysqld_safe --basedir=/usr└─1669 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --log-error=/var/l...[root@localhost service]# mysql -uroot 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 9
Server version: 5.5.68-MariaDB MariaDB ServerCopyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.MariaDB [(none)]> 
MariaDB [(none)]> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -ADatabase changed
MariaDB [mysql]> update user set Password = password('*') where user ='root';
Query OK, 4 rows affected (0.00 sec)
Rows matched: 4  Changed: 4  Warnings: 0MariaDB [mysql]> 
MariaDB [mysql]> flush privileges;
Query OK, 0 rows affected (0.00 sec)MariaDB [mysql]> \q
Bye
[root@localhost 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) Y
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
Ip address list:
sequence_number         ip_address              device
[1]             	10.8.8.7       	ens33
Enter the sequence number of listed ip as web server ip(default: 1): 
Set the web server IP address 10.8.8.7
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
To ensure successful running of the tool, enable the web service port and reload the configuration as follows:1.Enable the web service port: firewall-cmd --add-port=18082/tcp --permanent2.Reload the configuration: firewall-cmd --reload3.Check whether the port is enabled: firewall-cmd --query-port=18082/tcp
Are you agree to run the above command to enable the port?(y/n,default:y)
Port 18082 is enabled successfully.
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... OKApplying contenttypes.0002_remove_content_type_name... OKApplying auth.0001_initial... OKApplying auth.0002_alter_permission_name_max_length... OKApplying auth.0003_alter_user_email_max_length... OKApplying auth.0004_alter_user_username_opts... OKApplying auth.0005_alter_user_last_login_null... OKApplying auth.0006_require_contenttypes_0002... OKApplying auth.0007_alter_validators_add_error_messages... OKApplying auth.0008_alter_user_username_max_length... OKApplying auth.0009_alter_user_last_name_max_length... OKApplying auth.0010_alter_group_name_max_length... OKApplying auth.0011_update_proxy_permissions... OKApplying auth.0012_alter_user_first_name_max_length... OKApplying certificatemanager.0001_initial... OKApplying config.0001_initial... OKApplying operationlogmanager.0001_initial... OKApplying sessions.0001_initial... OKApplying taskmanager.0001_initial... OKApplying usermanager.0001_initial... OKApplying 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://10.8.8.7:18082/x2openEuler/#/login

 https://10.8.8.7:18082/x2openEuler/#/login

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"
 


http://www.mrgr.cn/news/5433.html

相关文章:

  • 微信小程序电脑端和开发工具端能访问,但是手机端访问不了
  • TypeScript中的接口(Interface):对象类型的强大工具
  • 用py获取显卡的占用率
  • 全套安全帽佩戴检测算法源码与实战应用分享
  • Swift语言服务器协议(LSP)深度解析:开启Swift开发的新篇章
  • JWT-JSON Web Token
  • 成本效益分析:观测云投资的回报
  • GTK的表格宽度调节
  • 记录一个变量溢出的bug
  • Docker的概述及如何启动docker的镜像、远程管理宿主机的docker进程
  • ubuntu x86_64系统上安装运行aarch系统的虚拟机
  • C++:病毒系列回归记2/3 (Doge智能系统已上线)
  • Spring Boot 实现全局异常处理
  • Keil C51 插件 检测所有if语句
  • python——数据分析
  • 七种常见的排序算法和实现
  • SQL SERVER日常表碎片和统计信息优化脚本
  • 多个pdf怎么合并成一个pdf?介绍10个pdf合并成一个pdf免费版软件(近期更新)
  • 78、 ansible----playbook
  • 鸿蒙ArkTs使用axios发起网络请求并对请求参数加密