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
Check whether the installation is successful
Start Nginx
Verify whether Nginx starts successfully
2. Ubuntu online installation
1) Download and install online
sudo apt-get install nginx
Same as item 4 of the first category
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.