centos中編譯安裝nginx+mysql +php(未完)

來源:互聯網
上載者:User

標籤:pat   min   targe   soft   官網   wget   centos   dev   ftp   

參考地址:http://www.cnblogs.com/htian/p/5728599.html

去官網找到PCRE,並下載http://www.pcre.org/
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre2-10.21.tar.gz
解壓:tar -xzvf pcre.tar.gz
進入pcre目錄:cd pcre
安裝pcre
./configure --prefix /usr/local/pcre2
make
make install

安裝pcre-devel(缺少該模組,安裝nginx的時候會報錯)
yum install pcre-devel

去官網下載zlib庫http://www.zlib.net/
wget http://www.zlib.net/zlib-1.2.11.tar.gz
tar -xzvf zlib-1.2.11.tar.gz
cd zlib-1.2.11
./configure --prefix /usr/local/zlib
make
make install

去官網下載openssl:https://www.openssl.org/
wget https://www.openssl.org/source/openssl-1.0.2l.tar.gz
tar -xzvf openssl-1.0.2l.tar.gz
cd openssl-1.0.2l
./config
make
make install

去官網下載nginx:http://nginx.org/en/
nginx源碼安裝文檔:http://nginx.org/en/docs/configure.html
wget http://nginx.org/download/nginx-1.13.2.tar.gz
tar -xzvf nginx-1.13.2.tar.gz
cd nginx-1.13.2
./configure --sbin-path=/usr/local/nginx --conf-path=/usr/local/nginx/nginx.conf --pid-path=/usr/local/nginx/nginx.pid --with-pcre=/home/lyh/download/pcre2-10.21 --with-zlib=/home/lyh/download/zlib-1.2.11 --with-openssl=/home/lyh/download/openssl-1.0.2l
make
make install

上面 --sbin-path= 後面是nginx安裝到的路徑,可以自訂; --conf-path= 以及 --pid-path= 請參考剛才自己定義的目錄填寫;--with-pcre=以及--with-zlib=,--with-openssl 是剛才自己下載的壓縮包解壓出來的目錄,根據自己的檔案名稱填寫

 

centos中編譯安裝nginx+mysql +php(未完)

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.