
OpenResty
OpenResty
响彻天堂丶
那万一赢了呢?
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Nginx 安装
1 下载安装包 https://nginx.org/en/download.html 2 上传包 3 查看centos的内核 准备一个内核为2.6及以上版本的操作系统,因为linux2.6及以上内核才支持epoll,而Nginx需要解决高并发压力问题是需要用到epoll,所以我们需要有这样的版本要求。 4 安装nginx依赖环境 yum install -y gcc pcre pcre-devel zlib zlib-devel openssl openssl-devel 5 安装nginx原创 2021-07-02 09:38:46 · 137 阅读 · 0 评论 -
OpenResty lua_shared_dict (缓存)
1 案例 1.1 get_value.lua 描述: 从redis中获取value local redis = require "redis_conf" local red = redis:new() function get_from_redis(key) local res,err=red:get(key) if res then return res else return err end end local value=get原创 2021-06-30 23:39:49 · 1253 阅读 · 3 评论 -
OpenResty 连接Redis
1 创建redis配置文件 cd /usr/local/openresty/nginx/lua/conf vim redis_conf.lua local redis_c = require "resty.redis" local ok, new_tab = pcall(require, "table.new") if not ok or type(new_tab) ~= "function" then new_tab = function (narr, nrec) return {} end原创 2021-06-30 17:18:15 · 688 阅读 · 1 评论 -
OpenResty 安装
1 安装包准备 http://openresty.org/cn/ 2 安装 #解压 tar -zxvf openresty-1.19.9.1rc1.tar.gz #进入 cd openresty-1.19.9.1rc1 ./configure make && make install 3 启动 cd /usr/local/openresty/nginx sbin/nginx -c conf/nginx.conf原创 2021-06-28 22:32:48 · 228 阅读 · 0 评论