mac安装nginx步骤

来源:互联网 发布:时时技巧软件 编辑:程序博客网 时间:2024/05/16 10:00

以下是在mac os x 10.9.2 安装nginx步骤

安装PCRE

1、Download latest PCRE
2、安装
$ cd ~/Downloads$ tar xvzf pcre-8.5$ cd pcre-8.5$ sudo ./configure --prefix=/usr/local$ sudo make$ sudo make install

安装Nginx

1、Download latest nginx from Nginx.org
2、安装
$ cd ~/Downloads$ tar xvzf nginx-1.6.0.tar.gz$ cd nginx-1.6.0$ sudo ./configure --prefix=/usr/local/nginx --with-http_ssl_module --with-cc-opt="-Wno-deprecated-declarations"$ sudo make$ sudo make install

开启Nginx

1、将/usr/local/nginx/sbin加入到环境变量里
2、运行
$ sudo nginx 
3、打开浏览器 http://localhost,如果看到如下界面表明nginx启动正常了

4、停止
$ sudo nginx -s stop
0 0
原创粉丝点击