Home > Backend Development > PHP Tutorial > Steps to install nginx stable version on Ubuntu1404

Steps to install nginx stable version on Ubuntu1404

WBOY
Release: 2016-07-29 09:04:26
Original
1076 people have browsed it

Because my system has just been installed and there are no packages!

1: First update all packages

<code> sudo apt-get update
</code>
Copy after login

2: Jump to the system’s Downloads folder (I downloaded it under the Downloads folder)

<code>cd /home/用户名/Downloads/
</code>
Copy after login

3: Download the stable version of nginx from the official website

<code>wget http://nginx.org/download/nginx-1.8.1.tar.gz
</code>
Copy after login

4: Unzip

<code>tar zxvf nginx-1.8.1.tar.gz
</code>
Copy after login

5: Enter the unzipped folder

<code>cd nginx-1.8.1
</code>
Copy after login

6: Execute the command

<code>./configure
发现报错   原因是缺少pcre library
</code>
Copy after login

7: Re-enter the Downloads folder to download pcre

<code>wegt http://sourceforge.net/projects/pcre/files/pcre/8.31/pcre-8.31.tar.gz
</code>
Copy after login

8: Unzip pcre

<code>tar zxvf pcre-8.31.tar.gz
</code>
Copy after login

9: Enter the unzipped folder

<code>cd pcre-8.31
</code>
Copy after login

10: Execute the command

<code>./configure     这句成功
make            这句会报错,编译不通过,所以需要安装g++
</code>
Copy after login

11: Install g++

<code>sudo apt-get install g++
</code>
Copy after login

12: Re-enter the pcre-8.31 folder and execute the command

<code>./configure
make
sudo make install   报错缺少zlib包
</code>
Copy after login

13: Install the zlib package

<code>sudo apt-get install zlib1g-dev
</code>
Copy after login

14: Re-enter the pcre-8.31 folder and execute the command

<code>./configure
make
sudo make install
</code>
Copy after login
Copy after login

15: Re-enter the nginx-1.8.1 folder to execute the command

<code>./configure
make
sudo make install
</code>
Copy after login
Copy after login

16: Start nginx

<code>sudo /usr/local/nginx/sbin/nginx
启动成功之后登陆localhost看看是否安装成功!http://localhost:80
</code>
Copy after login

17: Close nginx

<code>sudo killall -9 nginx
</code>
Copy after login
').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });

The above introduces the steps to install the stable version of nginx on Ubuntu1404, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template