<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

    搜索

    •  

    積分與排名

    • 積分 - 914354
    • 排名 - 40

    最新評論

    主站蜘蛛池模板: 国产成人精品久久亚洲| 亚洲av高清在线观看一区二区 | 亚洲日韩中文字幕在线播放| 69av免费观看| 亚洲1区2区3区精华液| 亚洲av不卡一区二区三区| 免费国产怡红院在线观看| a级成人毛片免费图片| 亚洲av成人一区二区三区在线播放| 亚洲AV无码1区2区久久| 国产精品酒店视频免费看| 久久大香香蕉国产免费网站 | 国产三级在线免费| 国产精品亚洲一区二区三区久久 | 国产大陆亚洲精品国产| 精品亚洲A∨无码一区二区三区| 国产小视频在线免费| 国产乱人免费视频| 青青青免费国产在线视频小草| 一级毛片在线完整免费观看| 男性gay黄免费网站| 无遮挡国产高潮视频免费观看 | 亚洲人成网站999久久久综合| 亚洲国产第一页www| 国产AV无码专区亚洲AV毛网站| 四虎影视精品永久免费| 国产h视频在线观看网站免费| 成人妇女免费播放久久久| 国产精品亚洲专区无码牛牛| 亚洲制服丝袜第一页| 亚洲国产精品成人综合久久久| 久久久久亚洲AV无码观看| 亚洲成av人片天堂网| 久久青草亚洲AV无码麻豆| 亚洲码一区二区三区| 亚洲一区二区在线免费观看| 亚洲中文无码av永久| 亚洲AV无码之国产精品| 涩涩色中文综合亚洲| 特级毛片全部免费播放| 国产精品免费在线播放|