Linux源代碼安裝nginx

源代碼安裝nginx,過程分兩階段

1.下載好nginx源代碼,地址是:http://nginx.org/en/download.html

2.查看安裝文檔,根據自己的實際情況,查看安裝文檔http://nginx.org/en/docs/configure.html

確定安裝的選項,通過命令行來安裝

./configure --prefix=/usr/local/nginx/ --sbin-path=/usr/local/nginx/sbin/nginx --conf-path=/usr/local/nginx/conf/nginx.conf --pid-path=/usr/local/nginx/logs/nginx.pid --error-log-path=/usr/local/nginx/logs/error.log --http-log-path=/usr/local/nginx/logs/access.log --user=nginx --group=nginx --with-http_ssl_module --with-pcre=/usr/local/src/pcre-8.36/ --with-pcre-jit --with-zlib=/usr/local/src/zlib-1.0.11/

注意:其中的pcre和zlib不是你安裝的該程序的地址,而是這個程序的源代碼解壓出來的所在地址

make && make install

發佈了30 篇原創文章 · 獲贊 1 · 訪問量 3萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章