一、 nginx环境搭建

第一步
下载 LuaJIT-2.0.4.tar.gz http://luajit.org/download/LuaJIT-2.0.4.tar.gz
安装 make && make install

第二步
下载nginx依赖的模块:
openssl-1.0.2e.tar.gz https://www.openssl.org/source/old/1.0.2/openssl-1.0.2g.tar.gz
pcre-8.37.tar.gz http://exim.mirror.fr/pcre/pcre-8.37.tar.gz
zlib-1.2.8.tar.gz http://zlib.net/zlib-1.2.8.tar.gz
echo-nginx-module https://github.com/openresty/echo-nginx-module.git
ngx_devel_kit https://github.com/simpl/ngx_devel_kit.git
redis2-nginx-module https://github.com/openresty/redis2-nginx-module.git
srcache-nginx-module https://github.com/openresty/srcache-nginx-module.git
lua-nginx-module https://github.com/openresty/lua-nginx-module.git
ngx_http_redis http://people.freebsd.org/~osa/ngx_http_redis-0.3.8.tar.gz
set-misc-nginx-module https://github.com/openresty/set-misc-nginx-module.git
解压到根目录

第三步
下载nginx-1.8.0
进入目录
安装
./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-pcre=../pcre-8.37 --with-zlib=../zlib-1.2.8 --with-openssl=../openssl-1.0.2g --add-module=../echo-nginx-module --add-module=../ngx_devel_kit --add-module=../redis2-nginx-module --add-module=../srcache-nginx-module --add-module=../lua-nginx-module --add-module=../ngx_http_redis --add-module=../set-misc-nginx-module
make && make install

启动nginx
/usr/local/nginx/sbin/nginx

nginx +lua +redis 构建自动缓存系统的更多相关文章

  1. nginx+lua+redis构建高并发应用(转)

    nginx+lua+redis构建高并发应用 ngx_lua将lua嵌入到nginx,让nginx执行lua脚本,高并发,非阻塞的处理各种请求. url请求nginx服务器,然后lua查询redis, ...

  2. Nginx+Lua+Redis构建高并发应用

    一.  源文来自:http://www.ttlsa.com/nginx/nginx-lua-redis/ 二.  预览如下:

  3. 基于nginx+lua+redis高性能api应用实践

    基于nginx+lua+redis高性能api应用实践 前言 比较传统的服务端程序(PHP.FAST CGI等),大多都是通过每产生一个请求,都会有一个进程与之相对应,请求处理完毕后相关进程自动释放. ...

  4. nginx+lua+redis实现灰度发布_test

    nginx+lua+redis实现灰度发布: 灰度发布是指在黑白之间能够平滑过渡的一种方式 AB test就是一种灰度发布方式,让一部分用户继续用A,一部分用户开始用B,如果用户对B没有什么反对意见, ...

  5. nginx+lua+redis

    git clone --branch master https://github.com/openresty/lua-resty-redis.git yum install openssl opens ...

  6. Nginx+Lua+Redis 对请求进行限制

    Nginx+Lua+Redis 对请求进行限制 一.概述 需求:所有访问/myapi/**的请求必须是POST请求,而且根据请求参数过滤不符合规则的非法请求(黑名单), 这些请求一律不转发到后端服务器 ...

  7. Nginx+Lua+Redis整合实现高性能API接口 - 网站服务器 - LinuxTone | 运维专家网论坛 - 最棒的Linux运维与开源架构技术交流社区! - Powered by Discuz!

    Nginx+Lua+Redis整合实现高性能API接口 - 网站服务器 - LinuxTone | 运维专家网论坛 - 最棒的Linux运维与开源架构技术交流社区! - Powered by Disc ...

  8. nginx lua redis 访问频率限制(转)

    1. 需求分析 Nginx来处理访问控制的方法有多种,实现的效果也有多种,访问IP段,访问内容限制,访问频率限制等. 用Nginx+Lua+Redis来做访问限制主要是考虑到高并发环境下快速访问控制的 ...

  9. nginx限制请求之三:Nginx+Lua+Redis 对请求进行限制

    相关文章: <高可用服务设计之二:Rate limiting 限流与降级> <nginx限制请求之一:(ngx_http_limit_conn_module)模块> <n ...

随机推荐

  1. mac多版本python安装 pymysql

    系统里面安装了多个python的版本,有2.7和3.4等.默认的2.7版本,但我开发需要3.4版本的. 默认情况下,用pip安装PyMySQL $sudo pip install PyMySQL 安装 ...

  2. 使用python通过SSH登陆linux并操作

    用的昨天刚接触到的库,在windows下通过paramiko来登录linux系统并执行了几个命令,基本算是初试成功,后面会接着学习的. 代码: >>> import paramiko ...

  3. Unity3d:megaFierstext(翻书效果插件)

    附件中是一款翻书效果插件,由于附件上传大小限制,在下载完后,需要在megaFierstext_BHYF\Assets\Resources\Textures下添加图片精灵并修改属性为Texture,即可 ...

  4. PaaS平台资源

    http://www.vagrantup.com/ http://www.docker.com/

  5. 【转】Fresco之强大之余的痛楚

    http://www.jianshu.com/p/5364957dcf49 开始之前 如果你有使用的心得,技巧,踩坑经历,希望贡献出来,我会在TODO中慢慢添加(^^)/ 关于Fresco Fresc ...

  6. How to Send Information (String, Image, Record) Between Two Applications

    http://delphi.about.com/od/windowsshellapi/a/wm_copydata.htm here are many situation when you need t ...

  7. Lazy Loading Images

    Use a blank.gif as the src of images, and include the width and height of the final image. HTML: < ...

  8. MPIO配置

    设置好两块网卡的IP(实用同一段IP,或者不同网段IP均可以配置多路径)iSCSI发起程序配置:1.添加发现(默认设置即可)2.目标-连接-高级:分别配置 本地适配器.发起程序IP.目标门户IP(此处 ...

  9. C# DateTime 日期加1天 减一天 加一月 减一月 等方法

    //今天 DateTime.Now.Date.ToShortDateString(); //昨天,就是今天的日期减一 DateTime.Now.AddDays(-).ToShortDateString ...

  10. UVA 10499 (13.08.06)

    Problem H The Land of Justice Input: standard input Output: standard output Time Limit: 4 seconds In ...