Install nginx and linuxnginx in linux

Source: Internet
Author: User
Tags install openssl openssl library

Install nginx and linuxnginx in linux

Centos6.5 64-bit for linux

Nginx is 1.4.7

Download the corresponding version from http://nginx.org/download/

Unzip tar-zxvf nginx-1.4.7.tar.gz

Set the configuration information :. /configure -- prefix =/usr/local/nginx (if you do not execute this command, make may report an error [make: No targets specified and no makefile found stop ])

Make Compilation

Make install Installation

 

Execute./configure -- prefix =/usr/local/nginx. errors may occur.

[Error:]./configure: error: the HTTP rewrite module requires the PCRE library.

[Solution:] install pcre-devel to solve the problem.Yum-y install pcre-devel

 

[Error:]/configure: error: the HTTP cache module requires md5 functions
From OpenSSL library. You can either disable the module by using
-- Without-http-cache option, or install the OpenSSL library into the system,
Or build the OpenSSL library statically from the source with nginx by using
-- With-http_ssl_module -- with-openssl = <path> options.

[Solution:] yum-y install openssl-devel

 

Then start/usr/nginx/sbin/nginx

After modifying the nginx. conf file, check whether the file configuration is correctly executed:/usr/nginx/sbin/nginx-t.

If nginx is restarted, do not kill the process and restart it. Run/usr/nginx/sbin/nginx-s reload.

The

Then the installation is successful !!!

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.