Ubuntu 5-Step installation Nginx record

Source: Internet
Author: User

1. installation package Preparation

go to http://nginx.org/en/download.html Download Latest Stable Nginx installation package

2. Upload to Ubuntu server

Can be uploaded via WinSCP

3. Unpack the installation package

Use command: TAR-ZXVF nginx-1.8.0.tar.gz

To see if the decompression was successful,

Use command: LS


4. Start the installation

command to enter the nginx-1.8.0/directory

Install the input command./configure

Errors that may occur after execution have been resolved

A. Error C compiler cc is not found

Cause of error: lack of packages required by Nginx

Workaround: Install the missing packages

    安装命令:sudoaptinstall gcc gcc-c++ autpconf automake

Note that this place may fail to install, then you need to update the source into this directory /etc/apt/ and then enter the command: Apt-get update for updating the source

When you're done, enter./configure

B. An error occurred./configure:error:the HTTP Rewrite module requires the PCRE library.

Cause of error: lack of Pcre library

WORKAROUND: Command to install the missing packages

       安装命令:sudo apt-get install libpcre3 libpcre3-dev

When you're done, enter./configure

c. An error occurred./configure:error:the HTTP gzip module requires the Zlib library.
Cause of error: lack of zlib library

WORKAROUND: Command to install the missing packages

       安装命令: sudo apt-get install zlib1g zlib1g-dev

When you're done, enter./configure

At this time如果出现,表示安装条件已满足

?然后输入make

等待make完成后,

最后 输入命令:make install

5、验证是否安装成功

输入命令 cd /usr/local/  

输入命令ls 如果你发现该目录下有nginx目录,表示已经安装成功







Ubuntu 5-Step installation Nginx record

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.