nginx 安装
mac上安装nginx
下载链接:
http://nginx.org/en/download.html
http://nginx.org/download/nginx-1.2.0.tar.gz
//step1: 解压安装文件
tar -xf nginx-1.2.0.tar.gz
//step2: 进入解压目录
chmod a+rwx *
//step3: 配置nginx要安装的插件
./configure --user=nginx --group=nginx --prefix=/opt/nginx --with-http_realip_module --with-http_addition_module --with-http_gzip_static_module --with-http_random_index_module --with-http_stub_status_module --with-http_sub_module --with-http_dav_module --with-http_perl_module --with-http_ssl_module
//step4: 安装
make && make install
//step5: 启动ngnix
sudo /usr/local/nginx/sbin/nginx
浏览器访问 http://localhost,页面上出现“welcome to nginx!”,说明安装成功!
Written on September 1, 2015