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/这篇文章,如果你还没有安装,下面由我 ...
随机推荐
- thinkphp 命名范围
在应用开发过程中,使用最多的操作还是数据查询操作,凭借ThinkPHP的连贯操作的特性,可以使得查询操作变得更优雅和清晰,命名范围功能则是给模型操作定义了一系列的封装,让你更方便的操作数据. 命名范围 ...
- BZOJ2741:[FOTILE模拟赛]L
Description FOTILE得到了一个长为N的序列A,为了拯救地球,他希望知道某些区间内的最大的连续XOR和. 即对于一个询问,你需要求出max(Ai xor Ai+1 xor Ai+2 .. ...
- springMVC项目创建及导入包项
springMVC项目创建及导入包项 - zhangzhetaojj的博客 - CSDN博客https://blog.csdn.net/zhangzhetaojj/article/details/50 ...
- 用C++Builder在Windows开始按钮上绘图制作方法
熟悉Windows操作系统的软件设计人员知道,在Win95/98/NT/2000中有一任务栏(Task Bar)程序,路径为:C:\WINDOWS\SYSTEM\SYSTRAY.EXE(假设你的Win ...
- Bitcoin 的基本原理
昨天读到了 Bitcoin 的中文介绍,觉得非常有意思.不过上面这篇文章解释的非常不靠谱,我花了一晚上去Bitcoin的官方网站 仔细研究了一下,总算理解了其原理.感觉非常有启发,尤其是对虚拟货币的流 ...
- VS2010-MFC(利用MFC向导生成单文档应用程序框架)
一.VC++与MFC 讲VC++免不了要提MFC,MFC全称Microsoft Foundation Classes,也就是微软基础类库.它是VC++的核心,是C++与Windows API的结合,很 ...
- Apollo Lake设计缺陷,避免使用它们
很多经验告诉我们,在不大幅加电压超频的情况下,CPU很少会用坏.多数情况下电脑退役都是主板或其他部件故障,或是性能严重落后而不得不淘汰.但是如果CPU在制造阶段就存有缺陷的话,情况就不是这样了. 英特 ...
- mysql内建命令快速手记 — 让手指跟上思考的速度(一)
在微信公众号上看到一篇文章说的很好,意思是说,大牛在尝试各种方案的时候可能并没有超神的预测和筛选能力 只是你通常测试一种情况时,大神已经测试了好几种方案了,讲的是"为什么大多数程序员不喜欢写 ...
- linux中断处理-顶半部(top half)和底半部(bottom half) -转
原文:http://rensanshi.blog.163.com/blog/static/21395510820136282224877/ 设备的中断会打断内核中进程的正常调度和运行,系统对更高吞吐率 ...
- sql 递归查询,查出所有子节点
with t as ( select b.* from Base_Department b where ParentId = 'cce4152c-3483-4334-b68d-155da627bca0 ...