Kunpeng Porting Advisor 2.3.T10
Installing
Date 2021-06-30
Contents
1 Environment Requirements...1
2 Obtaining the Installation Package... 9
3 Verifying the Installation Package Integrity... 10
4 Installing the Kunpeng Porting Advisor... 11
5 Verifying the Kunpeng Porting Advisor... 18
6 Upgrading the Kunpeng Porting Advisor... 19
7 Uninstalling the Kunpeng Porting Advisor... 21
1 Environment Requirements
NO TE
This tool applies only to development and testing environments.
Hardware Requirements
Table 1-1 lists the hardware requirements.
Table 1-1 Hardware requirements Hardware
Type Description Server ● x86 server
● Server powered by Kunpeng 916 or 920 processors CPU Quad-core processor, 2.5 GHz or higher
Memory More than 8 GB available memory
NOTETo ensure that multiple tasks can be executed concurrently, the server must have an eight- core 2.5 GHz CPU and 16 GB or larger memory.
OS Requirements
Use the Kunpeng Development Kit Compatibility Checker to obtain information about the OS requirements.
Installing 1 Environment Requirements
NO TE
● The assembly translation component of the tool supports all the OSs except RHEL 6.x and CentOS 6.x in the compatibility list. In addition, the compiler version must be GCC 7.3.0 or later. If the GCC version is earlier than 7.3.0, upgrade the GCC version or install dependencies. For details, see Installing Dependencies for Assembly.
● If the server cannot access the Internet or the OS Yum, APT, or Zypper source has been modified, the OS image file is required for installing dependencies during the
installation. You can use the Kunpeng Development Kit Compatibility Checker to obtain information about the required OS image file. Then, obtain the image file matching the OS you use.
Operating Environment Requirements
Table 1-2 lists the operating environment requirements.
Table 1-2 Operating environment requirements Drive
Space Configuration Installation
space The tool is installed in the /opt/portadv directory by default (You can specify the installation directory). At least 8 GB free space is recommended for the installation directory.
Workspace The user workspace is under the tool installation directory. At least 100 GB is recommended for the user workspace.
Dependencies
Table 1-3 lists the dependencies that are automatically installed by the tool.
Table 1-3 Dependencies
Category OS Component Description
Components installed during the tool
installation
CentOS/EulerOS/
openEuler/RHEL/
NeoKylin/Kylin
sudo Dependency for
Nginx installation
expect Automatic
interaction script required for Nginx installation
GCC C/C++ compiler
required for Nginx installation
make Build tool
required for Nginx
Category OS Component Description
zlib Dependency for
Nginx installation zlib-devel Dependency for
Nginx installation
pcre Dependency for
Nginx installation pcre-devel Dependency for
Nginx installation
OpenSSL Dependency for
Nginx installation openssl-devel Dependency for
Nginx installation
unzip File
decompression tool required for installing and running the tool rpm-build Tool for making
and managing the RPM package rpmdevtools Tool for making
and managing the RPM package
rpm rpm2cpio
installation package
java*-devel Java development package
cpio Dependency for
tool installation
SUSE sudo Dependency for
Nginx installation
expect Automatic
interaction script required for Nginx installation
GCC C/C++ compiler
required for Nginx installation
Installing 1 Environment Requirements
Category OS Component Description
make Build tool
required for Nginx installation
libz1 Dependency for
Nginx installation zlib-devel Dependency for
Nginx installation libpcre1 Dependency for
Nginx installation pcre-devel Dependency for
Nginx installation
OpenSSL Dependency for
Nginx installation libopenssl-devel Dependency for
Nginx installation
unzip File
decompression tool required for installing and running the tool
rpm rpm2cpio
installation package
cpio Dependency for
tool installation Ubuntu/Debian/
Deepin/Linx/UOS expect Automatic
interaction script required for Nginx installation
GCC C/C++ compiler
required for Nginx installation
make Build tool
required for Nginx installation
zlib1g Dependency for
Nginx installation zlib1g-dev Dependency for
Nginx installation
Category OS Component Description libpcre3 Dependency for
Nginx installation libpcre3-dev Dependency for
Nginx installation
OpenSSL Dependency for
Nginx installation libssl-dev Dependency for
Nginx installation
unzip File
decompression tool required for installing and running the tool default-jdk Java development
package
rpm2cpio Dependency for tool installation
cpio Dependency for
tool installation Components
provided by the tool
CentOS/EulerOS/
openEuler/RHEL/
NeoKylin/Kylin SUSE
Ubuntu/Debian/
Deepin/Linx/UOS
Python3 Python
development and running
environment
SQLite Database required
for installing and running the tool
Nginx Web server for
installing and running the tool
Django Web application
framework for the tool
CMake Automatic build
system for the tool.
Components required for installing and running the tool
CentOS/EulerOS/
openEuler/RHEL/
NeoKylin/Kylin SUSE
Ubuntu/Debian/
Deepin/Linx/UOS
tar File
decompression tool
gzip File
decompression tool
Installing 1 Environment Requirements
Category OS Component Description
xz File
decompression tool
readelf Used to view
information about files in the elf format
Wget Used to download
files from the Internet
glibc C language
runtime library
Installing Dependencies for Assembly
1. Install the Kunpeng Porting Advisor. For details, see 4 Installing the Kunpeng Porting Advisor.
2. Install dependencies.
– If the server can access the Internet, go to the /opt/portadv/tools/
all_asm/bin directory and run the following command. The dependencies will be automatically added to the lib directory under all_asm.
bash addAsmLibraries.sh
– If the server cannot access the Internet, copy the following RPM packages to the /opt/portadv/tools/all_asm/tmp/rpm directory, go to the /opt/
portadv/tools/all_asm/bin directory, and run the following command:
bash addAsmLibraries.sh
▪
x86 server:http://vault.centos.org/centos/8.2.2004/BaseOS/x86_64/os/
Packages/libstdc++-8.3.1-5.el8.0.2.x86_64.rpm
http://vault.centos.org/centos/8.2.2004/BaseOS/x86_64/os/
Packages/glibc-2.28-101.el8.x86_64.rpm
▪
Server powered by Kunpeng 916 or 920 processorshttp://vault.centos.org/centos/8.2.2004/BaseOS/aarch64/os/
Packages/libstdc++-8.3.1-5.el8.0.2.aarch64.rpm
http://vault.centos.org/centos/8.2.2004/BaseOS/aarch64/os/
Packages/glibc-2.28-101.el8.aarch64.rpm
NO TE
● The preceding URLs are addresses of the official CentOS websites, which have no security risks. In addition, the dependencies are added only to the lib directory under all_asm, which does not affect the OS environment. When the operation is complete, a message will be displayed indicating that the dependencies have been installed.
● When the source code porting function is used, the assembly module is invoked.
● /opt/portadv is the default tool installation directory. Replace it with the actual directory.
Installing the Memory Consistency Dependencies
1. Install the Kunpeng Porting Advisor. For details, see 4 Installing the Kunpeng Porting Advisor.
2. Install dependencies.
– If the server can access the Internet, go to the /opt/portadv/tools/
weakconsistency/staticcodeanalyzer directory and run the following command. The dependencies will be automatically added to the /home/
porting/lib directory.
bash ./add_libraries.sh
– If the server cannot access the Internet, manually upload the
following .deb or .rpm packages to a directory (for example, /home) on the server and go to the /opt/portadv/tools/weakconsistency/
staticcodeanalyzer directory, and run the following command (-t is optional and specifies the dynamic library to be installed. By default, all dynamic libraries are installed. /home specifies the directory where the packages have been uploaded on the server):
bash ./add_libraries.sh -d /home [-t libstdc++/libtinfo]
▪
If a Ubuntu, Debian, Deepin, Linx, or UOS operating system is used, download the following .deb packages:http://ftp.cn.debian.org/debian/pool/main/g/gcc-7/libstdc++6-7- dbg_7.4.0-6_arm64.deb
http://ftp.cn.debian.org/debian/pool/main/n/ncurses/
libtinfo5_6.1+20181013-2+deb10u2_arm64.deb
▪
If a CentOS, EulerOS, openEuler, NeoKylin, Kylin, SUSE, BC-Linux, or iSoft operating system is used, download the following RPMpackages:
http://ftp.pbone.net/mirror/ftp.opensuse.org/ports/aarch64/
distribution/leap/15.0/repo/oss/aarch64/libstdc+
+6-7.3.1+r258812-lp150.2.6.aarch64.rpm
http://ftp.pbone.net/mirror/ftp.opensuse.org/ports/update/leap/
42.3/oss/aarch64/libncurses5-5.9-59.1.aarch64.rpm
Installing 1 Environment Requirements
NO TE
● The preceding URLs are addresses of the official Debian and OpenSUSE websites, which have no security risks. In addition, the dependencies are added only to the /home/
porting/lib directory, which does not affect the OS environment. After the operation is complete, a message is displayed, indicating whether the installation is successful.
● The memory consistency module is invoked when the static check in the memory consistency check is used.
● /opt/portadv is the default tool installation directory. Replace it with the actual directory.
2 Obtaining the Installation Package
Table 2-1 lists the tool installation packages.
Table 2-1 Tool installation packages
Installation Package Description How to Obtain
● x86 server:
Porting-advisor_x.x.x_x86_64- linux.tar.gz
● Server powered by Kunpeng 916 or 920 processors
Porting-advisor_x.x.x_Kunpeng- linux.tar.gz
Used to install the Kunpeng Porting Advisor.
Download
NO TE
In the software package name, x.x.x indicates the version.
Installing 2 Obtaining the Installation Package
3 Verifying the Installation Package Integrity
After obtaining the installation package, verify its integrity and consistency for security purposes.
Verify the installation package as follows:
Step 1 Go to the Download page to obtain the digital software certificate and software.
Step 2 Obtain the verification tool and method from:
https://support.huawei.com/enterprise/en/tool/pgp-verify-TL1000000054 Step 3 Verify the software package integrity by following the procedure described in the
OpenPGP Signature Verification Guide obtained in Step 2.
----End
4 Installing the Kunpeng Porting Advisor
Prerequisites
● An x86 server or a Kunpeng server powered by 916 or 920 processors is available.
● The OS has been installed. For details about compatible OSs, see the Kunpeng Development Kit Compatibility Checker.
● An SSH remote login tool, such as Xshell, MobaXterm, or PuTTY, has been installed.
Procedure
NO TICE
● If the OS environment cannot access the Internet, configure the Yum, APT, or Zypper source. For details, see Configuring the OS Yum, APT, or Zypper Source.
● Download the tool installation package that is compatible with the server hardware platform.
● The SElinux enforcing mode is enabled by default for openEuler, EulerOS, and CentOS 8.0 or later. This will cause an installation failure of the tool. For details about how to disable the SELinux enforcing mode, see Disabling SELinux.
The following describes how to install the Kunpeng Porting Advisor on the CentOS. The installation methods on other OSs are the same.
Step 1 Use the SSH remote login tool to copy the Kunpeng Porting Advisor installation package (Porting-advisor_x.x.x_x86_64-linux.tar.gz) obtained in 2 Obtaining the Installation Package to a directory.
Step 2 Use the SSH remote login tool to log in to the CentOS CLI.
Step 3 Run the following command to access the directory where the Kunpeng Porting Advisor installation package is stored:
cd customized path
Step 4 Decompress the Kunpeng Porting Advisor installation package. In the following command, x.x.x indicates the version. Replace it with the actual version number.
Installing 4 Installing the Kunpeng Porting Advisor
tar -zxvf Porting-advisor_x.x.x_x86_64-linux.tar.gz
Step 5 Go to the directory where the decompressed tool installation package is stored. In the following command, x.x.x indicates the version. Replace it with the actual version number.
cd Porting-advisor_x.x.x_x86_64-linux
Step 6 Install the Kunpeng Porting Advisor.
NO TICE
● The tool in WebUI mode and CLI mode cannot be installed in the same directory.
● The root user has all the operation rights. Accessing the server as the root user may pose security risks. For security purposes, disable the SSH login of the root user as follows:
Log in to the server as a common user, switch to the root user, and check the value of PermitRootlogin in the /etc/ssh/sshd_config file. If the value of PermitRootlogin is no, the root user is not allowed to log in to the server. If the value is yes, change it to no.
● The tool in WebUI mode can be installed by the root user only. The tool in CLI mode can be installed by common users and the root user. To install the tool as the root user, log in to the server as a common user, switch to the root user, and then install the tool.
● The tool installation directory cannot be the directory where the Kunpeng Porting Advisor installation package is located or a system directory, such as /, / bin, /boot, /dev, /etc, /lib, /lib64, /media, /mnt, /proc, /root, /run, /sbin, / selinux, /src, /srv, /sys, /tmp, /usr, and /var.
● The tool installation path cannot be a relative path.
● Do not modify the files in the Porting-advisor_x.x.x_x86_64-linux directory.
Otherwise, the tool installation may fail.
● Run the following command to install the Kunpeng Porting Advisor in WebUI mode:
./install web [-d] [username]
NO TE
[-d]: optional parameter If this parameter is specified, the command output contains no configuration item of the tool. The tool is installed with default settings. (By default, all dependencies are installed. The Nginx IP address is 127.0.0.1.)
[username]: optional parameter If the tool is installed in the [-d] mode, the username parameter can be used to specify the running user of the tool. (If this parameter is not specified, the default running user of the tool is porting.)
– Set the tool installation directory, which is /opt by default.
– Set the web server IP address.
– Set the HTTPS port number, which is 8084 by default.
– Set the tool port number, which is 7998 by default.
Enter the installation path. The default path is /opt:
Start the install the Kunpeng Porting Advisor.
Ip address list:
sequence_number ip_address device [1] 10.254.206.190 eth0
Enter the sequence number of listed ip as web sever ip(default:1):1 Set the web server IP address 10.254.206.190
Please enter HTTPS port(default: 8084):
The HTTPS port 8084 is valid. Set the HTTPS port to 8084(y/n default: y):y Set the HTTPS port 8084
Please enter tool port(default: 7998):
The tool port 7998 is valid. Set the tool port to 7998(y/n default: y):y Set the tool port 7998
...Create user:porting success.
The tool will create 10 users (default portworker1-10) to execute background tasks. All the users belong to the porting user group and have the same user permissions. Do you agree?[y/n]y ...Do you want to install the dependencies for pure assembly? (y/n default:y)y
...Porting web console is now running, go to:https://10.254.206.190:8084.
Successfully installed the Kunpeng Porting Advisor in /opt/portadv/.
Installing 4 Installing the Kunpeng Porting Advisor
NO TE
– You can select an IP address from the IP address list displayed in the command output.
– The tool and HTTPS port numbers range from 1024 to 65535.
– The tool port number must be different from the HTTPS port number. If the specified port number is in use, the system automatically increments the port number by 1 until an available port number is found. If no port is available, the installation stops.
– If the OS firewall of the server is enabled, the tool automatically checks whether the configured port is enabled. If the port is enabled, the installation continues. If the port is not enabled, you are prompted to enable the port. If you select y, the tool automatically enables the port. When the tool is uninstalled, the port will be restored to the original status. If you do not enable the port, the tool installation is not affected, but the web access will fail. If you want to access the tool using a web browser, you need to enable the firewall port of the server OS. For details, see Step 7.
– If the tool in WebUI mode is installed on EulerOS, run the following command as the root user to modify the permission on the readelf executable file after the installation is successful:
chmod 755 /usr/bin/readelf
– During the tool installation, if the iOS dependency is not configured in the current environment or the dependency fails to be installed, the tool provides three solutions for you to install the iOS dependency before continuing with the installation.
If you select solution 1, download the required image source to the local PC and enter the path of the local image source.
If you select solution 2, enter the URL for downloading the image source and download the image source online.
If you select solution 3, the system automatically matches the installation image source that exists on HUAWEI CLOUD. (Solution 3 is supported only when the OS is installed on the Kunpeng platform and is CentOS 7.6/8.0/8.1/8.2, openEuler 20.03, Debian 10, or EulerOS 2.0 SP8. The image source is automatically matched and installed.)
– During the tool installation, the tool checks the OS you are using. If the OS is not in the compatibility list of the tool, you will be prompted to install the OS in the default mode (CentOS, Debian, or openEuler).
– During the tool installation, the tool checks whether the porting user, configuration file, installation path (/opt/portadv/), and home path (/home/
porting/) of the tool exist. If any of them exists, the tool prompts you to manually uninstall the tool or delete the existing user, path, or file, or authorize the tool to handle the problem and continue the installation.
– During the tool installation, the OS user (porting) is created for the Kunpeng Porting Advisor on the OS. This user can only run the Kunpeng Porting Advisor and is locked and forbidden from logging in to the OS upon creation. On CentOS 6.5, 6.9, or 6.10, this user is only locked because Nginx needs to be started by this user.
● Run the following command to install the Kunpeng Porting Advisor in CLI mode:
./install cmd
The command output is as follows:
Checking ./Porting-advisor_x.x.x_x86_64-linux ...
...
The GCC version is earlier than 7.3.0. Do you want to install the dependencies for pure assembly? (y/n default:y)y
...Successfully installed the Kunpeng Porting Advisor in /opt/portadv/tools.
Step 7 (For the WebUI mode only) If the firewall of the server OS is enabled, enable the firewall port of the server OS. (If the firewall of the server OS is disabled, skip this step.)
NO TE
● In the following commands, 8084 is the HTTPS port number set in Step 6. Replace it with the actual port number.
● If you have configured the hardware firewall, contact the network administrator to configure the hardware firewall and enable the ports that will be accessed.
● CentOS/EulerOS/openEuler/RHEL 7.x/NeoKylin/Kylin/SUSE
a. Run the following command to check whether the firewall is enabled:
systemctl status firewalld
If the firewall status is "inactive", the firewall is not enabled. Skip the following steps.
b. Run the following command to check whether the port is enabled:
firewall-cmd --query-port=8084/tcp
If "no" is displayed, the port is not enabled.
c. Run the following command to enable the port permanently:
firewall-cmd --add-port=8084/tcp --permanent
If "success" is displayed, the port is enabled successfully.
d. Run the following command to reload the configuration:
firewall-cmd --reload
e. Run the following command to check whether the port is enabled:
firewall-cmd --query-port=8084/tcp
If "yes" is displayed, the port is enabled.
NO TE
▪
To remove a port, run the following command:firewall-cmd --permanent --remove-port=8084/tcp
If "success" is displayed, the port is successfully removed.
After the port is removed, run the following command to reload the configuration:
firewall-cmd --reload
▪
If firewalld does not exist in the SUSE operating system, install firewalld and then run the firewalld commands in the preceding steps.● RHEL 6.x
a. Run the following command to check whether the firewall is enabled:
service iptables status
If iptables: Firewall is not running is displayed, the firewall is not enabled. Skip the following steps.
b. Run the following command to check whether the port is disabled:
iptables -L -n | grep 8084
If ACCEPT is displayed, the port is enabled. Skip the following steps.
Installing 4 Installing the Kunpeng Porting Advisor
If REJECT is displayed, the port is disabled. Perform the following operations:
c. If the port is disabled, run the following command to enable the firewall port:
iptables -I INPUT -p tcp --dport 8084 -j ACCEPT
d. Run the following command again to check the port status:
iptables -L -n | grep 8084 NO TE
▪
To remove a port, run the following command:iptables -I INPUT -p tcp --dport 8084 -j REJECT
Repeat Step 3 to check the port status. If REJECT is displayed, the port is removed successfully.
▪
If the user of other operating systems uses iptables as the server firewall, you can perform the preceding steps to enable the firewall port of the server operating system.● Debian/Ubuntu/Deepin/Linx/UOS
If ufw is installed, perform the following steps:
a. Run the following command to check the firewall and port status:
ufw status
If the firewall status is "inactive", the firewall is not enabled. Skip the following steps.
b. Run the following command to enable the port:
ufw allow 8084/tcp
c. Run the following command to check whether the port is enabled:
ufw status
If the value of Action is ALLOW, the port is enabled.
NO TE
– To remove a port, run the following command:
ufw delete allow 8084/tcp
– When both ufw and firewalld are enabled in the system, run the firewalld command to check the ports status. If the command output shows that the ports are disabled, the tool cannot automatically enable the port. (If the tool
automatically runs the firewalld command to enable the port, the ufw firewall will be disabled). You need to enable the port manually. You can disable ufw or
firewalld, and use only one firewall. Then run the command to enable the port.
If ufw is not installed and iptables provided by the OS is used, perform the following steps:
a. Run the following command to check whether the port is disabled:
iptables -L -n | grep 8084
If no command output is displayed, the port is not disabled. Skip the following steps.
b. If the port is disabled, run the following command to open the local firewall configuration file.
vi Firewall configuration file name
d. Press Esc, type :wq, and press Enter to save the change and exit.
e. Run the following command to import the configuration file:
iptables-restore
Step 8 (Optional) In an isolated network environment, configure a proxy to access the external network.
1. Run the following command to open the /etc/systemd/system/
gunicorn_port.service file in edit mode:
vi /etc/systemd/system/gunicorn_port.service
2. In the gunicorn_port.service file, add the following environment variables to the end of the [Service] field:
Environment="http_proxy=ip:port"
Environment="https_proxy=ip:port"
NO TE
ip:port indicates the IP address and port number of the proxy server.
3. Press Esc, type :wq, and press Enter to save the change and exit.
4. Restart the Django service.
a. Run the following command to reload the configuration file:
systemctl daemon-reload
b. Run the following commands to restart the service:
systemctl restart gunicorn_port
5. Configure the DNS. (Skip this step if the DNS has been configured.) a. Run the following command to open the resolv.conf file in edit mode:
vi /etc/resolv.conf
b. Add the following content to the file:
nameserver ip NO TE
ip indicates the IP address of the DNS server.
c. Press Esc, type :wq, and press Enter to save the change and exit.
----End
Installing 4 Installing the Kunpeng Porting Advisor
5 Verifying the Kunpeng Porting Advisor
Verifying the Tool in WebUI Mode
Log in to the Kunpeng Porting Advisor WebUI. For details, see Logging In to the Kunpeng Porting Advisor WebUI.
If the login is successful, the Kunpeng Porting Advisor is installed successfully.
Verifying the Tool in CLI Mode
Step 1 Use an SSH remote login tool to log in to the CentOS CLI.
Step 2 Run the following command to access the bin directory under the Kunpeng Porting Advisor installation directory (/opt/portadv is the tool installation directory. Replace it with the actual directory.):
cd /opt/portadv/tools/cmd/bin
Step 3 Run the following command to check the tool version:
./porting-advisor -V
If the following information is displayed, the installation is successful. In the information, x.x.x indicates the version.
porting advisor vx.x.x
----End
6 Upgrading the Kunpeng Porting Advisor
● Supports upgrade from 2.2.T1, 2.2.T2, 2.2.T2.SPC100, 2.2.T2.SPC200, or 2.2.T2.SPC300 to 2.2.T3.
● Supports upgrade from 2.2.T3 to 2.2.1.
● Supports upgrade from 2.2.T3 and 2.2.1 to 2.2.T4.
● Supports upgrade from 2.2.T4 and 2.2.1 to 2.3.T10.
Prerequisites
● You have downloaded the target version of the Kunpeng Porting Advisor to the local PC and confirmed that the target version is compatible with the server hardware platform.
You have verified that the upgrade package is consistent with that on the website. For details, see 3 Verifying the Installation Package Integrity.
● The Kunpeng Porting Advisor is running properly.
● The tool installation directory (/opt/portadv by default) has at least 8 GB free space.
NO TICE
● The upgrade cannot be performed when an analysis task is being performed.
Ensure that no analysis task is running during the upgrade.
● Dot not press Ctrl+Z, Ctrl+C, or restart system during the upgrade.
Procedure
Step 1 Use an SSH remote login tool to log in to the Linux CLI.
Step 2 Copy the Kunpeng Porting Advisor target version to the customized directory of the server. Run the following command to decompress the upgrade package (x.x.x indicates the version. Replace it with the actual version number.):
cd customized path
tar -zxvf Porting-advisor_x.x.x_x86_64-linux.tar.gz
Step 3 Go to the directory where the decompressed upgrade package is stored. In the command, x.x.x indicates the version. Replace it with the actual version number.
Installing 6 Upgrading the Kunpeng Porting Advisor
cd Porting-advisor_x.x.x_x86_64-linux
Step 4 Upgrade the Kunpeng Porting Advisor.
NO TE
● Upgrade the tool based on the installation mode of the Kunpeng Porting Advisor (CLI or WebUI). The tool in WebUI mode can be upgraded by the root user only. The tool in CLI mode can be upgraded by common users and the root user.
● If a port conflict occurs, the system automatically allocates a port from the ports available.
./upgrade
The following information is displayed (WebUI mode for example):
Checking ./Porting-advisor_x.x.x_x86_64-linux...
Upgrading ./Porting-advisor_x.x.x_x86_64-linux...
Enter the installation path. The default path is /opt:
...After the upgrade,only user portadmin can log in to the system.Common users cannot log in to the system,but common user data is still stored in the original path.
Are you sure you want to continue?(y/n):y Start upgrade.
Do not press Ctrl+Z or Ctrl+C or restart the system during the upgrade.
Please confirm that there are no running tasks(yes/no): yes Checking...
Checking the tool version succeeded.
...Enter the sequence number of listed ip as web server ip(default:1):1 Set the web server IP address 10.254.206.190
Please enter HTTPS port(default: 8084):
The HTTPS port 8084 is valid. Set the HTTPS port to 8084(y/n default: y):y Set the HTTPS port 8084
Please enter tool port(default: 7998):
The tool port 7998 is valid. Set the tool port to 7998(y/n default: y):y Set the tool port 7998
Decompressing files ...
porting:x:1009:1009::/home/porting:/usr/sbin/nologin Create user:porting success.
The tool will create 10 users (portworkerX) to execute background tasks. All the users belong to the porting user group and have the same user permissions. Do you agree?[y/n]y
...Do you want to install the dependencies for assembly? (y/n default: y)y ...Porting Web console is now running, go to:https://10.254.206.190:8084.
Upgrade successed.
NO TICE
If the upgrade fails, the upgrade script automatically rolls back the tool to the source version.
----End
7 Uninstalling the Kunpeng Porting Advisor
Prerequisites
No tasks are running.
Procedure
Step 1 Use an SSH remote login tool to log in to the OS CLI.
NO TE
The tool in WebUI mode can be uninstalled by the root user only. The tool in CLI mode can be uninstalled by common users and the root user.
Step 2 Copy the scanning report to be retained from the following directory, /opt/
portadv/is the tool installation directory, replace it with the actual situation.
● WebUI mode: /opt/portadv/xx/report (xx indicates the user name.
Example: /opt/portadv/portadmin/report)
● CLI mode: /opt/portadv/tools/cmd/report
Step 3 Run the following command to uninstall the Kunpeng Porting Advisor (/opt/
portadv is the tool installation directory. Replace it with the actual directory):
bash /opt/portadv/tools/uninstall.sh
The following information is displayed (WebUI mode for example):
Are you sure you want to uninstall porting advisor?(y/n)y
Removed symlink /etc/systemd/system/multi-user.target.wants/nginx_port.service.
Removed symlink /etc/systemd/system/multi-user.target.wants/gunicorn_port.service.
Erasing rsa successfully.
Delete portworker1 user.
Delete portworker2 user.
Delete portworker3 user.
Delete portworker4 user.
Delete portworker5 user.
Delete portworker6 user.
Delete portworker7 user.
Delete portworker8 user.
Delete portworker9 user.
Delete portworker10 user.
Delete porting user.
porting:x:1009:1009::/home/porting:/usr/sbin/nologin The Kunpeng Porting Advisor is uninstalled successfully.
Installing 7 Uninstalling the Kunpeng Porting Advisor
NO TE
If you press Y when "A task is running. Are you sure you want to uninstall porting advisor?
(y/n)" is displayed, the task in running will be stopped.
----End