上一页 1 2 3 4 5 6 ··· 24 下一页
摘要: 准备镜像 docker pull phpswoole/swoole 配置php解释器 创建测试文件 #!/usr/bin/env php <?php declare(strict_types=1); use Swoole\Http\Request; use Swoole\Http\Response; 阅读全文
posted @ 2022-06-11 16:52 LiShiChao 阅读(53) 评论(0) 推荐(0) 编辑
摘要: 起步 当需要if obj 或者 not obj判断一个实例对象的真假时,Python解释器会优先调用魔法方法__bool__()。如果没有该方法,就调用__len__()。如果两个方法都没有,总是返回True __bool__()方法仅支持返回布尔值 __len__()方法仅支持返回>=0的整数 示 阅读全文
posted @ 2022-06-06 20:27 LiShiChao 阅读(81) 评论(0) 推荐(0) 编辑
摘要: 安装wrk # 克隆源码 git clone https://github.com/wg/wrk.git # 编译 make 压测 # 使用5个连接,5条线程,运行压力测试10秒 ./wrk -c 5 -d 10s -t 5 --latency http://baidu.com wrk接口压测总结 阅读全文
posted @ 2022-04-22 13:00 LiShiChao 阅读(153) 评论(0) 推荐(0) 编辑
摘要: 转载:https://v3u.cn/a_id_208 阅读全文
posted @ 2022-03-26 11:12 LiShiChao 阅读(106) 评论(0) 推荐(0) 编辑
摘要: vue项目配置二级目录,刷新后404 nginx配置 location /vue { alias /www/vue; # vue项目路径 index index.html; try_files $uri $uri/ /index.html =404; } 阅读全文
posted @ 2022-03-22 13:56 LiShiChao 阅读(75) 评论(0) 推荐(0) 编辑
摘要: 安装模块 pip install passlib 生成加密密码 python -c "from passlib.hash import sha512_crypt; import getpass; print sha512_crypt.encrypt('123')" 阅读全文
posted @ 2022-03-09 11:58 LiShiChao 阅读(94) 评论(0) 推荐(0) 编辑
摘要: ping测试 ansible pyproxy -m ping 执行shell命令 ansible pyproxy -m shell -a "ip a" 拷贝目录 ansible pyproxy -m synchronize -a "src=/opt/ops/test dest=/data delet 阅读全文
posted @ 2022-03-09 11:02 LiShiChao 阅读(22) 评论(0) 推荐(0) 编辑
摘要: 创建项目时指定环境变量 GOPROXY=https://goproxy.cn,direct 添加go fmt和goimports 阅读全文
posted @ 2022-03-04 15:52 LiShiChao 阅读(31) 评论(0) 推荐(0) 编辑
摘要: 安装依赖模块 yum install nginx-mod-stream 配置转发 # 与http区块平级 stream { upstream redis_6383 { server 127.0.0.1:6383; } server { listen 6386; proxy_pass redis_63 阅读全文
posted @ 2022-03-03 11:47 LiShiChao 阅读(82) 评论(0) 推荐(0) 编辑
摘要: 最终版本: 启动docker并进行端口映射后,docker会在iptables中添加DNAT规则,将收到的对应端口的包转换ip并进行转发,同时添加规则将所有来自docker网域的ip进行转换。 但是在Centos7上出现docker可以正常访问外网,但是外网发出的请求在经过eth1接收转发后送达不到 阅读全文
posted @ 2022-03-02 15:00 LiShiChao 阅读(169) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 24 下一页