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

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

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

    nginx 是一個輕量級的高性能HTTP 以及反向代理服務器,今天在MAC 上安裝成功。

    我是通過brewhome 來安裝的,很簡單。brew install nginx 一路順暢。。。

    下面是安裝信息。
    hematoMacBook-Pro:~ hechangmin$ brew search nginx
    nginx
    hematoMacBook-Pro:~ hechangmin$ brew install nginx
    ==> Installing nginx dependency: pcre
    ==> Downloading ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.13.
    ######################################################################## 100.0%
    ######################################################################## 100.0%==> ./configure --prefix=/usr/local/Cellar/pcre/8.13 --enable-utf8 --enable-unic
    ==> make test
    ==> make install
    /usr/local/Cellar/pcre/8.13: 111 files, 2.9M, built in 54 seconds
    ==> Installing nginx
    ==> Downloading http://nginx.org/download/nginx-1.0.8.tar.gz
    ######################################################################## 100.0%
    ==> Patching
    patching file auto/lib/pcre/conf
    patching file conf/nginx.conf
    ==> ./configure --prefix=/usr/local/Cellar/nginx/1.0.8 --with-http_ssl_module --with-pcre --conf-path=/usr/local/etc/nginx/nginx.conf --pid-path=/usr/local/var/run/nginx.pid --lock-path=/usr/local/var/ngi
    ==> make install
    ==> Caveats
    In the interest of allowing you to run `nginx` without `sudo`, the default
    port is set to localhost:8080.

    If you want to host pages on your local machine to the public, you should
    change that to localhost:80, and run `sudo nginx`. You'll need to turn off
    any other web servers running port 80, of course.

    You can start nginx automatically on login running as your user with:
    mkdir -p ~/Library/LaunchAgents
      cp /usr/local/Cellar/nginx/1.0.8/org.nginx.nginx.plist ~/Library/LaunchAgents/
      launchctl load -w ~/Library/LaunchAgents/org.nginx.nginx.plist

    Though note that if running as your user, the launch agent will fail if you
    try to use a port below 1024 (such as http's default of 80.)
    Warning: /usr/local/sbin is not in your PATH
    You can amend this by altering your ~/.bashrc file
    ==> Summary
    /usr/local/Cellar/nginx/1.0.8: 6 files, 616K, built in 19 seconds
    hematoMacBook-Pro:~ hechangmin$ 

    啟動nginx ,sudo nginx ;訪問localhost:8080 發現已出現nginx的歡迎頁面了。

    備注: ln -s  /usr/local/sbin/nginx /usr/bin/nginx 做了個軟連接。
    常用的指令有:
    nginx -V 查看版本,以及配置文件地址
    nginx -v 查看版本
    nginx -c filename 指定配置文件
    nginx -h 幫助
    nginx -s [reload\reopen\stop\quit]

    brewhome 常用的指令: 
    brew search mysql : 搜索具體的程序包
    brew install mysql : 安裝具體的程序包
    brew info mysql : 查看具體程序的信息
    brew uninstall mysql : 卸載具體的應用(這里只是用mysql  作個例子)


    我這里的配置文件地址:/usr/local/etc/nginx/nginx.conf
    編輯內容,可以制定web 目錄,以及PHP 、python 等。。
    posted on 2011-11-04 15:34 -274°C 閱讀(15201) 評論(1)  編輯  收藏 所屬分類: mac


    FeedBack:
    # re: mac 下 nginx 環境的搭建
    2011-11-10 15:23 | tb
    收藏了  回復  更多評論
      

    常用鏈接

    留言簿(21)

    隨筆分類(265)

    隨筆檔案(242)

    相冊

    JAVA網站

    關注的Blog

    搜索

    •  

    積分與排名

    • 積分 - 914414
    • 排名 - 40

    最新評論

    主站蜘蛛池模板: 亚洲综合图片小说区热久久| 日韩免费高清一级毛片在线| 国产亚洲美女精品久久久| 亚洲综合激情五月丁香六月| 在线视频免费观看爽爽爽| 亚洲人成电影亚洲人成9999网| a级毛片毛片免费观看久潮| 国产亚洲精品激情都市| eeuss影院www天堂免费| 久久亚洲国产精品五月天婷| 久久久久久噜噜精品免费直播 | 国产在线观看免费av站| 亚洲一区二区三区在线播放| 国产精品免费看久久久香蕉| 亚洲色精品vr一区二区三区| 久久精品无码精品免费专区| 亚洲精品福利网泷泽萝拉| 国产又黄又爽又猛免费app| 亚洲中文字幕无码一去台湾| 成人免费视频试看120秒| 亚洲国产av玩弄放荡人妇| 国产男女猛烈无遮档免费视频网站| 视频一区在线免费观看| 亚洲午夜无码片在线观看影院猛| 国产免费阿v精品视频网址| 久久久亚洲裙底偷窥综合| 中文字幕无码不卡免费视频| 国产成人综合亚洲一区| 在线观看亚洲成人| 97在线视频免费公开观看| 亚洲一卡2卡三卡4卡无卡下载| yy6080久久亚洲精品| a级毛片免费高清毛片视频| 亚洲日本在线免费观看| 国产精品免费_区二区三区观看| 国产成人无码精品久久久久免费| 亚洲国产成人高清在线观看| 91视频国产免费| jizz免费在线观看| 亚洲免费在线视频观看| 国产免费av片在线无码免费看|