上一页 1 ··· 4 5 6 7 8 9 10 11 12 13 下一页
摘要: 如下图修改nginx.conf文件的server块 server{ listen 80; server_name 172.0.0.1; location /a/{ proxy_pass http://172.0.0.2:8080 } location /b/{ proxy_pass http://1 阅读全文
posted @ 2022-06-29 22:38 opscool 阅读(37) 评论(0) 推荐(0)
摘要: 当我们修改了nginx.conf文件后重新加载可以使之生效 ./nginx -s reload 注:如果重启nginx进程的话会影响到正在处理的请求事务 阅读全文
posted @ 2022-06-29 14:49 opscool 阅读(314) 评论(0) 推荐(0)
摘要: ./nginx -c /path/nginx.conf 阅读全文
posted @ 2022-06-29 14:43 opscool 阅读(263) 评论(0) 推荐(0)
摘要: 当我们修改了nginx.conf后需要检查一下配置文件 ./nginx -t 如果显示:syntax is ok 、test is successful 两行字样则表示修改后没问题 阅读全文
posted @ 2022-06-29 14:41 opscool 阅读(1458) 评论(0) 推荐(0)
摘要: 当需要访问innodb.locks数据时: select * from innodb.locks; 报错:error 1227(42000):Access denied; you need (at least on of) the PROCESS privilege(s) for this oper 阅读全文
posted @ 2022-06-29 14:13 opscool 阅读(243) 评论(0) 推荐(0)
摘要: 解决方法: cmd中敲命令:python -m ensurepip 阅读全文
posted @ 2022-06-29 13:55 opscool 阅读(35) 评论(0) 推荐(0)
摘要: 阿里云 http://mirrors.aliyun.com/pypi/simple/ 中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/ 豆瓣(douban) http://pypi.douban.com/simple/ 清华大学 https://pypi 阅读全文
posted @ 2022-06-29 13:53 opscool 阅读(95) 评论(0) 推荐(0)
摘要: dict,pop('key') 删除某个键值对,并返回value值 dict = {} 清空字典 del dict 删除字典 阅读全文
posted @ 2022-06-29 13:51 opscool 阅读(145) 评论(0) 推荐(0)
摘要: 例:有a、b两个列表 a = [1, 2, 3] b = [4, 5, 6] 1、调用zip函数 c = zip(a, b) 输出结果 c = [(1, 4), (2, 5), (3, 6)] 2、调用zipped函数 d = zipped(c) 输出结果 d = [(1, 2, 3), (4, 5 阅读全文
posted @ 2022-06-29 13:50 opscool 阅读(74) 评论(0) 推荐(0)
摘要: data = [(“a”, “1”), (”a“, ”2“), (”b“, ”3“)] d2 = {} for k, v in data: d2.setdefault(k, []).append(v) print(d2) 注:setdefault方法会先判断d2这个字典中是否存在k这个键,如果存在就 阅读全文
posted @ 2022-06-29 13:46 opscool 阅读(119) 评论(0) 推荐(0)
上一页 1 ··· 4 5 6 7 8 9 10 11 12 13 下一页