nginx 安装记录
来源:互联网 发布:javascript实例大全 编辑:程序博客网 时间:2024/06/15 00:09
gcc
安装nginx需要先将官网下载的源码进行编译,编译依赖gcc环境,如果没有gcc环境,需要安装gcc:
yum install gcc-c++
PCRE
PCRE(Perl Compatible Regular Expressions)是一个Perl库,包括 perl兼容的正则表达式库。nginx的http模块使用pcre来解析正则表达式,所以需要在linux上安装pcre库。
注:pcre-devel是使用pcre开发的一个二次开发库。nginx也需要此库。
yum install -y pcre pcre-devel
zlib
zlib库提供了很多种压缩和解压缩的方式,nginx使用zlib对http包的内容进行gzip,所以需要在linux上安装zlib库。
yum install -y zlib zlib-devel
openssl
OpenSSL 是一个强大的安全套接字层密码库,囊括主要的密码算法、常用的密钥和证书封装管理功能及SSL协议,并提供丰富的应用程序供测试或其它目的使用。
nginx不仅支持http协议,还支持https(即在ssl协议上传输http),所以需要在linux安装openssl库。
yum install -y openssl openssl-devel
下载tengine包
wget http://tengine.taobao.org/download/tengine.tar.gz
tar zvxf tengine.tar.gz
./configure --prefix=/opt/nginx (安装到/opt/nginx 目录下)
make && make install
cd /opt/nginx
./sbin/nginx -t (检测配置文件)
如果显示下面信息,即表示配置没问题
nginx: the configuration file /opt/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /opt/nginx/conf/nginx.conf test is successful
[root@centos ~]# ./sbin/nginx
[root@centos ~]# ps au|grep nginx
如果显以类似下面的信息,即表示nginx已经启动
root 2013 0.0 0.0 103156 856 pts/0 S+ 03:22 0:00 grep nginx
详情请看 :http://blog.csdn.net/qq_15766181/article/details/51959921
- Nginx 安装记录
- nginx+memcache安装记录
- nginx服务器安装记录
- nginx服务器安装记录
- nginx安装配置记录
- nginx安装配置记录
- nginx 安装记录
- nginx安装记录
- nginx学习记录01-安装nginx
- nginx服务一---nginx部署安装记录
- ubuntu9.04安装nginx记录
- Nginx 1.2.7安装记录
- Ubuntu 12.04 Nginx 安装记录
- Nginx和Tomcat安装记录
- MacOS 下 Nginx 安装记录
- Nginx安装学习使用详细记录
- Nginx的安装(实践记录)
- 【操作记录】CentOS编译安装nginx
- struts2监听器
- 利用js-对象实现简单的动态论坛页面
- C语言+EasyX 鼠标控制角色移动
- Redis——数据持久化AOF与RDB
- Angular中Constructor 和 ngOnInit 的本质区别
- nginx 安装记录
- 107. Binary Tree Level Order Traversal II
- js toLocaleString() 方法-----前端使得数字有千位分隔符-三位一个逗号间隔。
- java实现分布式锁
- 三、使用 CMAKE 编译工程
- 主成分分析(PCA)原理详解 2016/12/17 · IT技术 · 主成分分析, 数学 分享到: 21 原文出处: 中科春哥 一、PCA简介 1. 相关背景 主成分分析(Principa
- MATLAB图像处理-流控制和代码优化
- Spring Aspect简单实例
- codeforces 848E. Days of Floral Colours