Openresty installation configuration,
Install the library apt-get install libreadline-dev libncurses5-dev libpcre3-dev libssl-dev perl make build-essential required for openresty Build OpenRestyRun the following command to decompress the downloaded package.VERSION For the current openresty version tar-xzvf openresty-VERSION.tar.gz and thenOpenresty-VERSION/ Directory, and then enter the following command to configure (default configuration for installation):./configureCompile and installRun the following command to compile the make command to install OpenResty to make install in the system. At this time, Openresty has been installed in my system, because the default installation path is used during configuration, therefore, my program is installed in:/usr/local/openresty/. This folder contains three directories: luajit, lualib, and nginx. The default configuration file for openresty is/usr/local/openresty/nginx/conf.
Run nginxEnter the directory and run./nginx
If no error is reported, run nginx-V to view nginx version information and stop the service:
Nginx-s reload: modify the configuration and then reload the nginx-s reopen: re-open the log file nginx-t-c/path/to/nginx. conf to test whether the nginx configuration file is correctly disabled: nginx-s stop: stop nginx quit quickly: stop nginx in an orderly manner. Other methods of stopping nginx: ps-ef | grep nginxkill-QUIT master process no.: Stop Nginxkill-TERM master process no.: Quickly stop Nginxpkill-9 nginx: Force stop Nginx to start nginx: nginx-c/path/to/nginx. conf: restart nginx smoothly: kill-HUP master process number
Start the service
Start Nginx in the following ways. If no output exists, the startup is successful.-p specifies the project directory and-c specifies the configuration file. /Usr/local/openresty/nginx/sbin/nginx-c/usr/local/openresty/nginx/conf/nginx. conf/usr/local/openresty/nginx/sbin/nginx-p 'pwd'-c/usr/local/openresty/nginx/conf/nginx. conf is used to create a soft link for nginx under openresty (not required) ln-s/usr/local/openresty/nginx/sbin/nginx/usr/sbin/nginx start/usr/sbin/nginx-c/usr/local/ openresty/nginx/conf/nginx. conf
Installed successfully
1. Add resty and cjson references to/usr/local/openresty/site/lualib.
Solution: The program 'nginx' can be found in the following packages:
* Nginx-extras
* Nginx-full
* Nginx-light
Try: apt-get install <selected package> at first, I thought it was my nginx installation error. Then I looked for various tutorials and carefully checked the installation steps. I thought there was no problem, after a long time, I don't know what to do. I 'd better go through the prompts and follow the prompts to continue, that is:
Apt-get install nginx-extras press ENTER
Apt-get install nginx-full press ENTER
Apt-get install nginx-light press ENTER