上一页 1 2 3 4 5 6 ··· 9 下一页
摘要: #!/usr/bin/env python #_*_encoding: utf-8_*_ import random print(random.random()) #生成一个在0到1之间的随机浮点数 print(random.randint(1,9)) #生成一个在1到9之间的随机整数,包含1和9 print(random.randrange(1,9)) #生成一个在1到9之间的随机整数,... 阅读全文
posted @ 2019-03-05 17:45 _chy 阅读(204) 评论(1) 推荐(0) 编辑
摘要: time模块 时间三种表示:时间戳(秒单位),struct_time(元组,可以分开调用),指定格式(格式化) datetime模块 (1)datetime.datetime(2019, 3, 4, 15, 42, 14, 241116) (2)time.struct_time(tm_year=20 阅读全文
posted @ 2019-03-04 15:55 _chy 阅读(369) 评论(0) 推荐(0) 编辑
摘要: 问题一: 在rancher的ui上,不能创建k8s的master节点的高可用集群。创建k8s集群,添加节点的时候,可以添加多个master,但是多个master又没有高可用,只要其中一个出问题了,那么整个集群就垮了。本想着自己来改配置,但是集群是使用docker启动组件,配置复杂繁琐,不太懂ranc 阅读全文
posted @ 2019-02-28 18:08 _chy 阅读(6482) 评论(0) 推荐(1) 编辑
摘要: 环境: centos 7.6+ docker-ce 17.03.2 安装依赖包 添加docker yum库 查看可下载所有版本 安装 阅读全文
posted @ 2019-02-28 17:27 _chy 阅读(274) 评论(0) 推荐(1) 编辑
摘要: 需求: 在k8s集群里的某个模块生成的目录文件或者更新的目录文件,存储到外面某台服务器上 1.安装nfs服务(192.168.1.2 Ubuntu 16.04) 2.配置nfs挂载目录 3.重启nfs 4.查看 5.另外,特别注意,开放端口,不然其他主机不能访问 6.更新k8s模块的yaml 以上红 阅读全文
posted @ 2019-02-16 17:10 _chy 阅读(7582) 评论(0) 推荐(0) 编辑
摘要: 解决方式: # cd /usr/local/n/versions/node/11.6.0/lib/(node的安装目录下) # rm -rf node_modules # yarn cache clean # yarn 参考链接:https://github.com/yarnpkg/yarn/iss 阅读全文
posted @ 2019-01-29 10:36 _chy 阅读(5695) 评论(0) 推荐(0) 编辑
摘要: 安装go 设置开发环境 配置环境变量 卸载或升级go 阅读全文
posted @ 2019-01-27 17:44 _chy 阅读(1006) 评论(1) 推荐(0) 编辑
摘要: 证书: k8s里创建证书(使用证书文件命令创建): k8s里创建证书(yaml文件创建): k8s里更新证书: 查看证书详情: openssl x509 -text -in fullchain.pem 查看证书指纹: openssl x509 -fingerprint -sha1 -in fullc 阅读全文
posted @ 2019-01-23 17:41 _chy 阅读(563) 评论(0) 推荐(0) 编辑
摘要: 版本: nginx(无要求,最新) mysql(5.6.xx) php(5.6.xx) ubuntu(16.04,其他版本也并无过多差异) 准备: #apt-get update #apt-get install cmake gcc libxml2 libncurses5-dev bison zli 阅读全文
posted @ 2019-01-16 16:49 _chy 阅读(324) 评论(0) 推荐(0) 编辑
摘要: Ubuntu 16.04 #vi /etc/network/interfaces auto lo iface lo inet loopback auto ens3 iface ens3 inet static address 192.168.1.1 gateway 192.168.1.254 net 阅读全文
posted @ 2019-01-16 15:18 _chy 阅读(1449) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 9 下一页