Nginx1.10.2安装配置
以下操作均在当前用户目录操作(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安装配置的更多相关文章
- centos nginx-1.10.3 安装
wget http://nginx.org/download/nginx-1.13.1.tar.gz nginx 依赖 pcre 库,要先安装pcre,因为nginx 要在rewrite 要解析正则表 ...
- lnmp之nginx1.10.2安装
linux下nginx的安装 为了后面避免缺失,还是什么都安装一下(后面安装php和mysql就不需要重复再执行下面这个了,当然你再执行一遍也没问题) [root@localhost src]# yu ...
- Windows 10下安装配置Caffe并支持GPU加速(修改版)
基本环境 建议严格按照版本来 - Windows 10 - Visual Studio 2013 - Matlab R2016b - Anaconda - CUDA 8.0.44 - cuDNN v4 ...
- linux Nginx-1.10.2 安装部署教程
一.下载Nginx以及依赖组件[root@localhost src]# wget http://nginx.org/download/nginx-1.10.2.tar.gz [root@localh ...
- Windows和Linux下apache-artemis-2.10.0安装配置
window下安装配置 一.官网下载 http://activemq.apache.org/artemis/download.html 二.百度网盘下载 链接:https://pan.baidu.c ...
- Solr4.10.3安装配置
系统环境 window版本为:windows 8.1 64位 软件环境 JDK版本:1.7 solr版本:4.10.3 tomcat版本:tomcat 7 安装过程 步骤一:将下载好的solr-4.1 ...
- MySQL 5.7.10 免安装配置
# 配置环境:windows 64bit # 安装版本:mysql-5.7.10-win32(zip archive版本) 1. ZIP Archive版是免安装的,只需把mysql-5.7.10-w ...
- Kafka0.10.0安装配置
1 解压文件 tar -zvxf kafka_2.11-0.10.0.0.tgz 2 修改配置server.properties vim server.properties broker.id=1 z ...
- mac osx 10.9安装配置macvim
如果你已经安装了macvim,升级后又不能用了,建议你可以看看http://kodira.de/2013/10/macvim-osx-10-9-mavericks/这篇文章,如果你还没有安装,下面由我 ...
随机推荐
- leetcode-123-买卖股票的最佳时机③
题目描述: 方法一: class Solution: def maxProfit(self, prices: List[int]) -> int: dp_i1_0 = 0 dp_i1_1 = f ...
- 【玲珑杯 round#18 A】计算几何你瞎暴力
[Link]:http://www.ifrog.cc/acm/problem/1143?contest=1020&no=0 [Description] [Solution] 因为每个点的(xi ...
- 项目接入即时聊天客服系统(环信系统)PHP后端操作
环信工作原理: 一.由于环信没有直接的接口来主动调取本项目中的用户数据,所有用户信息必须在环信服务器上注册对应信息成为环信的用户:(这样才能当用户进入聊天时显示其基本信息,如:名称.昵称.电话.邮箱等 ...
- 深入浅出Mybatis系列(六)---objectFactory、plugins、mappers简介与配置[转]
上篇文章<深入浅出Mybatis系列(五)---TypeHandler简介及配置(mybatis源码篇)>简单看了一下TypeHandler, 本次将结束对于mybatis的配置文件的学习 ...
- work-shineyoo:杂项1906
ylbtech-work-shineyoo:杂项1906 1.返回顶部 1. 1.1 SMS (手机的)短信服务.Short Message Service. 1.2 VOD 视频点播.Video o ...
- uploadify附件上传 传参
首先 在刚加载jsp时就加入上传方法,所以 formDate 中的参数 zFileName是页面刚加载时 exp1的值 ,后来通过js方法赋值不被读过来,如果 你想要获得这个值,可在 调用upload ...
- java基础之System类
System类概述System 类包含一些有用的类字段和方法.它不能被实例化. 成员方法 public static void gc()运行垃圾回收器 public static void exit( ...
- Python自学--part2
概要 列表.元组操作 字符串操作 字典操作 集合操作 文件操作 字符编码与转码 一.列表.元祖操作 列表是我们最以后最常用的数据类型之一,通过列表可以对数据实现最方便的存储.修改等操作 定义列表 na ...
- 【LGP4389】付公主的背包
题目 退役前抄一道生成函数快乐一下 就是让我们做一个完全背包,但是朴素的做法显然是\(O(nm)\)的 把每一个物品搞成一个多项式,显然这个多项式所有\(v_i\)的倍数箱为\(1\),剩下的为\(0 ...
- Ubuntu安装CUDA9.2(不更新驱动)
1.先装驱动,以为安装CUDA时安装最新驱动导致CUDA用不了 sudo apt-get install nvidia-396 2.参考这,安装好CUDA 9.2 https://developer. ...