Install nginx in centos 5.6

Source: Internet
Author: User
Tags install openssl openssl library

Run the command in the/usr directory to download the latest nginxSource code:

 
Wget http://nginx.org/download/nginx-1.2.0.tar.gz

After decompression you can see the nginx-1.2.0 directory:

 
Tar zxvf nginx-1.2.0.tar.gz

Install the PCRE Library

 
Yum-y install PCRE-devel

Install the OpenSSL library

 
Yum-y install OpenSSL-devel

Generate the make file:

 
./Configure -- prefix =/usr/nginx

The results should be carefully checked. Some important information is as follows:

Creating objs/makefileconfiguration Summary + using system PCRE Library + OpenSSL library is not used + MD5: using system crypto library + sha1: using system crypto library + using system zlib library nginx path Prefix: "/usr/nginx" nginx binary file: "/usr/nginx/sbin/nginx" nginx configuration Prefix: "/usr/nginx/conf" nginx configuration file: "/usr/nginx/CONF/nginx. conf "nginx PID file:"/usr/nginx/logs/nginx. PID "nginx Error Log File:"/usr/nginx/logs/error. log "nginx HTTP access log file:"/usr/nginx/logs/access. log "nginx HTTP client request body temporary files:" client_body_temp "nginx HTTP Proxy temporary files:" proxy_temp "nginx HTTP FastCGI temporary files:" fastcgi_temp "nginx HTTP uwsgi temporary files: "uwsgi_temp" nginx HTTP scgi temporary files: "scgi_temp"

For example, PID file, error log file, and access log file.

Compile and install now:

Make make install

Go to the/usr/nginx/sbin directory and run nginxProgramStart.

To modify the port, modify the/usr/nginx/CONF/nginx. conf file, for example:

 
The server {Listen 8081;

Related Article

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.