Linux: Installing Nginx module in the case of installed Nginx

Source: Internet
Author: User

Installing Nginx module in the case of installed Nginx


nginx third-party module installation method: The code is as follows:
./configure--prefix=/Your installation directory--add-module=/third-party module directory

1. View the commands of Nginx compile installation, which modules are installedThe 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, in the installation of Nginx installed Nginx module (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 to installing Nginx third party module without nginx installation, it is more than one step to overwrite Nginx file.


If you do not add sudo before the./configure, the following error message appears:

./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-gener IC i686checking for C compiler ..../configure:8: auto/feature:cannot Create Objs/autoconf.err:permission Denied./config Ure:28:auto/feature:cannot Create objs/autotest.c:permission denied./configure:1: Eval:cannot Create OBJS/AUTOCONF.E Rr:permission denied not found./configure:116:auto/feature:cannot create objs/autoconf.err:permission denied./config Ure:117:auto/feature:cannot Create objs/autoconf.err:permission denied./configure:118:auto/feature:cannot Create OB Js/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

Installing a third-party module in the case of an installed Nginx is actually using –add-module to reinstall the Nginx, do not make install but directly to the compilation directory objs/ The Nginx file overwrites the old Nginx file directly. If you need to install multiple nginx third-party modules, you only need to specify several –add-module.

Note: When recompiling, remember to add the previously compiled modules to the Configure parameter.

Nginx provides a very many nginx third-party modules for installation, address Http://wiki.nginx.org/3rdPartyModules


Linux: Installing Nginx module in the case of installed Nginx

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.