ubuntu15.10_x64 Installing Nginx

Source: Internet
Author: User

Browser to Http://nginx.org/en/download.html

Download stable version of Nginx, such as nginx-1.10.1.tar.gz, which is an nginx source package, need to be compiled and installed to use.

Decompression command: TAR–ZXVF nginx-1.10.1.tar.gz

CD Nginx Extract directory:./configure command

Issue one: gcc and gcc++ compilers are not installed

./configure:error:c compiler cc is not found
FIX: Install gc++
sudo apt-get install gcc
sudo apt-get install gcc++


Issue two: HTTP module missing prce regular expression library
./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.
Workaround: Install the Pcre library

sudo apt-get install libpcre3 Libpcre3-dev

Issue three: HTTP gzip module missing zlib Library
./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.
Workaround: Install the zlib library

$ sudo apt-get install zlib1g
$ sudo apt-get install Zlib1g.dev

Again:./configure

Compiling make

Install make install

Enter the Nginx installation directory

cd/usr/local/

LS can see nginx, it means that Nginx installed on Ubuntu successfully

Enter Cd/usr/local/nginx/sbin

sudo./nginx start Nginx

If Nginx does not start successfully, it is likely that 80 port is occupied, replace the port (edit conf/nginx.conf file 80 to 81)

http://localhost

ubuntu15.10_x64 Installing Nginx

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.