中文
注册

安装

本章节以鲲鹏平台openEuler-20.03-LTS-SP1(以下简称openEuler)环境下安装鲲鹏DevKit为例,其它硬件平台及操作系统环境下安装方法相同。

操作步骤

  1. 使用SSH远程登录工具,将获取软件包中获取的鲲鹏DevKit安装包(DevKit-All-x.x.x-Linux-Kunpeng.tar.gz)拷贝到自定义路径下。
  2. 使用SSH远程登录工具,进入openEuler操作系统命令行界面。
  3. 执行如下命令进入保存鲲鹏DevKit安装包的自定义路径。
    1
    cd 自定义路径
    
  4. 执行如下命令解压鲲鹏DevKit安装包(其中“x.x.x”表示版本号,请用实际情况代替)。
    1
    tar --no-same-owner -zxvf DevKit-All-x.x.x-Linux-Kunpeng.tar.gz
    

    通过--no-same-owner保证解压后的文件属组为当前操作用户(root)文件属组。

  5. 执行如下命令进入解压后的鲲鹏DevKit安装包目录(其中“x.x.x”表示版本号,请用实际情况代替)。
    1
    cd DevKit-All-x.x.x-Linux-Kunpeng
    
  6. 安装鲲鹏DevKit
    • 由于root用户拥有最高权限,直接使用root用户登录服务器可能会存在安全风险。您可以通过配置禁止root用户SSH登录的选项,来提升系统安全性。具体配置如下:

      先以普通用户登录服务器,切换至root登录后检查/etc/ssh/sshd_config配置项PermitRootlogin,如果显示no,说明禁止了root用户登录;如果显示yes,则需要将配置项PermitRootlogin设置为no。

    • Web模式只支持root用户安装,使用RPM包或者压缩包的命令行模式支持普通用户和root用户安装。(如果使用root用户安装,建议您使用普通用户登录服务器后切换为root用户,再执行后续安装操作。)
    • 用户在安装鲲鹏DevKit时,安装路径不能选择工具安装包所在的目录,也不能选择系统路径,如:/、/bin、/boot、/dev、/etc、/lib、/lib64、/media、/mnt、/proc、/root、/run、/sbin、/selinux、/src、/srv、/sys、/tmp、/usr、/var、/home/DevKit。
    • 用户输入工具安装路径时,只能填写全路径,不能填写相对路径。
    • 不要随意修改DevKit-All-x.x.x-Linux-kunpeng文件夹下的文件,否则会导致工具安装不成功。
    • 若安装类型选择“SSO install type”,则需集成实现鲲鹏DevKit工具定义SSO接口的外部系统,否则将无法使用该安装方式。
    1. 执行以下命令安装鲲鹏DevKit
      ./install.sh

      根据回显信息选择工具安装类型。

      Installing... Please wait.
        The system uses yum to manage packages.
      Select a tool access mode for your installation:
        [1]: User name and password
        [2]: OAuth 2.0-based SSO (You will be automatically logged in to the DevKit once you logged in to the system.)
      If you select [2], to ensure proper use of the Kunpeng DevKit, ensure that you have installed an external system that implements the OAuth2 authorization interface defined by the Kunpeng DevKit.
      Enter the sequence number of the tool access mode for your installation (default: 1):
        The access mode with the user name and password will be used for the installation.
      ...
      表1 安装类型参数说明

      安装方式

      参数配置

      User name and password(账户密码登录方式)

      标准安装方式,安装后需要输入账户、密码进行访问。

      OAuth 2.0–based SSO(基于OAuth 2.0的SSO认证登录方式)

      SSO安装方式,安装后通过基于OAuth 2.0的SSO单点登录方式进行访问,具体请参见SSO单点登录。配置参数如下:

      • registration ID:授权系统中DevKit注册的应用ID。
      • registration key:授权系统中DevKit注册的应用 密钥
      • SSL Certificate Verification:是否忽略 SSL证书 校验。
        • 忽略证书校验:无需输入服务器证书路径。
        • 进行自签证书校验:需要输入有效的授权服务器证书路径。
        • 使用 CA 中心颁发的可信证书进行校验。
      • redirect URL:重定向地址,默认为DevKit安装地址。
      • authorize_code URL:请求授权码地址,用于请求access_token。
      • access_token URL:请求访问令牌地址,用于访问用户信息接口。
      • user_info URL:请求用户信息地址,用于获取用户登录信息。
      • refresh access_token URL:请求刷新access_token地址(可选项,默认为空)。
      • user validity info URL:请求已有用户信息有效性地址(可选项,默认为空)。
      • 主系统登出URL:DevKit工具退出后跳转地址。
    2. 根据回显信息选择工具安装模式。
      Select an installation mode:
        [1] : Install the DevKit framework and all plugins
        [2] : Install the DevKit framework and selected plugins
        [3] : Install the DevKit framework
      Enter the sequence number of the tool to be installed (default: 1):
      Selected install_tool: DevKit framework with plugins including porting,affinity,devtools,debugger,sys_perf,java_perf,sys_diagnosis
      ...
      表2 工具安装模式说明

      安装模式

      说明

      1

      默认选项,安装鲲鹏DevKit框架及所有工具。

      2

      安装鲲鹏DevKit框架及选择的工具。

      3

      仅安装鲲鹏DevKit框架,不包含工具。

    3. 环境检查确认,根据回显确认是否授权工具处理安装环境检查失败项。
      • 是:输入“y”并按“Enter”。
      • 否:输入“n”并按“Enter”,终止安装。
      Installation environment check result:
        SequenceNumber     CheckItem                            CheckResult          Suggestion
        [1]                installation user                    ok                   N/A
        [2]                sudo permission                      ok                   N/A
        [3]                su permission                        ok                   N/A
        [4]                pam_rootok                           ok                   N/A
        [5]                sudoers configuration file           fail                 '#includedir /etc/sudoers.d' is not set in the /etc/sudoers file. During the installation, you can authorize the tool to configure files.
        [6]                devkit user                          ok                   N/A
        [7]                service configuration file           ok                   N/A
        [8]                tool installation path               ok                   N/A
        [9]                user home directory                  ok                   N/A
        [10]               framework dependency                 ok                   N/A
        [11]               devkitworkers                        ok                   The tool will create 10 users (default devkitworker1-10) to execute background tasks. All the users belong to the devkit user group and have the same user permissions.
        [12]               porting optional dependencies        fail                 The following optional components have not been installed:java-devel
        [13]               sys_perf optional dependencies       fail                 The following optional components have not been installed:modulecmd lshw ibdev2netdev cma_roce_tos ofed_info mlxconfig mlnx_qos show_gids ucx_info nvidia-smi java kernel-debuginfo
        [14]               sys_diagnosis optional dependencies  fail                 The following optional components have not been installed:ibv kernel-debuginfo
      
      Do you want to authorize the tool to handle the items failed in the installation environment check?[y/N]: y
        Check environment success
    4. 安装参数配置。
      • 配置工具安装目录,默认为“/opt”
      • 配置Web Server的IP地址。
      • 配置HTTPS端口,默认端口为8086。

      回显信息如下:

      Start obtaining installation parameters.
      Obtain the IP address, port number, and installation path required by the tool service.
      Enter the installation path. (The default path is /opt):
        Selected install_path: /opt
        The permission check of the installation path is successful.
        The space check of the installation path is successful.
      IP address list:
        sequence_number      ip_address           device
        [1]                  x.x.x.x              enp125s0f2
        [2]                  x.x.x.x              enp129s0f2
      Please enter the sequence number of the listed IP address as the web server IP (default: 1):
        Selected IP address of the web server: x.x.x.x
      Please enter the installation port (default: 8086):
        Selected Nginx port: 8086
        Selected HTTP server port: 8002
        Selected RPC cluster server port: 50051
        Selected the internal port of the tool: 7996
      
      The following parameters will be used for deployment:
        ++++++++++++++++++++++++++++++++++++++++++++++++
        OS_TYPE                       : OpenEulerOS
        TOOL_VERSION                  : x.x.x
        INSTALL_TOOL                  : porting,affinity,devtools,debugger,sys_perf,java_perf,sys_diagnosis
        INSTALL_PATH                  : /opt
        NGINX_IP                      : x.x.x.x
        NGINX_PORT                    : 8086
        PLUGIN_GUNICORN_PORT          : 7996
        GRPC_SERVER_IP                : x.x.x.x
        GRPC_LISTEN_PORT              : 50051
        HTTP_LISTEN_PORT              : 8002
        ++++++++++++++++++++++++++++++++++++++++++++++++
      DevKit Configuration Generation
      ...
      ...
      ...
      welcome to install DevKit for Java!
      checking the configuration and the minimal requirements before the installation:
      Check disk space
      Check install path disk space Success
      JAVA_HOME is /opt/DevKit/devkitplugins/java_perf/jdk-17.0.10 THOR_JAVA_HOME is /opt/DevKit/devkitplugins/java_perf/jdk-17.0.10
        Selected Java_perf server port: 18080
        Selected Java_perf socket server port: 19090
      The pre-checking as OK.
      ...
      ...
      ...
      • 用户在配置Web Server的IP地址时,从回显的IP address list中选择。
      • rpc集群服务端口和HTTPS端口设置范围为1024~65535。
      • rpc集群服务端口和HTTPS端口不能相同。如果与系统已占用的端口冲突,会自动+1,直到找到可用的端口。如系统无可用端口将终止安装。
      • 如果用户的服务器OS防火墙已开启,工具会自动检测配置的端口是否开通,若开通,则继续安装进程;若未开通,会提示用户开通该端口,用户选择“y”,则工具会自动帮助用户开通端口(卸载工具时会清除工具对端口的操作,即恢复到用户的原端口状态)。若用户选择不开通,工具安装不受影响,但是会造成Web访问不成功。若后续用户想要通过Web访问工具,需要用户自行开通服务器OS防火墙端口,执行步骤参见(可选)开启防火墙端口
      • 如果是在EulerOS上安装Web模式,请在安装成功之后以root用户执行以下命令修改readelf可执行文件的权限。
        1
        chmod 755 /usr/bin/readelf
        
      • 当安装过程中检测到用户当前环境未配置iso依赖或者安装依赖失败时,工具会给出3种解决方法供用户选择,根据提示安装完iso依赖后才能继续进行安装。

        若选择1,用户需要先下载所需要的镜像源到本地,然后输入本地镜像源所在路径。

        若选择2,用户需要手动输入可下载镜像源的网址,通过该网址在线下载镜像源。

        若选择3,镜像源存在于华为云,则直接自动匹配安装镜像源。(只有当用户在鲲鹏平台上安装,且操作系统属于CentOS 7.6/8.0/8.1/8.2、openEuler 20.03、Debian 10或者EulerOS 2.0(SP8)之一,才会支持选项3,直接自动匹配安装镜像源。)

      • 工具安装过程中会检查用户的操作系统,若用户的操作系统不在工具的兼容列表中,工具会提示用户按照默认的操作系统模式(CentOS、Debian以及openEuler系列)进行安装。
      • 工具安装过程中会检查是否已存在工具的devadmin用户、配置文件、安装路径(/opt/DevKit/)以及用户home路径(/home/devkit/),如果以上任意一个已存在,工具就会提示用户手动卸载工具或删除已存在的用户,路径,文件,或者授权工具处理该问题,然后继续进行安装。
      • 工具安装过程中会创建鲲鹏DevKit程序的操作系统运行用户(devkit)和执行用户(devkitworkerX),用户已设置禁止登录或锁定,仅用于程序运行。
      • 用户在自己的工作空间内启动软件迁移检查作业,用户工作空间属主是工具运行用户devkit。在检查用户软件源码时,需要解析用户软件构建配置文件,需要执行构建文件中的Linux命令、Shell脚本或者二进制文件,这时系统通过后台用户devkitworkerX完成检查,避免通过构建文件中的恶意命令、脚本进行用户空间横向越权。
      • Web方式下,Web用户是逻辑用户,用户作业实际执行用户是Linux系统用户devkit或devkitworkerX。Web用户通过devkit、devkitworkerX用户在Linux系统内完成诸如但不限于软件构建、编译等操作,且上述操作在devkit或devkitworkerX用户权限范围内进行。
      • DHE算法受漏洞CVE-2002-2001影响,不建议在Nginx配置中使用该算法。
      • 如系统环境需要安装依赖组件至自定义目录时,需添加相应环境变量至devkit用户目录下的“.bash_profile”文件或“/opt/DevKit/tools/script_port/service_gunicorn.sh”文件。
    5. 安装过程回显信息如下:
       1
       2
       3
       4
       5
       6
       7
       8
       9
      10
      11
      12
      13
      14
      15
      16
      17
      18
      19
      20
      21
      22
      23
      24
      25
      26
      27
      28
      29
      30
      31
      32
      33
      34
      35
      36
      37
      38
      39
      40
      41
      42
      Operations to perform:
        Apply all migrations: affinity_tasks, auth, commonanalysis, contenttypes, cuda_debugger, data_comparison, dependency_dictionary, dependency_filter, devtools_tasks, diagnostic_importexporttasks, diagnostic_nodemanager, diagnostic_scheduletask, diagnostic_sysconfig, diagnostic_taskmanager, diagnostic_usermanager, dynamic_search, importexporttasks, mpi_debugger, nfs_dpc_diagnostic_analysis, nodemanager, optimization_assistant, scene, scheduletask, sessions, ssh_key, storageio_diagnostic_task, sys_config, sysmig, taskmanager, tasks, usermanager
      Running migrations:
        Applying diagnostic_importexporttasks.0001_initial... OK
        Applying diagnostic_nodemanager.0001_initial... OK
        Applying diagnostic_scheduletask.0001_initial... OK
        Applying diagnostic_sysconfig.0001_initial... OK
        Applying diagnostic_taskmanager.0001_initial... OK
        Applying diagnostic_usermanager.0001_initial... OK
        Applying nfs_dpc_diagnostic_analysis.0001_initial... OK
        Applying storageio_diagnostic_task.0001_initial... OK
        Run sys_diagnosis install script
        Check disk space
        Check install path disk space Success
      ...
      ...
      ...
      Install iperf3
      /home/devkit_package/DevKit-All-24.0.RC2-Linux-Kunpeng/DevKit-All-24.0.RC2-Linux-Kunpeng/DevKit-Sys-Diagnosis-24.0.RC2-Linux-Kunpeng/DevKit-Sys-Diagnosis-24.0.RC2-Linux-Kunpeng/deploy/iperf /home/devkit_package/DevKit-All-24.0.RC2-Linux-Kunpeng/DevKit-All-24.0.RC2-Linux-Kunpeng/DevKit-Sys-Diagnosis-24.0.RC2-Linux-Kunpeng/DevKit-Sys-Diagnosis-24.0.RC2-Linux-Kunpeng/deploy
      Configure iperf, please wait
      Make iperf3, please wait
      Make install iperf3, please wait
      Install iperf3 Success
      /home/devkit_package/DevKit-All-24.0.RC2-Linux-Kunpeng/DevKit-All-24.0.RC2-Linux-Kunpeng/DevKit-Sys-Diagnosis-24.0.RC2-Linux-Kunpeng/DevKit-Sys-Diagnosis-24.0.RC2-Linux-Kunpeng/deploy
      Install trace_net_flow
      Install trace_net_flow Success
        Load database success
        Run sys_diagnosis install script success
      install sys_diagnosis success
        Encryption success
        Signature verification key generated successfully
        Generate agent package success
        The porting plugin is successfully installed in the /opt/DevKit/devkitplugins/porting directory.
        The affinity plugin is successfully installed in the /opt/DevKit/devkitplugins/affinity directory.
        The devtools plugin is successfully installed in the /opt/DevKit/devkitplugins/devtools directory.
        The debugger plugin is successfully installed in the /opt/DevKit/devkitplugins/debugger directory.
        The sys_perf plugin is successfully installed in the /opt/DevKit/devkitplugins/sys_perf directory.
        The java_perf plugin is successfully installed in the /opt/DevKit/devkitplugins/java_perf directory.
        The sys_diagnosis plugin is successfully installed in the /opt/DevKit/devkitplugins/sys_diagnosis directory.
        The Kunpeng DevKit Advisor is successfully installed in the /opt/DevKit directory.
        The DevKit Web console is running. Visit https://x.x.x.x:8086
        If x.x.x.x:8086 has mapping IP. Please use the mapping IP.
      
  7. (可选)隔离网络环境下需要通过代理方式访问外网,代理配置步骤如下:
    1. 执行如下命令修改“gunicorn_framework.service”“gunicorn_plugin.service”文件,此处以修改“gunicorn_framework.service”文件为例。
      • Ubuntu操作系统
        1
        vi /lib/systemd/system/gunicorn_framework.service
        
      • 其他操作系统
        vi /usr/lib/systemd/system/gunicorn_framework.service
      • “gunicorn_framework.service”是鲲鹏DevKit框架服务的文件。
      • “gunicorn_plugin.service”是鲲鹏DevKit子工具服务的文件。
    2. 在“gunicorn_framework.service”文件中的“[Service]”字段后面增加如下两个环境变量。
      1
      2
      Environment="http_proxy=ip:port"
      Environment="https_proxy=ip:port"
      

      ip:port”是代理服务器的地址和端口号。

    3. 按“ESC”,输入“:wq!”,按“Enter”保存并退出。
    4. 重启Django服务。
      1. 执行如下命令重新加载配置文件。
        1
        systemctl daemon-reload
        
      2. 执行如下命令重新启动服务。
        1
        2
        systemctl restart gunicorn_framework.service
        systemctl restart gunicorn_plugin.service
        
    5. 配置DNS(如果已经配置了DNS,请跳过该步骤)。
      1. 执行如下命令修改“resolv.conf”文件。
        1
        vi /etc/resolv.conf
        
      2. 文件中增加如下内容:
        1
        nameserver ip
        

        ip”是DNS服务器的IP地址

      3. 按“ESC”,输入“:wq”,按“Enter”保存并退出。
搜索结果
找到“0”个结果

当前产品无相关内容

未找到相关内容,请尝试其他搜索词