Installing Tengine by Using a Script
|
Software Version |
Whether to Support CentOS 7.6 |
Whether to Support CentOS 8.1 |
Whether to Support openEuler 20.03 (LTS-SP1) |
|---|---|---|---|
|
Tengine 2.2.2 |
Yes |
No |
No |
|
Tengine 2.2.3 |
No |
No |
No |
- Obtain the Tengine script package.
- Download the script package using a local browser.
Download address: https://mirrors.huaweicloud.com/kunpeng/archive/kunpeng_solution/web/Scripts/tengine_automation.tar.gz
- Copy the script package to the /home directory.
If the server is connected to the Internet, you can run the wget command on the server to download the script package.
1 2
cd /home/ wget https://mirrors.huaweicloud.com/kunpeng/archive/kunpeng_solution/web/Scripts/tengine_automation.tar.gz --no-check-certificate
- Download the script package using a local browser.
- Decompress the script package.
1tar -xzvf tengine_automation.tar.gz

- Go to the tengine_automation directory and query the files in the directory.
1 2
cd tengine_automation ll

Table 1 describes the script directory structure.
Table 1 Overall script directory structure Directory
Description
deps
Directory used for compilation and installation
NOTE:The installer script obtains the OpenSSL and Tengine source code using the wget command. If the server is not connected to the Internet, download the source code (see Upgrading OpenSSL and Installing Tengine by Compiling the Source Code) and save it to this directory.
scripts
Optimization script directory, which contains the common optimization script, Nginx configuration optimization script, and the script for binding NIC interrupts to cores.
install.sh
Script used to implement one-click compilation, deployment, and tuning.
rollback.sh
Rollback script, which is used to roll back all operations of the script.
startNginx.sh
Script for starting the Nginx instance.
- Configure the network ports in the environment.
- Modify the install.sh file.
1vim install.sh - Press i to enter the insert mode, find parameters eth0 and eth2, and enter the network port names in the current environment.
- Set sense based on actual situation.
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Modify the install.sh file.
- Run the install.sh script. After the script is executed, restart the device for the optimization to take effect.
1sh install.sh
The operation of binding NIC interrupts to cores becomes invalid after the device is restarted. Therefore, this operation is directly written to the /etc/profile file. The command for binding NIC interrupts to cores is executed each time the device is restarted.
- Run the startNginx.sh script to start Nginx. Then, run the ps command to check the Nginx process.
1sh startNginx.sh
- After step 6 is performed, you can skip Running Tengine.
- If the environment needs to be rolled back or the deployment using a script fails, run the rollback script to roll back the script operation and restart the device.
1sh rollback.sh