长期支持版本

    社区创新版本

      安装指南

      环境要求

      操作系统要求

      • x2openEuler web 工具部署要求如 表 1 所示。

        表 1 操作系统要求

        部署环境描述
        • CentOS 7.6
        • openEuler 20.03-LTS-SPx
        • openEuler 22.03-LTS-SPx
        • openEuler 24.03-LTS-SPx
        • 保持与待升级节点连接的内部网络联通
        • 操作系统软件包应当更新至最新版本
        • 操作系统防火墙应设置安全策略
        • 部署环境最好为非生产环境
        • 操作系统密码应当符合密码安全规范且定期更新
      • 待升级节点操作系统要求如 表 2 所示。

        表 2 操作系统要求

        待升级操作系统升级目标操作系统
        • CentOS 6.x
        • CentOS 7.x
        • CentOS 8.x
        • Ubuntu 18.04
        • openEuler 20.03-LTS-SPx
        • openEuler 22.03-LTS-SPx
        • openEuler 20.03-LTS-SPx
        • openEuler 22.03-LTS-SPx
        • openEuler 24.03-LTS-SPx
          (当前暂不支持 Ubuntu 18.04 升级至 openEuler 24.03-LTS-SPx)

      硬件要求

      部署 x2openEuler web 工具硬件要求如 表 3 所示。

      表 3 硬件要求

      硬件类型说明
      服务器
      • x86 服务器
      • 基于鲲鹏 916/920 的服务器
      CPU四核 2.5GHz 及以上(8 核心及以上)
      内存系统空闲内存要求 16GB 及以上
      安装空间20GB 及以上剩余空间

      说明: 待升级节点无特别要求,但需要保持内存在 2GB 及以上,否则会导致升级因内存不足而失败。

      获取软件包

      安装过程中所需软件包如 表 4 所示。

      表 4 获取工具软件包

      软件包名称软件包说明获取方法
      • x86 服务器:x2openEuler-core-x.x.x-xx.x86_64.rpm
      • 基于鲲鹏 916/920 的服务器:x2openEuler-core-x.x.x-xx.aarch64.rpm
      x2openEuler 工具安装包oepkgs 社区获取软件包

      说明:

      • 软件包名称中的 “x.x.x” 表示版本号。
      • 软件包中包含有针对待升级节点的分析工具接口。

      软件数字签名验证

      为了防止软件包在传递过程或存储期间被恶意篡改,下载软件包时需下载对应的数字签名文件用于完整性验证。

      在软件包下载之后,请参考《OpenPGP 签名验证指南》,对从社区站点获取的软件包进行 PGP 数字签名校验。如果校验失败,请不要使用该软件包,重新从社区网站获取即可。

      使用软件包安装/升级之前,也需要按上述过程先验证软件包的数字签名,确保软件包未被篡改。

      运营商客户请访问:PGP Verify

      企业客户请访问:PGP Verify

      安装

      前提条件

      • 已获取 x2openEuler 工具安装包。
      • 已安装远程 SSH 登录工具,如 Xshell、MobaXterm、PuTTY 等。
      • 已安装 sftp 工具。
      • 待升级环境可以通过网络访问本地配置的 CentOS yum 源 。
      • 工具安装环境需开启工具端口。

      操作步骤

      1. 此处以在 x86 环境上安装 x2openEuler 工具为例,使用 sftp 工具将安装包 x2openEuler-core-x.x.x-xx.x86_64.rpm 上传至远程服务器的 /root 目录下。

      2. 使 SSH 远程登录工具登录至需要远程服务器命令行界面。

      3. 执行以下命令安装 x2openEuler 工具。

        yum install -y /root/x2openEuler-core-x.x.x-xx.x86_64.rpm
        
      4. 工具包安装成功后,执行以下命令启动 web 服务。

        说明:

        • 如 web 服务受 SELinux 策略无法正常运行,请更改 SELinux 策略或 关闭 SELinux
        • 如 web 服务需停止或重启请参考 启动/停止/重启服务
        • 首次启动服务时,需要配置 MariaDB 用户密码。密码需要满足如下复杂度要求:
          • 密码长度为 8~32 个字符
          • 必须包含大写字母、小写字母、数字、特殊字符(`~!@#$%^&*()-_=+\|[{}];:'",<.>/?)中的两种及以上类型的组合
          • 密码不能包含空格
          • 密码不能是用户名
          • 密码不能在 弱口令字典
        • 建议对数据库 x2openEuler 用户密码定期进行修改,确保业务安全运行。
        • 如本地已存在 MariaDB 数据库,建议更新 MariaDB 到最新版本,并禁止远程访问数据库。

        手动安装

        cd /usr/local/x2openEuler/portal/service
        bash service_init.sh
        

        根据回显交互信息提示完成服务启动配置。

        1. 配置数据库。

          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) 
          Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.
          MariaDB is active.
          
          NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
                SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!
          
          In order to log into MariaDB to secure it, we'll need the current
          password for the root user.  If you've just installed MariaDB, and
          you haven't set the root password yet, the password will be blank,
          so you should just press enter here.
          
          Enter current password for root (enter for none):
          OK, successfully used password, moving on...
          
          Setting the root password ensures that nobody can log into the MariaDB
          root user without the proper authorisation.
          
          You already have a root password set, so you can safely answer 'n'.
          
          Change the root password? [Y/n] n
           ... skipping.
          
          By default, a MariaDB installation has an anonymous user, allowing anyone
          to log into MariaDB without having to have a user account created for
          them.  This is intended only for testing, and to make the installation
          go a bit smoother.  You should remove them before moving into a
          production environment.
          
          Remove anonymous users? [Y/n] y
           ... Success!
          
          Normally, root should only be allowed to connect from 'localhost'.  This
          ensures that someone cannot guess at the root password from the network.
          
          Disallow root login remotely? [Y/n] y
           ... Success!
          
          By default, MariaDB comes with a database named 'test' that anyone can
          access.  This is also intended only for testing, and should be removed
          before moving into a production environment.
          
          Remove test database and access to it? [Y/n] y
           - Dropping test database...
           ... Success!
           - Removing privileges on test database...
           ... Success!
          
          Reloading the privilege tables will ensure that all changes made so far
          will take effect immediately.
          
          Reload privilege tables now? [Y/n] y
           ... Success!
          
          Cleaning up...
          
          All done!  If you've completed all of the above steps, your MariaDB
          installation should now be secure.
          
          Thanks for using MariaDB!
          
          success
          
        2. 配置 x2openEuler 服务。

          • 配置数据库用户 x2openEuler 密码。
          • 配置是否启用 SSH 身份验证。
          • 配置 Web Server 的 IP 地址。
          • 配置 HTTPS 端口,默认端口为 18082。
          • 配置 GUNICORN 端口,默认端口为 18080。
          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)
          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]                     x.x.x.x                 enp1s0
          Set the web server IP address x.x.x.x
          Set the HTTPS port 18082
          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
          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
          ...
          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
          ...
          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.
          Desktop icon created successfully.
          Web console is now running, go to: <https://x.x.x.x:18082/x2openEuler/#/login>
          

        静默安装

        工具也支持一键式地启动服务,采用默认配置。在执行静默安装前,需要先修改配置文件 /usr/local/x2openEuler/portal/service/silent_installation.conf,配置文件的内容如下:

        root_password =
        x2openEuler_password =
        

        root_passwordx2openEuler_password 分别是数据库用户 root 和 x2openEuler 的密码。

        然后执行如下命令启动服务:

        cd /usr/local/x2openEuler/portal/service
        bash service_init.sh true
        

        说明: 如果在已经安装过 x2openEuler-core 的环境上重新安装时,需要注意 root_passwordx2openEuler_password 应该填写之前设置过的密码。

      验证

      web 模式下验证安装结果

      登录 Web 界面,详细步骤请参见 登录 x2openEuler 工具 Web 界面,能够成功登录说明 x2openEuler 工具安装成功。

      CLI 模式下验证安装结果

      1. 使用 SSH 远程登录工具,进入 x2openEuler 工具部署节点命令行界面。

      2. 执行如下命令查看版本信息。

        rpm -qa x2openEuler-core
        

        显示如下格式内容说明安装成功(其中 “x.x.x-x” 表示版本号,请以实际情况为准)。

        x2openEuler-core-x.x.x-x.x86_64
        

      升级

      前提条件

      • 已将所需升级的迁移工具的软件包下载到本地,并确认软件包与服务器硬件平台一致。

        获取软件包后,需要校验软件包,确保与网站上的原始软件包一致,详细步骤请参见 软件数字签名验证

      • 升级前请确认 x2openEuler 工具可以正常使用。

      • 工具默认安装在 /usr/local/x2openEuler 目录,升级前请确认安装空间充足。

      操作步骤

      1. 使用 SSH 远程登录工具,进入 Linux 操作系统命令行界面。

      2. 将 x2openEuler 工具软件包传输至服务器自定义目录下,执行以下命令进行升级。

        cd 自定义目录
        rpm -Uvh x2openEuler-core-x.x.x-xx.x86_64.rpm
        
      3. 根据提示,进入 /usr/local/x2openEuler/portal/service 目录,执行 upgrade_migrate_data.sh 脚本。

        cd /usr/local/x2openEuler/portal/service
        bash upgrade_migrate_data.sh
        
      4. 回显信息如下时,代表已经完成升级操作。

        Starting the service is complete.
        

      回退

      前提条件

      • 已将所需回退的迁移工具的软件包下载到本地,并确认软件包与服务器硬件平台一致。

        获取软件包后,需要校验软件包,确保与网站上的原始软件包一致,详细步骤请参见 软件数字签名验证

      • 回退前请确认 x2openEuler 工具可以正常使用。

      • 工具默认安装在 /usr/local/x2openEuler 目录,回退前请确认安装空间充足。

      操作步骤

      说明: 若回退前版本工具中存在环境检查通过的任务,则需在回退完成后卸载掉对应待升级节点的 x2openEuler-upgrade 包(例:x2openEuler-upgrade-x.x.x.x86_64)。

      1. 使用 SSH 远程登录工具,进入 Linux 操作系统命令行界面。

      2. 将 x2openEuler 工具软件包传输至服务器自定义目录下,执行以下命令进行回退。

        cd 自定义目录
        rpm -Uvh --oldpackage x2openEuler-core-x.x.x-xx.x86_64.rpm
        
      3. 根据提示,进入 /usr/local/x2openEuler/portal/service 目录,执行 upgrade_migrate_data.sh 脚本。

        cd /usr/local/x2openEuler/portal/service
        bash upgrade_migrate_data.sh
        
      4. 回显信息如下时,代表已经完成回退操作。

        Starting the service is complete.
        

      卸载

      前提条件

      没有正在运行中的任务。

      操作步骤

      1. 使用 SSH 工具远程登录进入操作系统命令行界面。

      2. 执行如下命令卸载 x2openEuler 工具。

        yum -y remove x2openEuler-core-x.x.x-x.x86_64
        

        说明:

        • 当用户执行卸载命令时,如果有正在运行的任务,用户需要先终止或等待运行的任务结束。若用户仍选择卸载,当前运行的任务会直接中断。
        • 当用户执行卸载命令时,需要确保当前用户所在客户端为唯一操作远端服务器 x2openEuler 工具的客户端,否则可能会因删除用户失败而导致工具卸载失败。
        • 卸载完成后,x2openEuler 用户、/home/x2openEuler 和 /var/spool/mail/x2openEuler 相关文件目录会被自动移除,以保证系统环境安全。
      3. 清理 x2openEuler 工具的数据库。

        1. 执行以下命令输入密码后登录 MariaDB。

          mysql -u root -p
          
        2. 执行以下 SQL 语句删除 x2openEuler 工具的数据库。此处以删除名为 x2openEulerDb 的数据库为例。

          DROP DATABASE IF EXISTS x2openEulerDb;
          
        3. 执行以下 SQL 语句清除 x2openEuler 工具的数据库用户。

          DELETE FROM mysql.user WHERE User='x2openEuler';
          DELETE FROM mysql.db WHERE User='x2openEuler';
          
        4. 执行以下 SQL 语句查询并确认 x2openEuler 工具的数据库及用户是否已删除。

          show databases;
          SELECT Host,User,Password FROM mysql.user;
          
      4. (可选)卸载 MariaDB。

        须知: 卸载 MariaDB 之前,请确保业务环境无 MariaDB 使用需求且不影响运行环境及业务。

        1. 执行以下命令卸载 MariaDB。

          rpm -qa | grep mariadb | xargs yum remove -y
          
        2. 执行以下命令清除配置目录。

          rm -rf /etc/my.cnf
          rm -rf /var/lib/mysql/
          

      文档捉虫

      “有虫”文档片段

      问题描述

      提交类型 issue

      有点复杂...

      找人问问吧。

      PR

      小问题,全程线上修改...

      一键搞定!

      问题类型
      规范和低错类

      ● 错别字或拼写错误;标点符号使用错误;

      ● 链接错误、空单元格、格式错误;

      ● 英文中包含中文字符;

      ● 界面和描述不一致,但不影响操作;

      ● 表述不通顺,但不影响理解;

      ● 版本号不匹配:如软件包名称、界面版本号;

      易用性

      ● 关键步骤错误或缺失,无法指导用户完成任务;

      ● 缺少必要的前提条件、注意事项等;

      ● 图形、表格、文字等晦涩难懂;

      ● 逻辑不清晰,该分类、分项、分步骤的没有给出;

      正确性

      ● 技术原理、功能、规格等描述和软件不一致,存在错误;

      ● 原理图、架构图等存在错误;

      ● 命令、命令参数等错误;

      ● 代码片段错误;

      ● 命令无法完成对应功能;

      ● 界面错误,无法指导操作;

      风险提示

      ● 对重要数据或系统存在风险的操作,缺少安全提示;

      内容合规

      ● 违反法律法规,涉及政治、领土主权等敏感词;

      ● 内容侵权;

      您对文档的总体满意度

      非常不满意
      非常满意
      提交
      根据您的反馈,会自动生成issue模板。您只需点击按钮,创建issue即可。
      文档捉虫
      编组 3备份