1. Download the corresponding file: OpenResty - Download
2. Upload the file to the service that needs to be installed. The directory I uploaded is /opt
3. Decompress the file through the command: tar -xvf openresty-VERSION.tar.gz
4. Enter the decompressed directory and cd openresty-1.21.4.2
5. Configure and set the installation path./configure --prefix=/usr/local/openresty
6.make
7.sudo make install
8. Configure environment variables:
9. source ~/.bash_profile
10.openresty -v Verify whether the installation is successful
Note: The purpose of installation is to execute the lua script in ng, so before that we need to install luajit2.x and ensure the installation is successful.