Install nginx manually

Source: Internet
Author: User

Install the GCC compiler

Sudo apt-Get install gcc

Install the PCRE Library of the disk to support regular expressions

Apt-Get install libpcre ++ 0

Install zlib and support gzip Compression

Apt-Get install zlib1g-dev

Installation and packagingProgram

Apt-Get install make

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

Tar xzvf nginx-1.0.8.tar.gz

CD nginx-1.0.8

. /Configure -- prefix =/opt/nginx -- conf-Path =/etc/nginx. conf -- PID-Path =/var/run/nginx. PID -- lock-Path =/var/lock/nginx. lock -- http-log-Path =/var/log/nginx/access. log -- error-log-Path =/var/log/nginx/error. log

Make

Sudo make

 

Set startup

Wget http://www.cslog.cn/wp-content/uploads/2010/10/nginx.gz

Gunzip nginx.gz

Sudo MV nginx/etc/init. d

Sudo chmod + x/etc/init. d/nginx

Sudo update-rc.d-F nginx defaults

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.