Home  >  Article  >  Backend Development  >  Install nginx-180 under linux

Install nginx-180 under linux

WBOY
WBOYOriginal
2016-07-30 13:30:501136browse

1. Download URL: http://nginx.org/en/download.html

Select nginx-1.8.0

2. Install

tar zxvf nginx-1.8.0.tar.gz
cd nginx-1.8.0/
./configure --prefix=/home/wangpl/mine/soft/nginx-1.8.0
error:
./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= option.
It means that the pcre required by the rewrite module is not found, and you need to specify --with-pcre=
You can refer to: http:/ /blog.csdn.net/conquer0715/article/details/42555723
Install pcre
Download from http://pcre.org/: pcre-8.36.tar.gz
tar zxvf pcre-8.36.tar.gz
cd xx/ pcre-8.36
./configure --prefix=/home/soft/pcre-8.36
make
make install
Continue nginx installation (disable the rewrite module directly here):
./configure --prefix=/home/wangpl/mine /soft/nginx-1.8.0 --without-http_rewrite_module
Installation completed
Compared to Apache httpd, it is much simpler, less than 3MB, and of course has relatively fewer functions. It is said on the Internet that the performance is better than Apache, but the stability is worse.

3. Try

cd /home/wangpl/mine/soft/nginx-1.8.0/sbin

./nginx

Visit: http://127.0.0.1:7000/

See the following results Indicates successful startup:

Welcome to nginx!

Stop nginx:

./nginx -s stop

Copyright statement: This article is an original article by the blogger and may not be reproduced without the blogger's permission.

The above introduces the installation of nginx-180 under Linux, including the relevant 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