Installation and configuration of nginx in linux environment

      When installing nginx today, the director recommended the installation of OpenResty, and checked the information of OpenResty. OpenResty is a modified version of nginx by domestic big cows, with powerful functions. The following is a brief introduction to OpenResty.

     OpenResty is a high-performance web platform based on Nginx and Lua, which integrates a large number of sophisticated Lua libraries, third-party modules and most dependencies. It is used to easily build dynamic web applications, web services and dynamic gateways that can handle ultra-high concurrency and scalability.

     OpenResty effectively turns Nginx into a powerful general-purpose web application platform by bringing together various well-designed Nginx modules (mainly developed by the OpenResty team). In this way, web developers and system engineers can use the Lua scripting language to mobilize various C and Lua modules supported by Nginx to quickly construct high-performance web application systems capable of 10K or even more than 1000K single-machine concurrent connections.

    The corresponding installation is still simple, as follows.

 

1. Install and configure the Yum source, do not repeat this step

2. Install the necessary components

yum install pcre-devel openssl-devel gc-c++

3. Compile and install

*这里没有选择安装最新版本*
wget http://openresty.org/download/ngx_openresty-1.7.4.1.tar.gz
tar -xvf ngx_openresty-1.7.4.1.tar.gz
cd ngx_openresty-1.7.4.1
./configure
make && make install

4. The installation is over

If there is no error, there should be no problem. The default installation path is as follows /usr/local/openresty/, and the content of the path is as follows:

drwxr-xr-x 2 root root 4096 Jan  8 17:10 bin
drwxr-xr-x 6 root root 4096 Jan  8 17:10 luajit
drwxr-xr-x 5 root root 4096 Jan  8 17:10 lualib
drwxr-xr-x 6 root root 4096 Jan  8 17:10 nginx


 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326767226&siteId=291194637