Home >Backend Development >PHP Tutorial >Install nginx under ubuntu ubuntu15.04 linux ubuntu 16.04

Install nginx under ubuntu ubuntu15.04 linux ubuntu 16.04

WBOY
WBOYOriginal
2016-07-29 08:54:001070browse

1. Installation steps

  1. step1: Download ninx

    <code>$ cd ~/download/
    $ wget http://nginx.org/download/nginx-1.8.1.tar.gz
    </code>

    The download address of different versions can be obtained from http://nginx.org/en/download.html.

  2. step2: Unzip and install

    <code>$ tar -zxvf nginx-1.8.1.tar.gz 
    $ cd nginx-1.8.1/
    $ ./configure
    $ make
    $ make install
    </code>
  3. Check whether the installation is successful

    Check whether there is an nginx directory in the /usr/local/ directory, if there is, the installation is successful.

2. File description

File description in the /usr/local/nginx/ directory:

<code>conf/  存放配置文件
html/  存放一些网页文件
logs/  存放一些日志
sbin/  一些可执行文件
</code>

3. Some common problems during installation

./configure will report the following error:

Error 1 :

<code>error: the HTTP rewrite module requires the PCRE library.
</code>

Solution:

<code>$ apt-get -y install libpcre3 libpcre3-dev #安装库,之后重新./configure
</code>

Error 2:

<code>error: the HTTP gzip module requires the zlib library
</code>

Solution:

<code>$ apt-get -y install zlib1g zlib1g.dev #安装库,之后重新./configure
</code>

Reference: http://www.jikexueyuan.com/course/1470_2.html?ss=1

').addClass( 'pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });

The above introduces the installation of nginx under ubuntu, including ubuntu content. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn