码迷,mamicode.com
首页 > 系统相关 > 详细

Mac下 配置Nginx

时间:2015-08-26 20:41:05      阅读:211      评论:0      收藏:0      [点我收藏+]

标签:

1.先安装Wget库

curl -O http://ftp.gnu.org/gnu/wget/wget-1.13.4.tar.gz

cd wget-1.13.4

./configure --with-ssl=openssl

sudo make

sudo make install

1.先安装PCRE库

可以在这里下载最新版   sourcef*ge

wget http://sourceforge.net/projects/pcre/files/pcre/8.37/pcre-8.37.tar.gz
tar zxvf pcre-8.37.tar.gz
cd pcre-8.37
sudo ./configure --prefix=/usr/local
sudo make
sudo make install



1.先安装Nginx库


cd nginx-1.9.4


./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-cc-opt="-Wno-deprecated-declarations"

sudo make


sudo make install


sudo ln -s /usr/local/nginx/sbin/nginx /usr/local/bin/nginx
  267  sudo ln -s /usr/local/nginx/conf /etc/nginx
  268  sudo ln -s /usr/local/nginx/logs/nginx.pid /var/run/nginx.pid
  269  sudo ln -s /usr/local/nginx/logs /var/log/nginx

启动Nginx

sudo nginx

停止 Nginx

sudo nginx -s stop

Mac下 配置Nginx

标签:

原文地址:http://my.oschina.net/httpssl/blog/497456

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!