Nginx学习笔记——安装起步
来源:互联网 发布:大连理工大学网络教育 编辑:程序博客网 时间:2024/05/23 02:07
该文档所用的nginx版本
2016-01-26 nginx-1.8.1 stable and nginx-1.9.10 mainline versions
发音
nginx发音是engine x
。
版本
nginx的下载页面(http://nginx.org/en/download.html
)上会同时给出最新的Mainline version
、Stable version
和Legacy versions
,分别对应开发版、稳定版和历史版本。在生产环境建议使用稳定版本。
安装
安装依赖库
nginx依赖gcc
、openssl-devel
、pcre
和zlib-devel
,其中pcre
不在系统光盘中,需要单独安装。
pcre是为了使nginx支持HTTP Rewrite模块。全称是Perl Compatible Regular Expressions。
- pcre的版本说明
PCRE库有两个主要版本,最新版本PCRE2,2015年发布了10.21版本;被广泛部署的PCRE原始版本,最初于1997年发布,现在的版本是8.38,API和特性都已经稳定,将来的版本发布只会修复bug。
安装nginx
官方文档给出的从源码安装的步骤如下:
./configuremakesudo make install
默认情况下,nginx 会被安装到/usr/local/nginx目录。
安装程序打印的提示信息如下:
[gap@localhost nginx-1.8.0]$ sudo ./configure 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
一些重要的目录
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"
安装完成后,查看nginx版本信息。
[gap@localhost nginx]$ sbin/nginx -vnginx version: nginx/1.8.0
0 0
- Nginx学习笔记——安装起步
- nginx学习笔记【安装】
- Pro Git学习笔记(一)——起步
- jQuery Mobile学习笔记(二)——框架起步
- 《jQuery Mobile即学即用》学习笔记01——框架起步
- TensorFlow官方教程学习笔记(一)——起步
- laravel 学习笔记 —— 数据和模型起步篇
- jQuery Mobile学习笔记(二)——框架起步
- nginx 学习笔记(1) nginx安装
- 1.nginx学习笔记:nginx的安装
- nginx学习笔记1 nginx的安装
- nginx学习笔记之安装
- java 学习笔记--起步1
- Python学习笔记-Python起步
- Git学习笔记之一《起步》
- Vue.js起步学习笔记
- Nginx学习笔记(二)—— nginx中的rewrite
- Nginx学习笔记1—Nginx(Win32) 配置详解
- strlen()和sizeof()
- poj 1988 Cube Stacking
- bestcoder #72 DIV2 Clarke and MST 最大按位与的生成树
- App上架可能会遇到的事情以及解决方案
- mvc路由htaccess,基本是apache服务,php命名空间
- Nginx学习笔记——安装起步
- Stanford 机器学习 Week3 作业 Logistic Regression
- Office Web Apps安装部署
- Spring核心组件
- eerTcirtemmyS.101
- 排序笔记_4(自上而下、自底而上的归并排序)
- C#中的增删改查
- poj 1050 To the Max & uva 108
- 犀牛书随手记-06