Home >Backend Development >PHP Tutorial >Nginx server installation

Nginx server installation

WBOY
WBOYOriginal
2016-07-29 08:59:44760browse

Nginx server installation

Nginx server installation, I will mainly introduce two methods here.

1. Download and install the installation package

1) Download address of the installation package: http://nginx.org/en/download.html Select the linux version to download

At the moment, the latest The installation package version is nginx-1.9.12.tar.gz. Click to download.

2) Before installing Nginx, please install it yourself for other conditions it depends on. We will not introduce it in detail here.

(ps: My virtual machine was fully configured at the time, so I don’t know what is needed. If you need virtual machine configuration, you can send me a private message)
3) Unzip the source code of nginx and install it

# tar -zxvf nginx-1.3.16.tar.gz -C /usr/local/src/
# cd /usr/local/src/nginx-1.3.16/
# ./configure \
--conf-path=/etc/nginx/nginx.conf \
--error-log-path=/var/log/nginx/error.log \
--http-log-path=/var/log/nginx/access.log \
--pid-path=/var/run/nginx/nginx.pid \
--lock-path=/var/lock/nginx.lock \
--user=nginx \
--group=nginx \
--with-http_ssl_module \
--with-http_flv_module \
--with-http_stub_status_module \
--with-http_gzip_static_module \
--http-client-body-temp-path=/var/tmp/nginx/client/ \
--http-proxy-temp-path=/var/tmp/nginx/proxy/ \
--http-fastcgi-temp-path=/var/tmp/nginx/fcgi/ \
--with-pcre
# make && make install
# mkdir -p /var/tmp/nginx/client	
4) Verify the installation Effect

Check whether the installation is successful

Nginx server installation

Start Nginx

Nginx server installation

Verify whether Nginx starts successfully

Nginx server installation

2. Ubuntu online installation

1) Download and install online

sudo apt-get install nginx
2) Verify the installation effect

Same as item 4 of the first category

Nginx server installation

The above introduces the installation of Nginx server, including the relevant aspects. 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