CENTOS6 installation Nginx The most detailed steps to cover the missing library complete solution

Source: Internet
Author: User

First step: Download Nginx under CentOS
wget http://nginx.org/download/nginx-1.2.9.tar.gz

Unzip the tar zxf nginx-1.2.9.tar.gz
Part II: Create a new user Nginx in the installation operation
Useradd Nginx
passwd Nginx
--nginx Nginx
Step three, unzip and test the installation environment./configure--prefix=/var/nginx (installed in the customer's/nginx_instal embarrassed. )
Error during installation

Checking for OS
+ Linux 2.6.32-220.el6.x86_64 x86_64
Checking for C compiler ... not found

./configure:error:c compiler gcc is not found

Workaround: Install GCC
Yum Install gcc

./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.

Need to install
Install Pcre-devel To resolve the problem (root user installation)
Yum-y Install Pcre-devel

Continue to report Errors

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

Need to install Yum install-y zlib-devel

Continue execution ./configure--prefix=/opt/nginx Installation compilation succeeded

Fourth Step:

Make && make install
Fifth Step:

Cd/opt/nginx/sin
./nginx

Then open the browser input IP address display
Welcome to nginx!

Xxxxxxxxx

Installation Successful


Original address: http://www.itmmd.com/201410/73.html
The article is published by the Android Development and distribution, reproduced must be marked by the source. .

CENTOS6 installation Nginx The most detailed steps to cover the missing library complete solution

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.