MAC OS X 10.9 下 Nginx的安装笔记(为后续搞Nginx+Redis+Tomcat集群做准备)
来源:互联网 发布:交大软件工程硕士 在职 编辑:程序博客网 时间:2024/05/21 06:44
Nginx的强大不必说了,必须要用,搞起!!
1,先安装PCRE库,这个是Nginx rewrite 反向代理需要依赖的正则表达式库
我下载的是8.33版本,www.pcre.org
下载在/opt/pcre-8.33.tar.gz 执行:如下命令
cd ~/opttar xvzf pcre-8.33.tar.gzcd pcre-8.33sudo ./configure --prefix=/usr/localsudo makesudo make install
2,下载安装Nginx
我这里采用 nginx-1.5.2 下载地址:http://nginx.org/download/nginx-1.5.2.tar.gz
同样存放在/opt下,然后执行:
tar -zvxf nginx-1.5.2.tar.gzcd nginx-1.5.2安装前配置
./configure --prefix=/usr/local --sbin-path=/usr/local/sbin --conf-path=/etc/nginx --pid-path=/var/run --error-log-path=/var/log/nginx--http-log-path=/var/log/nginx
然后编译和安装
make make instal编译后的一些日志
Configuration summary+ using system PCRE library+ OpenSSL library is not used+ md5: using system crypto library+ sha1: using system crypto library+ using system zlib library # 默认编译参数对应的安装路径(*_temp 为目录)nginx path prefix: "/usr/local/nginx"nginx binary file: "/usr/local/nginx/sbin/nginx"nginx configuration prefix: "/usr/local/nginx/conf"nginx configuration file: "/usr/local/nginx/conf/nginx.conf"nginx pid file: "/usr/local/nginx/logs/nginx.pid"nginx error log file: "/usr/local/nginx/logs/error.log"nginx http access log file: "/usr/local/nginx/logs/access.log"nginx http client request body temporary files: "client_body_temp"nginx http proxy temporary files: "proxy_temp"nginx http fastcgi temporary files: "fastcgi_temp"nginx http uwsgi temporary files: "uwsgi_temp"nginx http scgi temporary files: "scgi_temp"
接下来
~/.bash_profile export PATH=/usr/local/bin:/usr/local/sbin:$PATH
如果发现
.bash_profile文件不存在,则touch.bash_profile新建,然后vim编辑设置环境变量即可ok,最后一步 来到 /usr/local/nginx/sbin下 执行 sudo nginx 启动Nginx 搞定默认端口是80 打开浏览器 http://localhost/
搞定了! 初步安装好,还需要后续的配置。
0 0
- MAC OS X 10.9 下 Nginx的安装笔记(为后续搞Nginx+Redis+Tomcat集群做准备)
- Mac OS X 下编译安装 Nginx
- Mac OS X 下编译安装 Nginx
- 服务器-Nginx-Mac OS X 下编译安装 Nginx
- Mac OS X安装Nginx
- Mac OS X 安装 Nginx
- Mac OS X 安装 Nginx
- nginx+tomcat+redis做集群负载均衡
- Mac os x下配置nginx + php
- Mac OS X 安装 nginx + php fcgi
- 在mac os x 10.9.2上安装nginx
- Nginx+Tomcat+redis 集群安装及配置
- Nginx + Tomcat + Redis 集群下的Session共享
- nginx+tomcat+redis的集群+session共享
- 我的Mac os x中的nginx配置文件nginx.conf
- 1.mac os x下redis的安装
- windows下nginx+tomcat集群配置笔记
- nginx tomcat集群安装
- 使用java代码调用exe程序 (包括参数传递)
- 很简单的爬楼梯问题
- 1.javaScript(JS)常用函数之 appendChild 和removeChild
- 《深入理解LINUX内存管理》学习笔记
- python 连接oracle 报错 cx_Oracle.DatabaseErro
- MAC OS X 10.9 下 Nginx的安装笔记(为后续搞Nginx+Redis+Tomcat集群做准备)
- codeblocks缩进等设置
- 习题6-1 平衡的括号 UVa673
- H.264学习 之 步步为营,我的切身体会 [复制链接]
- 二叉树的深度优先遍历与广度优先遍历
- Windows8中将窗体背景修改为苹果绿
- 緣是心靈的契合
- The reference to entity "preinfo" must end with the ';'delimiter.
- 关于mysqldump的ERROR 1449 问题