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

news2024/9/20 9:09:07

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.rpm


 yum 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.repo
 
sed -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 server
   Loaded: 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 ago
 Main 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 Server

Copyright (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 -A

Database 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: 0

MariaDB [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 --permanent
   2.Reload the configuration: firewall-cmd --reload
   3.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... 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://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.coloradmin.cn/o/2052186.html

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

相关文章

开发日记:Object-c 中的 NSString 和 NSMutableString的常用方法

今天讲不可变数组 NSArray 可变数组 NSMutableArray。话不多说,直接上干货。 oc中的数组 可变数组 NSMutableArray使用初始化方法创建可变数组使用便利构造器创建可变数组可变数组追加元素可变数组追加一个不可变数组可变数组删除一个元素可变数组删除指定下标的元素…

IPD推行成功的核心要素(十七)矩阵型组织架构设计实现多组织协同以便快速抓取市场机会

随着企业规模不断增长,业务越来越复杂,组织架构对企业高效运作的影响也越来越大。加之企业所处的市场环境瞬息万变,机会稍纵即逝。传统金字塔型的组织架构,完全无法满足这样快速灵活的要求。而IPD体系设计了产品线(IPM…

decoy靶机复现

靶机设置 设置网卡ens33 设置靶机为NAT模式 靶机IP发现 nmap 192.168.112.0/24 靶机ip为192.168.112.149 端口扫描 nmap 192.168.112.149 -p- -sV -O -Pn 访问浏览器 默认是8080,需要更改为80端口 下载好之后发现解压需要密码 破解密码 将该安装包放到kali中…

配置Prettier+Vscode setting提高前端开发效率

前言 大家好,上一篇一文读懂 系列的文章中我们介绍了前端的代码格式化校验工具ESLient。代码格式是进行自动校验了,但你还要一个个的微调,很麻烦不是吗? 本文介绍和ESLient配合使用的Prettier实现编译器自动将代码格式化。 同时也…

Nat Methods编委:积极探索AI与生物学交叉的高质量基于人工智能方法的论文发表|顶刊速递·24-08-19

小罗碎碎念 今天分享的这篇文献(特刊)发表于《Nat Methods》,目前IF36.1。 分享这篇文献是临时做的决定,因为在朋友圈看到有关这篇特刊的介绍,对标题很感兴趣,所以我立刻找到对应的文章来详细分析一下。 在…

Leetcode JAVA刷刷站(35)搜索插入位置

一、题目概述 二、思路方向 为了实现这一功能,我们可以使用二分查找的变种来找到目标值或确定其应插入的位置。在二分查找过程中,我们不仅检查中间元素是否等于目标值,还根据比较结果更新搜索的上下界。如果目标值大于中间元素,则…

一文带你从源码中学习那些实用的位运算技巧

写在文章开头 众所周知位运算执行效率高于常规运算,通过不同的位运算搭配可以让我们写出简洁高效的代码表达式,所以本文从各大开源项目的源码中介绍一下各类运算技巧及其使用场景。 Hi,我是 sharkChili ,是个不断在硬核技术上作死的 java coder ,是 CSDN的博客专家 ,也是…

【体检】程序人生之健康检查,全身体检与预防疫苗,五大传染病普筛,基因检测等

程序员养生指南之 【体检】程序人生之健康检查,全身体检项目分类,五大传染病普筛,基因检测等 文章目录 一、全身体检与预防疫苗(年检)1、实验室检测:生化全套检查2、医技检查:辅助诊疗科室3、科…

【Python实现禁用任务管理器】

效果展示: 代码及解析: 提示:使用pyinstaller打包可以避免弹窗,食用更佳哦 提示(2):运行后要等待一段时间再关机哦 禁用代码: 要禁止任务管理器关闭 Python 程序,可以通过修改注册表来实现。以…

【OpenCV_python】凸包检测 轮廓特征 直方图均衡化 模板匹配 霍夫变换

凸包特征检测 凸包就是图像的最小外接多边形,通过图像的轮廓点,找到距离最远的两个点的直线,根据直线找到距离最远的下一个点,直到所有的点被包围在多边形内 读取图像二值化找图像的轮廓获取凸包点的坐标绘制凸包点 convexHull 获…

bilibiliDown-纯净B站视频解析提取工具

软件简介 bilibiliDown是一款简洁好用的B站视频下载工具,支持由UP主上传的单集,多集以及相关封面,弹幕,字幕,音乐,刮削等等,支持任意粒度批量组合,登录后支持到1080P,大…

Git Merge 实例教学:同步代码库与处理分支冲突的最佳实践

文章目录 前言一、git merge是什么?二、git merge基本用法1. 合并两个分支2. 合并时创建合并提交3. 快进合并(Fast-forward Merge)4. --abort参数5. --continue参数6. -X theirs参数 三、实际例子1. 更新仓库2. 将origin/main分支合并到当前分…

podman安装过程记录

最近注意到podman兼容docker镜像包,于是好奇心的驱动下,研究了一下 本来以为podman的desktop跟docker一样,最后发现podman桌面版是轻量级的,还需要安装podman的服务(当然,是支持直接通过它的桌面版来安装其…

Linux系统中用户、用户组及文件权限的常用知识汇总

Linux为多用户多任务的操作系统,文件权限管理十分重要,每一个文件都有很多属性,合理的权限设置,可以确保数据不被未授权的人员访问,同时也能提高系统安全性。 本文将介绍Linux系统中用户、用户组及文件权限的常用知识…

【C++二分查找 前缀和 】1292. 元素和小于等于阈值的正方形的最大边长

本文涉及的基础知识点 C二分查找 C算法:前缀和、前缀乘积、前缀异或的原理、源码及测试用例 包括课程视频 LeetCode1292. 元素和小于等于阈值的正方形的最大边长 给你一个大小为 m x n 的矩阵 mat 和一个整数阈值 threshold。 请你返回元素总和小于或等于阈值的正…

C++ 设计模式——策略模式

策略模式 策略模式主要组成部分例一:逐步重构并引入策略模式第一步:初始实现第二步:提取共性并实现策略接口第三步:实现具体策略类第四步:实现上下文类策略模式 UML 图策略模式的 UML 图解析 例二:逐步重构…

主成分分析SPSS步骤+Matlab程序

SPSS 导入数据 主成分分析 参数设置 选择要压缩的变量 输出结果 越陡说明信息差越大,反之信息差越小 导出数据 双击可以复制 粘贴到matlab 计算 Matlab clc,clear data readmatrix(例2.xlsx); %将数据保存在txt文件中 data zscore(data); %数据的标准化 …

使用java加载、调用onnx模型(二)

目录 1、摘要 2、实现过程 2.1、依赖 2.2、imread 2.3、contiguous函数 2.3.1、转化示例 2.3.3、核心代码 2.4、Flatten拉直 2.5、最终结果 3、完整代码 1、摘要 在上一篇文章中 使用java加载、调用onnx模型_onnx java-CSDN博客 发现使用Java加载调用模型的分类结…

计算组合数:从n个不同元素中,选k个元素的方式数量math.comb()

【小白从小学Python、C、Java】 【考研初试复试毕业设计】 【Python基础AI数据分析】 计算组合数: 从n个不同元素中, 选k个元素的方式数量 math.comb() 请问关于以下代码表述正确的选项是? import math print("【执行】math.comb(3, 2)…

线性代数证明:把行列式的某一行(列)的k倍加到另一行(列),行列式的值不变

线性代数证明 把行列式的某一行(列)的k倍加到另一行(列),行列式的值不变: 注意五角星的位置要用到另一条性质:若行列式的某一行(列)的元素都是两数之和,则可以…