以下操作均在当前用户目录操作(root的目录,截止2016.11.2最新版本)

1、安装常用工具及基础包:
yum -y install wget git vim make gcc gcc-c++ openssl-devel
mkdir -p /nginx/module

2、安装pcre模块:
wget -P/src/ http://nchc.dl.sourceforge.net/project/pcre/pcre/8.39/pcre-8.39.tar.gz
tar -xzvf /src/pcre-8.39.tar.gz -C /nginx/module/

3、安装OpenSSL模块:
wget -P /src/ https://www.openssl.org/source/openssl-1.0.2j.tar.gz
tar -xzvf /src/openssl-1.0.2j.tar.gz -C /nginx/module/

4、安装zlib模块:
wget -P /src/ http://zlib.net/zlib-1.2.8.tar.gz
tar -xzvf /src/zlib-1.2.8.tar.gz -C /nginx/module/

5、安装LuaJIT模块:
wget -P /src/ http://luajit.org/download/LuaJIT-2.0.4.tar.gz
tar -xzvf /src/LuaJIT-2.0.4.tar.gz -C /src/
cd /src/LuaJIT-2.0.4
make
make install

6、安装lua-nginx-module模块:
wget -P /src/ https://github.com/openresty/lua-nginx-module/archive/v0.10.6.tar.gz
tar -xzvf /src/v0.10.6.tar.gz -C /nginx/module/

7、安装nginx sticky模块:
wget -P /src/ https://bitbucket.org/nginx-goodies/nginx-sticky-module-ng/get/1.2.6.zip
mv 1.2.6.zip nginx-sticky-module-1.2.6.zip
unzip -x nginx-sticky-module-1.2.6.zip
mv nginx-sticky-module-1.2.6 /nginx/module/nginx-sticky-module-1.2.6

8、安装echo-nginx模块:
wget -P /src/ https://github.com/openresty/echo-nginx-module/archive/v0.60.tar.gz
mv /src/v0.60.tar.gz /src/echo-nginx-module-0.60.tar.gz
tar -xzvf /src/echo-nginx-module-0.60.tar.gz -C /nginx/module/

9、安装ngx_cache_purge模块:
wget -P /src/ https://github.com/FRiCKLE/ngx_cache_purge/archive/2.3.tar.gz
mv /src/2.3.tar.gz /src/ngx_cache_purge-2.3.tar.gz
tar -xzvf /src/ngx_cache_purge-2.3.tar.gz -C /nginx/module/

10、安装ngx_http_lower_upper_case:
wget -P /src/ https://github.com/replay/ngx_http_lower_upper_case/archive/master.zip
mv /src/master.zip /src/ngx_http_lower_upper_case-master.zip
unzip -x ngx_http_lower_upper_case-master.zip
mv ngx_http_lower_upper_case-master /nginx/module/ngx_http_lower_upper_case

11、安装、配置Nginx:
wget -P /src/ http://nginx.org/download/nginx-1.10.2.tar.gz
tar -xzvf /src/nginx-1.10.2.tar.gz -C /src/
cd /src/nginx-1.10.2
[root@iZ94z6kec72Z nginx-1.10.2]#./configure --prefix=/nginx \
--with-http_v2_module \
--with-http_ssl_module \
--with-http_realip_module \
--with-http_gzip_static_module \
--with-http_stub_status_module \
--with-pcre=/nginx/module/pcre-8.39 \
--with-zlib=/nginx/module/zlib-1.2.8 \
--with-openssl=/nginx/module/openssl-1.0.2j \
--add-module=/nginx/module/lua-nginx-module-0.10.6 \
--add-module=/nginx/module/nginx-sticky-module-1.2.6 \
--add-module=/nginx/module/echo-nginx-module-0.60 \
--add-module=/nginx/module/ngx_cache_purge-2.3 \
--add-module=/nginx/module/ngx_http_lower_upper_case
[root@iZ94z6kec72Z nginx-1.10.2]# make
[root@iZ94z6kec72Z nginx-1.10.2]# make install

=========================================================================

ssl_dhparam /nginx/ssl/dhparam.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;

/nginx/sbin/nginx -c /nginx/conf/nginx.conf

[root@iZ94z6kec72Z sbin]# /nginx/sbin/nginx -c /nginx/conf/nginx.conf
/nginx/sbin/nginx: error while loading shared libraries: libluajit-5.1.so.2: cannot open shared object file: No such file or directory

# cat /etc/ld.so.conf
include ld.so.conf.d/*.conf
# echo "/usr/local/lib" >> /etc/ld.so.conf
# ldconfig

[root@iZ94z6kec72Z sbin]# /nginx/sbin/nginx -c /nginx/conf/nginx.conf

1、关闭firewall:
[root@node-01 ~]# systemctl stop firewalld.service
#停止firewall
[root@node-01 ~]# systemctl disable firewalld.service 或 systemctl mask firewalld.service
#禁止firewall开机启动

2、安装iptables防火墙
[root@node-01 ~]# yum install iptables-services -y
[root@node-01 ~]# systemctl enable iptables

开放80的Web访问规则
[root@node-01 ~]# vi /etc/sysconfig/iptables
添加一条配置规则,如要想开放8080的端口,如下所示:
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 8080 –j ACCEPT

重启iptables
[root@node-01 ~]# systemctl restart iptables.service

Nginx1.10.2安装配置的更多相关文章

  1. centos nginx-1.10.3 安装

    wget http://nginx.org/download/nginx-1.13.1.tar.gz nginx 依赖 pcre 库,要先安装pcre,因为nginx 要在rewrite 要解析正则表 ...

  2. lnmp之nginx1.10.2安装

    linux下nginx的安装 为了后面避免缺失,还是什么都安装一下(后面安装php和mysql就不需要重复再执行下面这个了,当然你再执行一遍也没问题) [root@localhost src]# yu ...

  3. Windows 10下安装配置Caffe并支持GPU加速(修改版)

    基本环境 建议严格按照版本来 - Windows 10 - Visual Studio 2013 - Matlab R2016b - Anaconda - CUDA 8.0.44 - cuDNN v4 ...

  4. linux Nginx-1.10.2 安装部署教程

    一.下载Nginx以及依赖组件[root@localhost src]# wget http://nginx.org/download/nginx-1.10.2.tar.gz [root@localh ...

  5. Windows和Linux下apache-artemis-2.10.0安装配置

     window下安装配置 一.官网下载 http://activemq.apache.org/artemis/download.html 二.百度网盘下载 链接:https://pan.baidu.c ...

  6. Solr4.10.3安装配置

    系统环境 window版本为:windows 8.1 64位 软件环境 JDK版本:1.7 solr版本:4.10.3 tomcat版本:tomcat 7 安装过程 步骤一:将下载好的solr-4.1 ...

  7. MySQL 5.7.10 免安装配置

    # 配置环境:windows 64bit # 安装版本:mysql-5.7.10-win32(zip archive版本) 1. ZIP Archive版是免安装的,只需把mysql-5.7.10-w ...

  8. Kafka0.10.0安装配置

    1 解压文件 tar -zvxf kafka_2.11-0.10.0.0.tgz 2 修改配置server.properties vim server.properties broker.id=1 z ...

  9. mac osx 10.9安装配置macvim

    如果你已经安装了macvim,升级后又不能用了,建议你可以看看http://kodira.de/2013/10/macvim-osx-10-9-mavericks/这篇文章,如果你还没有安装,下面由我 ...

随机推荐

  1. leetcode-117-填充每个节点的下一个右侧节点指针②

    ---恢复内容开始--- 题目描述: 方法一:层次遍历 """ # Definition for a Node. class Node: def __init__(sel ...

  2. where方法的用法是ThinkPHP查询语言的精髓

    where方法的用法是ThinkPHP查询语言的精髓,也是ThinkPHP ORM的重要组成部分和亮点所在,可以完成包括普通查询.表达式查询.快捷查询.区间查询.组合查询在内的查询操作.where方法 ...

  3. 线性dp——cf1032

    升维来保存第i位按j是否可行,然后枚举i-1个的状态,用5*5n就可以完成递推 /* dp[i][j]==0表示第i步按j不可行 */ #include<bits/stdc++.h> us ...

  4. form表单简易注册登陆

    注册页面: html <form action="updata.php" method="post" id="text_form"&g ...

  5. c语言学习笔记 - 指针和数组

    结合内存存储数据的机制,c语言里指针的出现和使用也就不奇怪了,如果先学了内存的一些知识,以及程序运行机制,到了c指针这块就会清晰很多. #include <stdio.h> int mai ...

  6. CSS工程化

    CSS工程化 引言: 你在编写CSS代码时,是否遇到过这样的问题: 代码没有层次结构,难以看出嵌套关系 .site-footer .footer-container .footer-menu { di ...

  7. centos7 安装 python3

    sudo yum -y groupinstall "Development tools" sudo yum -y install zlib-devel bzip2-devel op ...

  8. 使用Windows任务计划程序和Python备份Mysql数据库

    目标:每日定时自动备份Mysql数据库 方案: 1.安装Python: 使用的Python版本是Python3.7.1,下载地址:https://www.python.org/downloads/re ...

  9. springboot4.1.1的log4j2配置

    一.默认情况下,Spring Boot会用Logback来记录日志,并用INFO级别输出到控制台: 日志输出内容元素具体如下: 时间日期:精确到毫秒 日志级别:ERROR, WARN, INFO, D ...

  10. MySQL的高可用实现方案之mysql-mmm

    一.环境简述 1.工作逻辑图 2.MySQL-MMM优缺点 优点:高可用性,扩展性好,出现故障自动切换,对于主主同步,在同一时间只提供一台数据库写操作,保证的数据的一致性. 缺点:Monitor节点是 ...