在Imac上安装nginx
来源:互联网 发布:磁盘恢复软件免费版 编辑:程序博客网 时间:2024/06/13 13:17
概述
以下是在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、安装
2.1、在安装nginx的过程中我出现了下面这个问题
./configure: error: SSL modules require the OpenSSL library.You can either do not enable the modules, or install the OpenSSL libraryinto the system, or build the OpenSSL library statically from the sourcewith nginx by using --with-openssl=<path> option.意思大概就是没有找到OpenSSL library。所以就去http://www.openssl.org/source/去找到最新的OpenSSL library下载下来。
注意下载的保存路径下面有用。因为报这个错误,就不能使用sudo ./configure --prefix=/usr/local/nginx --with-http_ssl_module --with-cc-opt="-Wno-deprecated-declarations"
要使用
sudo ./configure --prefix=/usr/local/nginx --with-openssl=<path> --with-cc-opt="-Wno-deprecated-declarations"
注意这个path就是你刚才下载OpenSSL library的保存路径。
$ 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加入到环境变量里(如果没有添加环境变量,就不能直接使用sudo nginx,而是要使用绝对路径去访问sudo /usr/local/nginx/sbin/nginx 去访问)
2、运行
$ sudo nginx
3、打开浏览器 http://localhost,如果看到如下界面表明nginx启动正常了
4、停止
$ sudo nginx -s stop
0 0
- 在Imac上安装nginx
- 在iMac上安装Tiger,在DMG方式安装Leopard
- 在Unbuntu上安装Nginx
- 在mac上安装nginx
- 在mac上安装nginx
- 在Ubuntu上安装Nginx
- 在ubuntu上安装nginx
- 在mac上安装nginx
- 在centos7上安装nginx
- 在linux上安装nginx
- 在linux上安装nginx
- 在Linux上安装Nginx
- 在Mac上安装nginx
- Nginx在Mac上的安装配置
- Nginx+mysql+php 在linux上安装
- 在ubuntu14.10上安装uwsgi+nginx
- 如何在 VPS 上安装 Nginx
- 在CentOS上安装nginx服务器
- 2016-1-7-Thingking in Java 读书笔记(三)--操作符
- mysql group by 用法解析(详细)
- Leetcode220: First Missing Positive
- 第一篇博客
- 点击键盘的 next 按钮,在不同的 textField 之间换行
- 在Imac上安装nginx
- cstring转const char*
- <div>标签嵌套多层如何找准位置
- 图解SQL的各种连接(Inner join,outer join,left join,right join)
- 修改xcode生成app的名字
- Galileo Gen1 XDK尝试
- AndroidStudio 开发遇到的问题
- 进制转换
- mysql load csv