Linux下一个Nginx安装步骤
2015-07-05 16:14
716 查看
一个、下载pcre
官网下载:http://www.pcre.org/
# wget http://sourceforge.net/projects/pcre/files/pcre/8.35/pcre-8.35.tar.gz/download
# cd /pcre-8.35
二、下载purge模块(用于删除Nginx缓存)
# wget http://labs.frickle.com/files/ngx_cache_purge-2.1.tar.gz
# tar zxvf ngx_cache_purge-2.1.tar.gz
三、安装zlib
# wget http://prdownloads.sourceforge.net/libpng/zlib-1.2.8.tar.gz?download
# tar zxvf zlib-1.2.8.tar.gz
# cd zlib-1.2.8
# ./configure --prefix=/usr/local/zlib
# make && make install
四、安装openssl
# wget http://www.openssl.org/source/openssl-1.0.1h.tar.gz
# cd openssl-1.0.1h.tar.gz
# tar zxfv openssl-1.0.1h.tar.gz
# cd openssl-1.0.1h
# ./config
# ./config --prefix=/usr/local/openssl
# make && make install
五、安装gcc-c++
# yum install -y gcc-c++
六、下载最新的nginx稳定版进行安装
# wget http://nginx.org/download/nginx-1.7.2.tar.gz
# tar zxvf nginx-1.7.2.tar.gz
# ./configure --with-pcre=/data/software/pcre-8.35 --add-module=../ngx_cache_purge-2.1 --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-zlib=/usr/local/zlib --with-openssl=/data/software/openssl-1.0.1h
安装:make && make install
注:假设出现:error: 'ngx_http_file_cache_node_t' has no member named 'length'异常,可能是ngx_cache_purge-2.1.tar.gz版本号是太老结果
官网下载:http://www.pcre.org/
# wget http://sourceforge.net/projects/pcre/files/pcre/8.35/pcre-8.35.tar.gz/download
# cd /pcre-8.35
二、下载purge模块(用于删除Nginx缓存)
# wget http://labs.frickle.com/files/ngx_cache_purge-2.1.tar.gz
# tar zxvf ngx_cache_purge-2.1.tar.gz
三、安装zlib
# wget http://prdownloads.sourceforge.net/libpng/zlib-1.2.8.tar.gz?download
# tar zxvf zlib-1.2.8.tar.gz
# cd zlib-1.2.8
# ./configure --prefix=/usr/local/zlib
# make && make install
四、安装openssl
# wget http://www.openssl.org/source/openssl-1.0.1h.tar.gz
# cd openssl-1.0.1h.tar.gz
# tar zxfv openssl-1.0.1h.tar.gz
# cd openssl-1.0.1h
# ./config
# ./config --prefix=/usr/local/openssl
# make && make install
五、安装gcc-c++
# yum install -y gcc-c++
六、下载最新的nginx稳定版进行安装
# wget http://nginx.org/download/nginx-1.7.2.tar.gz
# tar zxvf nginx-1.7.2.tar.gz
# ./configure --with-pcre=/data/software/pcre-8.35 --add-module=../ngx_cache_purge-2.1 --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-zlib=/usr/local/zlib --with-openssl=/data/software/openssl-1.0.1h
安装:make && make install
注:假设出现:error: 'ngx_http_file_cache_node_t' has no member named 'length'异常,可能是ngx_cache_purge-2.1.tar.gz版本号是太老结果
相关文章推荐
- nginx集群和动静分离初步配置
- Nginx学习之一——编译nginx
- Nginx实战之--后端节点健康检查
- nginx-php
- nginx配置详解
- saltstack之nginx部署
- nginx事件 epoll
- nginx命令:启动,停止及命令参数详解
- nginx apache
- nginx 仅允许某个IP段访问
- Nginx+Keepalived实现Web服务器负载均衡
- ubuntu_14.04.2安装配置laravel+nginx
- Ubuntu nginx 配置404错误页面
- nginx虚拟目录(alias与root的区别)
- Nginx Upstream Keepalive 分析
- Nginx 与 Lua
- Nginx+lua_Nginx+GraphicsMagick来实现实时缩略图(已验证)
- NGINX + LUA实现复杂的控制
- nginx lua
- Nginx配置