摘要: docker network create --subnet=172.10.0.0/24 docker-network 主mkdir -p /data/docker/redis/master & vim /data/docker/redis/master/docker-compose.yml ver 阅读全文
posted @ 2022-06-01 11:49 wyz_1 阅读(56) 评论(0) 推荐(0) 编辑
摘要: docker network create --subnet=172.10.0.0/24 docker-network主mkdir -p /data/docker/mysql/master/cnf & mkdir -p /data/docker/mysql/master/data & vim /da 阅读全文
posted @ 2022-06-01 10:48 wyz_1 阅读(22) 评论(0) 推荐(0) 编辑
摘要: # -*- coding: utf-8 -*-import paramiko# @Singletonclass SSHLinuxClient(object): def __init__(self, hostname, port, username, password, key_filename): 阅读全文
posted @ 2022-05-30 17:55 wyz_1 阅读(157) 评论(0) 推荐(0) 编辑
摘要: https://www.cnblogs.com/xiao-xue-di/p/15934566.html 阅读全文
posted @ 2022-05-27 11:38 wyz_1 阅读(13) 评论(0) 推荐(0) 编辑
摘要: yum update yum install -y yum-utils device-mapper-persistent-data lvm2 yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/ 阅读全文
posted @ 2022-05-26 10:29 wyz_1 阅读(19) 评论(0) 推荐(0) 编辑
摘要: # 类装饰器 类实现单例模式def singleton(cls): _instance = {} def _singleton(*args, **kwargs): if cls not in _instance: _instance[cls] = cls(*args, **kwargs) retur 阅读全文
posted @ 2022-05-23 17:52 wyz_1 阅读(15) 评论(0) 推荐(0) 编辑
摘要: # -*- coding: utf-8 -*-import paramikoSSH_HOST = '192.168.1.130'SSH_PORT = 22SSH_USERNAME = 'root'SSH_PASSWORD = 'Aa753951123'class SSHLinuxClient(obj 阅读全文
posted @ 2022-05-23 17:25 wyz_1 阅读(56) 评论(0) 推荐(0) 编辑
摘要: import osdef create_models(): db_url = "mysql+pymysql://root:password@localhost:3306/test?charset=utf8mb4" project_path = os.getcwd() print(project_pa 阅读全文
posted @ 2022-05-18 16:58 wyz_1 阅读(85) 评论(0) 推荐(0) 编辑
摘要: import datetimeclass SerializrAbleMixin(object): """A SQLAlchemy mixin class that can serialize itself as a JSON object""" # args 自定义序列化字段 is_except 序 阅读全文
posted @ 2022-05-18 16:54 wyz_1 阅读(379) 评论(0) 推荐(0) 编辑
摘要: def test3(int1): if int1 > 2: int1 = int1 - 2 int1 = int1 / 2 test3(int1) return int1if __name__ == '__main__': print(test3(20))答案:9.0 阅读全文
posted @ 2022-05-07 11:54 wyz_1 阅读(14) 评论(0) 推荐(0) 编辑