Installing the Tool
The installation commands in this section are only examples. Replace them with the actual ones based on the required function packages.
- You can install the tool using an RPM package or a compressed package.
- Installing an RPM package requires the root user permission. Common users cannot use the Porting Advisor or Affinity Analyzer.
- If a common user uses a compressed package to install the tool, all upload and extraction operations must be performed by the current common user.
Installing an RPM Package (.rpm)
- Upload the RPM package obtained from Obtaining the Tool to a user-defined directory (for example, /home/DevKit) on the server.
- Install the framework package and single-function package. The following describes how to install the System Profiler function package tuner and Porting Advisor function package porting.
1rpm -ivh devkit-x.x.x-1.aarch64.rpm devkit-tuner-x.x.x-1.aarch64.rpm devkit-porting-x.x.x-1.aarch64.rpm
Install the framework package (devkit-x.x.x-1.aarch64.rpm or devkit-x.x.x-1.x86_64.rpm) before installing the RPM function package.
Command output:
1 2 3 4 5 6 7 8 9
Verifying... ################################# [100%] Preparing... ################################# [100%] Updating / installing... 1:devkit-x.x.x-1 ################################# [ 33%] devkit installed 2:devkit-porting-x.x.x-1 ################################# [ 67%] devkit-porting installed 3:devkit-tuner-x.x.x-1 ################################# [100%] devkit-tuner installed
- Check whether the installation is successful.
1rpm -qa | grep devkit
The installation is successful if the installation package name is included in the command output.
1devkit versionCommand output:
1devkit version x.x.x
- Make the automatic command line completion take effect.Log in to the terminal again or run the following command on the terminal:
1source /etc/bash_completion.d/devkit.sh
Installing a Compressed Package (.tar.gz)
- Upload the tool package (for example, DevKit-CLI-x.x.x-Linux-Kunpeng.tar.gz) obtained from Obtaining the Tool to the customized directory (for example /home/DevKit) on the server and extract the package.
cd /home/DevKit tar -zxvf DevKit-CLI-x.x.x-Linux-Kunpeng.tar.gz
Go to the extracted tool directory.
cd DevKit-CLI-x.x.x-Linux-Kunpeng
x.x.x indicates the version.
- Check whether the installation is successful. If the command output contains the installation package version, the installation is successful.
1./devkit versionCommand output:
1devkit version x.x.x
- (Optional) Add the tool directory to the PATH environment variable and run the source command to make the environment variable take effect. After the environment variable takes effect, the method of using the tool is the same as that of using the tool with an RPM package.
- Modify the configuration file, using the /etc/profile file as an example.
vi /etc/profile
- Press i to enter the editing mode and add the following information to the configuration file:
1export PATH=/home/DevKit/DevKit-CLI-x.x.x-Linux-Kunpeng:$PATH
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Load the environment variable.
1source /etc/profile
- Modify the configuration file, using the /etc/profile file as an example.
Parent topic: Installation