Nginx Compiler Installation

Source: Internet
Author: User
Tags install openssl openssl library

Nginx Compile install download install package nginx-1.3.15.tar.gz tar zxvf nginx-1.3.15.tar.gz cd nginx-1.3.15/compile
./configure--user=www--group=www--prefix=/usr/local/nginx\--with-http_stub_status_module--with-http_ssl_module Make && make install  problems encountered 
    • ./configure:error:c compiler cc is not found
Workaround: Yum-y Install GCC
    • Run again after installing GCC
./configure--user=www--group=www--prefix=/usr/local/nginx \--with-http_stub_status_module--with-http_ssl_ Module Error:

Hecking for PCRE Library ... not found

Checking for PCRE library in/usr/local/... not found
Checking for PCRE library in/usr/include/pcre/... not found
Checking for PCRE library in/usr/pkg/... not found
Checking for PCRE library in/opt/local/... not found

./configure:error:the HTTP Rewrite module requires the PCRE library.
You can either disable the module by using--without-http_rewrite_module
option, or install the PCRE library into the system, or build the PCRE library
Statically from the source with Nginx by using--with-pcre=<path> option.

Workaround: Yum-y Install Pcre-devel

    • Run again
./configure--user=www--group=www--prefix=/usr/local/nginx \--with-http_stub_status_module--with-http_ssl_module

Error:

Checking for PCRE JIT-support ... not found
Checking for OpenSSL library ... not found

./CONFIGURE:ERROR:SSL modules require the OpenSSL library.
You can either does not enable the modules, or install the OpenSSL library
Into the system, or build the OpenSSL library statically from the source
With Nginx by using--with-openssl=<path> option.

Workaround: yum-y Install OpenSSL Openssl-devel

Last Run

./configure--user=www--group=www--prefix=/usr/local/nginx \--with-http_stub_status_module--with-http_ssl_module Make && make install

After installation, use/usr/local/nigix/sbin/

Start Nginx #./nginx

Problems encountered

Start Nginx: [Emerg] Getpwnam ("www") failed

Remove user Nobody annotations in nginx.conf to

Check whether the startup was successful:

netstat-ano|grep Results Input description started successfully

Open the browser to access the IPof this machine if the browser appears Welcome to nginx! Indicates that Nginx is installed and running successfully

PS: note: You need to turn off Firewall service iptables stop here

Restart

/usr/local/nginx/sbin/nginx–s Reload

or Killall-hup Nginx.

Reference Link: http://www.cnblogs.com/zhuhongbao/archive/2013/06/04/3118061.html

Nginx Compiler Installation

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.