Nginx需要依賴下面3個套件
依賴包一鍵安裝:
<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>
源碼安裝:
依賴包一鍵安裝:<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>
<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>
註:編譯好的nginx可以透過/home/renwh/nginx -V(具體路徑以安裝的為主)看編譯時候的參數
然後只需要make,make install 即可。版權聲明:本文為部落客原創文章,未經部落客允許不得轉載。
以上就介紹了nginx 安裝手記,包括了方面的內容,希望對PHP教程有興趣的朋友有幫助。 🎜 🎜 🎜