Nginx adds echo module if already installed

Tags (space separated): nginx


1 View installed modules

# /usr/local/nginx/sbin/nginx -V

2 Download the required echo module

# wget https://github.com/openresty/echo-nginx-module/archive/v0.60.tar.gz
# tar zxvf v0.60.tar.gz
# cp /echo-nginx-module-0.60 /home/usrdata/nginx-1.10/echo-nginx-module-0.60

3 Download nginx source code

# wget http://nginx.org/download/nginx-1.10.1.tar.gz
# tar -zxvf nginx-1.10.1.tar.gz

4 Enter the source code directory

# cd nginx-1.10.1

5 Generate Makefile to prepare for the next step of compilation. Note that it is very important to add the modules that have been installed before.

# ./configure --add-module=/home/usrdata/nginx-1.10/echo-nginx-module-0.60

Copy previously installed modules

6 Start compiling, but do not install (make install will directly overwrite the installation)

# make 

7 Make sure to back up the old one first and install it manually.

# mv /usr/local/nginx/sbin/nginx /usr/local/nginx/sbin/nginx.old
# cp -f objs/nginx /usr/local/nginx/sbin/nginx

8 Here is a smooth upgrade

# make upgrade
# make clean (清除操作,可以忽略)

9 If it is a new installation, please execute:

make install

Guess you like

Origin blog.csdn.net/risen16/article/details/78187279