2021年4月25日

vmplayer固定IP

摘要: 克隆多台虚拟机与每台虚拟机网络配置 https://blog.51cto.com/u_15704423/5435877 参考:https://blog.csdn.net/zxm1306192988/article/details/80822075 直接修改以下配置,然后重启网络服务 systemct 阅读全文

posted @ 2021-04-25 22:11 木林coder 阅读(141) 评论(0) 推荐(0) 编辑

2021年4月11日

搭建FTP

摘要: docker方式只能使用虚拟用户 https://www.hangge.com/blog/cache/detail_2449.html yum方式 https://blog.csdn.net/milu_nff/article/details/125353979 groupadd houduan us 阅读全文

posted @ 2021-04-11 11:59 木林coder 阅读(28) 评论(0) 推荐(0) 编辑

2021年3月17日

limit.php-令牌算法

摘要: 0,就消耗令牌 if (local_curr_permits - permits >= 0 ) then result=1 redis.call("HMSET",key,"last_second",ARGV[1]) redis.call("HMSET",key,"curr_permits",loca 阅读全文

posted @ 2021-03-17 13:17 木林coder 阅读(72) 评论(0) 推荐(0) 编辑

2021年3月10日

lock-index.php

摘要: connect("120.78.64.28",7003); //$redis->auth("sixstar"); $redis=new Lock($redis); $key='key'; $res=$redis->lock($key,3,1,10); //等待获取锁 if($res){ sleep( 阅读全文

posted @ 2021-03-10 11:08 木林coder 阅读(34) 评论(0) 推荐(0) 编辑

lock-lock.php

摘要: redis=$redis; } public function lock($key,$retry=2,$timeout=1,$ex=10){ $ok=false; $value=session_create_id(); while ( $retry-- ){ $ok=$this->redis->se 阅读全文

posted @ 2021-03-10 10:22 木林coder 阅读(51) 评论(0) 推荐(0) 编辑

2021年3月9日

filter.lua

摘要: local ngx_re_split=require("ngx.re").split local ip_addr = ngx.shared.redis_cluster_addr:get('redis-addr') ip_addr = ngx_re_split(ip_addr,',') local r 阅读全文

posted @ 2021-03-09 20:19 木林coder 阅读(127) 评论(0) 推荐(0) 编辑

redis加载module

摘要: 1内部 module load /usr/src/module/RedisBloom-2.0.3/redisbloom.so module list 2外部 redis-server /usr/src/redis/conf/redis.conf --loadmodule /usr/src/modul 阅读全文

posted @ 2021-03-09 15:30 木林coder 阅读(995) 评论(0) 推荐(0) 编辑

2021年3月8日

redis布隆过滤器

摘要: https://github.com/RedisBloom/RedisBloom unzip redis-server /usr/src/redis/conf/redis.conf --loadmodule /usr/src/module/RedisBloom-2.0.3/redisbloom.so 阅读全文

posted @ 2021-03-08 20:46 木林coder 阅读(64) 评论(0) 推荐(0) 编辑

2021年3月7日

cache.lua--自带加锁功能方式缓存击穿

摘要: local key = ngx.re.match(ngx.var.request_uri,"/([0-9]+).html") local mlcache = require "resty.mlcache" local function fetch_shop(aaa) ngx.log(ngx.ERR, 阅读全文

posted @ 2021-03-07 18:46 木林coder 阅读(150) 评论(0) 推荐(0) 编辑

lua-resty-mlcache

摘要: opm search mlcache opm --install-dir=/usr/local/openresty/lualib/project/common/mlcache/ get thibaultcha/lua-resty-mlcache 阅读全文

posted @ 2021-03-07 18:44 木林coder 阅读(315) 评论(0) 推荐(0) 编辑

导航