Home >Backend Development >PHP Tutorial >nginx installation notes
Nginx needs to rely on the following 3 packages
Dependent package one-click installation:
<code>yum -y install zlib zlib-devel openssl openssl--devel pcre pcre-devel yum -y groupinstall <span>"Development Tools"</span><span>"Development Libraries"</span> 此命令可以一键安装开发工具包</code>
Source code installation:
<code>openssl: tar -xzvf openssl-<span>1.0</span><span>.1</span><span>.tar</span><span>.gz</span> cd openssl-<span>1.0</span><span>.1</span> ./config(注意) && make && make install <span>pcre:</span> tar -xzvf pcre-<span>8.21</span><span>.tar</span><span>.gz</span> cd pcre-<span>8.21</span> ./configure && make && make install <span>zlib:</span> tar -xzvf zlib-<span>1.2</span><span>.8</span><span>.tar</span><span>.gz</span> cd zlib-<span>1.2</span><span>.8</span> ./configure && make && make install</code>
nginx installation command: Download address of each version of nginx: http://nginx.org/download/
<code>#注意 \ 前面至少一个有空格 ./configure --prefix=/home/renwh/nginx -<span>-with-http_ssl_module \ </span>-<span>-with-pcre=../pcre-<span>8.21</span> \ <span>#指向解压的源码目录</span></span>-<span>-with-zlib=../zlib-<span>1.2</span>.<span>8</span> \ <span>#指向解压的源码目录</span></span>-<span>-with-openssl=../openssl-<span>1.0</span>.<span>1</span> \ <span>#指向解压的源码目录</span></span></code>
Note: Compiled nginx can be passed /home/renwh/nginx -V (the specific path is mainly based on the installation) Check the parameters during compilation
Then just make, make install.
Reference link: http://www.cnblogs.com/siqi/p/3572695.html
Copyright statement: This article is an original article by the blogger and may not be reproduced without the blogger's permission.
The above has introduced the nginx installation notes, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.