Linux: install the nginx module when nginx is installed.

Source: Internet
Author: User
: This article mainly introduces Linux: install the nginx module when nginx is installed. if you are interested in the PHP Tutorial, refer to it. Install the nginx module when nginx is installed

Install nginx third-party modules:

The code is as follows:


./Configure -- prefix =/your installation directory -- add-module =/third-party module directory

1. check the commands for nginx compilation and installation and which modules are installed.

The code is as follows:


#/Usr/local/webserver/nginx/sbin/nginx-V


2. switch to the root user

The code is as follows:


# Su root

3. install the nginx module when nginx is installed (username is the system user name)

The code is as follows:


# Sudo. /configure -- prefix =/usr/local/nginx -- with-pcre =/home/username/download/nginx/pcre-8.32 -- with-zlib =/home/username/download/nginx/ zlib-1.2.8 -- with-openssl =/home/username/download/nginx/openssl-1.0.2a -- add-module =/home/username/download/nginx/nginx_mod_h264_streaming-2.2.7
# Make
# Cp objs/nginx/usr/local/nginx/sbin/nginx
#./Usr/local/nginx-1.4.1/sbin/nginx

Compared with installing nginx third-party modules without nginx, nginx files are overwritten in one step.

If sudo is not added before./configure, the following error message is displayed:

./configure: 45: auto/init: cannot create Makefile: Permission denied./configure: 16: ./configure: cannot create objs/ngx_auto_headers.h: Permission denied./configure: 17: ./configure: cannot create objs/autoconf.err: Permission denied./configure: 19: ./configure: cannot create objs/ngx_auto_config.h: Permission deniedchecking for OS + Linux 3.16.0-30-generic i686checking for C compiler ..../configure: 8: auto/feature: cannot create objs/autoconf.err: Permission denied./configure: 28: auto/feature: cannot create objs/autotest.c: Permission denied./configure: 1: eval: cannot create objs/autoconf.err: Permission denied not found./configure: 116: auto/feature: cannot create objs/autoconf.err: Permission denied./configure: 117: auto/feature: cannot create objs/autoconf.err: Permission denied./configure: 118: auto/feature: cannot create objs/autoconf.err: Permission denied./configure: 119: auto/feature: cannot create objs/autoconf.err: Permission denied./configure: 120: auto/feature: cannot create objs/autoconf.err: Permission denied./configure: error: C compiler cc is not found

---------------------------------------

Solution:

Sudo. /configure -- prefix =/usr/local/nginx -- with-pcre =/home/user/download/nginx/pcre-8.32 -- with-zlib =/home/user/download/nginx/ zlib-1.2.8 -- with-openssl =/home/user/download/nginx/openssl-1.0.2a -- add-module =/home/user/download/nginx/nginx_mod_h264_streaming-2.2.7

4. Summary

When nginx is installed, the third-party module is actually re-installed with-add-module, instead of making install, you can directly overwrite the objs/nginx files in the compiling directory to the old nginx files. if you need to install multiple third-party nginx modules, you only need to specify a few more-add-modules.

Note: When re-compiling, remember to add the previously compiled modules to the configure parameter together.

Nginx provides a lot of third-party modules for nginx to provide installation, address http://wiki.nginx.org/3rdPartyModules


The above Introduces Linux: install the nginx module when nginx is installed, including some content, and hope to be helpful to anyone interested in the PHP Tutorial.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.