<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    隨筆 - 0, 文章 - 264, 評論 - 170, 引用 - 0
    數(shù)據(jù)加載中……

    linux安裝nginx

    1、下載nginx
    wget http://nginx.org/download/nginx-1.6.0.tar.gz

    2、解壓
    tar zxvf nginx-1.6.0.tar.gz
    進(jìn)入nginx目錄,cd nginx-1.6.0

    3、配置
    ./configure

    配置過程中可能會報(bào)如下錯誤:
    checking for PCRE library  not found  
    checking 
    for PCRE library in /usr/local/  not found  checking for PCRE library in /usr/include/pcre/  not found  checking for PCRE library in /usr/pkg/  not found  checking for PCRE library in /opt/local/  not found    
    .
    /configure: error: the HTTP rewrite module requires the PCRE library.  You can either disable the module by using --without-http_rewrite_module  
    option, or install the PCRE library into the system, or build the PCRE library  
    statically from the source with nginx by using 
    --with-pcre=<path> option. 

    解決辦法,下載pcre庫,并編譯和安裝:
    PCRE庫是實(shí)現(xiàn)Perl正則表達(dá)式的基礎(chǔ)。如果系統(tǒng)中缺少此庫需要編譯安裝。可以從著名的開源軟件網(wǎng)站sourceforge上下載:
    http:
    //sourceforge.net/projects/pcre/files/pcre/。

    仍然是下載后解壓、配置、編譯和安裝:

    [
    ***]tar -zxvf pcre-8.35.tar.gz   

    [
    ***]cd pcre-8.35

    [
    ***]./configure  

    [
    ***]make  

    [
    ***]make install

    4、編譯與安裝nginx
    make

    make install

    5、啟動nginx
    /usr/local/nginx/sbin/nginx

    注:在64位系統(tǒng)上啟動時有可能報(bào)如下錯誤:
    Nginx: error while loading shared libraries: libpcre.so.1
    解決辦法如下:
    ln -s /usr/local/lib/libpcre.so.1 /lib64/libpcre.so.1

    再將啟動即可。

    6、查看是否啟動成功
    [root@localhost ~]# ps -aef | grep nginx
    root     
    28295     1  0 22:52 ?        00:00:00 nginx: master process /usr/local/nginx/sbin/nginx
    nobody   
    28296 28295  0 22:52 ?        00:00:00 nginx: worker process      
    root     
    28615 28587  0 23:09 pts/0    00:00:00 grep nginx
    [root@localhost 
    ~]#
    啟動成功,master是主進(jìn)程,關(guān)閉的時候kill這個進(jìn)程,其他子進(jìn)程會自動關(guān)掉

    打開瀏覽器http://localhost/ 即可看到nginx的默認(rèn)歡迎頁
    Welcome to nginx!










    posted on 2014-05-12 23:13 小一敗涂地 閱讀(917) 評論(0)  編輯  收藏 所屬分類: linux相關(guān)nginx、squid、haproxy、varnish等

    主站蜘蛛池模板: 亚洲午夜福利在线观看| 一区二区三区视频免费观看| 午夜精品在线免费观看| 亚洲喷奶水中文字幕电影| 亚洲网站免费观看| 亚洲人成影院在线高清| 亚洲天堂免费在线| 亚洲中文无码卡通动漫野外| 免费看的成人yellow视频| 欧美日韩亚洲精品| 免费jjzz在在线播放国产| 一进一出60分钟免费视频| 久久久久久A亚洲欧洲AV冫| 中文字幕免费在线看| 亚洲av无码一区二区三区乱子伦 | 亚洲国产精品一区第二页 | 国产特黄一级一片免费| 久久精品亚洲男人的天堂 | 免费一级一片一毛片| 日韩在线观看免费完整版视频| 亚洲一级片免费看| 免费a级毛片无码a∨免费软件| 亚洲AV无码精品色午夜果冻不卡| 蜜桃视频在线观看免费视频网站WWW| 亚洲视频一区二区三区| 久久久久久99av无码免费网站| 中文字幕乱码亚洲无线三区| 国产极品粉嫩泬免费观看| 免费在线观看一区| 亚洲欧洲成人精品香蕉网| 无码一区二区三区免费| 亚洲女人初试黑人巨高清| 成人黄页网站免费观看大全| 国产精品亚洲小说专区| 亚洲中文字幕无码中文字在线 | 亚洲网站在线免费观看| 最新免费jlzzjlzz在线播放| 国产成人综合久久精品亚洲| 国外亚洲成AV人片在线观看| 99久久精品免费视频| 亚洲愉拍一区二区三区|