nginx安裝指南

來源:互聯網
上載者:User

nginx需要pcre,什麼是pcre?

PCRE(Perl Compatible Regular Expressions)是一個Perl庫,包括 perl 相容的正規運算式庫.。Boost太龐大了,使用boost regex後,程式的編譯速度明顯變慢。因此改用pcre來解決C語言中使用Regex的問題。


還需要zlib,支援gzip壓縮。

yum install pcre

yum install zlib

之後:

./configure --sbin-path=/usr/local/nginx/nginx  --conf-path=/usr/local/nginx/nginx.conf --pid-path=/usr/local/nginx/nginx.pid  --with-pcre=../pcre-8.32  --with-zlib=../zlib-1.2.8


然後make,

最後以root

make install


好了,如果沒有問題的話,現在就讓我們來運行nginx 伺服器吧:

 /usr/local/nginx/nginx


停止nginx伺服器

kill -QUIT `cat /usr/local/nginx/logs/nginx.pid`


Nginx的訊號控制
TERM,INT  快速關閉
QUIT       從容關閉
HUP        平滑重啟
USR1       重新開啟記錄檔、在切割日誌時用途大
USR2       平滑升級可執行程式
WINCH      從容關閉背景工作處理序

原文:http://blog.csdn.net/hongchangfirst/article/details/8968566

作者:hongchangfirst

hongchangfirst的首頁:http://blog.csdn.net/hongchangfirst

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.