隨筆 - 0, 文章 - 264, 評論 - 170, 引用 - 0

          導航

          <2025年6月>
          25262728293031
          1234567
          891011121314
          15161718192021
          22232425262728
          293012345

          留言簿(6)

          隨筆分類

          文章分類

          文章檔案

          AI

          android+移動開發

          apache等開源類包,工具相關

          cdn

          concurrent

          C語言

          git、svn等工具使用

          groovy、grails

          Hadoop、Storm、Spark大數據相關

          hibernate、JPA等持久化技術

          html,dom,js,css、ext、mui等前端、移動前端相關

          HTTP、HTTPS、TCP、UDP等協議相關

          IM、openfire

          Java基礎

          java性能優化

          jquery

          linux相關

          lucene、solr等搜索技術相關

          maven gradle ant Jenkins自動化構建與持續集成

          memcache

          mongodb

          nginx、squid、haproxy、varnish

          OLAP

          python、shell、perl、php

          redis

          rmi相關

          spring

          struts、webwork

          tcp/ip

          tomcat,jsp,servlet相關

          velocity等實用工具相關

          業務相關

          互聯網安全、過濾、網絡

          修煉

          其他

          區塊鏈

          壓力、性能測試相關

          地圖相關

          基礎

          多線程

          開發工具相關

          數據庫

          架構

          移動互聯網

          設計模式

          搜索

          •  

          最新評論

          linux安裝nginx

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

          2、解壓
          tar zxvf nginx-1.6.0.tar.gz
          進入nginx目錄,cd nginx-1.6.0

          3、配置
          ./configure

          配置過程中可能會報如下錯誤:
          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庫是實現Perl正則表達式的基礎。如果系統中缺少此庫需要編譯安裝。可以從著名的開源軟件網站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位系統上啟動時有可能報如下錯誤:
          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是主進程,關閉的時候kill這個進程,其他子進程會自動關掉

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










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

          主站蜘蛛池模板: 固安县| 张家港市| 兴山县| 瑞丽市| 资阳市| 绿春县| 巩义市| 弥渡县| 阿合奇县| 调兵山市| 双牌县| 云林县| 乌什县| 平利县| 垣曲县| 阿图什市| 九江县| 原平市| 灵武市| 宜兰市| 望谟县| 西畴县| 平南县| 贵港市| 东乌珠穆沁旗| 莲花县| 辽阳县| 凤翔县| 缙云县| 台中市| 新郑市| 小金县| 香港| 滨州市| 通道| 东至县| 孟津县| 天柱县| 鄂温| 孟村| 刚察县|