How to add stream module to nginx

王林
Release: 2020-08-31 17:00:24
forward
8185 people have browsed it

How to add stream module to nginx

Specific method:

(Recommended tutorial: nginx tutorial)

View nginx current module

/usr/local/nginx/sbin/nginx -V
Copy after login
Copy after login

For example:

nginx version: nginx/1.12.2
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC) 
configure arguments: --add-module=/usr/local/fast/fastdfs-nginx-module/src/
Copy after login

Add module stream

cd /usr/local/nginx-1.12.2
#需要把之前的参数带上
./configure --add-module=/usr/local/fast/fastdfs-nginx-module/src/ --with-stream
make (切忌不要输入make install,否则会覆盖掉nginx文件)
Copy after login

Stop nginx

ps -ef | grep nginx|grep -v grep|cut -c 9-15|xargs kill -9
Copy after login

cp nginx file

cp /usr/local/nginx/sbin/nginx /usr/local/nginx/sbin/nginx.bak
cp /usr/local/nginx-1.12.2/objs/nginx /usr/local/nginx/sbin/
Copy after login

Start nginx

 /usr/local/nginx/sbin/nginx
Copy after login

View dependent modules

/usr/local/nginx/sbin/nginx -V
Copy after login
Copy after login

The above is the detailed content of How to add stream module to nginx. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:csdn.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template