上一页 1 2 3 4 5 6 7 8 9 10 ··· 21 下一页
摘要: change_rdsport_CN.bat(支持Windows2003, 2008, 2008R2, 2012, 2012R2, 7, 8, 10) @echo off color f0 echo 修改远程桌面3389端口(支持Windows2003, 2008, 2008R2, 2012, 201 阅读全文
posted @ 2024-08-16 18:00 wanghongwei-dev 阅读(388) 评论(0) 推荐(0)
摘要: 日志与审计 Journalctl 查询指定系统单元服务的日志journalctl -u network journalctl -u sshd 查询内核日志journalctl -k 查询指定日志级别的日志journalctl -p err journalctl -p 0..3 journalctl 阅读全文
posted @ 2024-07-12 10:18 wanghongwei-dev 阅读(91) 评论(0) 推荐(0)
摘要: 1、安装必要工具 yum install -y tar zlib-devel 2、编译安装 OpenSSL cd /usr/local/src wget https://www.openssl.org/source/openssl-1.1.1w.tar.gz tar -xvzf openssl-1. 阅读全文
posted @ 2024-07-11 12:34 wanghongwei-dev 阅读(328) 评论(0) 推荐(0)
摘要: 1、文件读写 # 写入文件 with open('example.txt', 'w') as file: file.write('Hello, World!') # 读取文件 with open('example.txt', 'r') as file: content = file.read() p 阅读全文
posted @ 2024-06-29 20:05 wanghongwei-dev 阅读(44) 评论(0) 推荐(0)
摘要: 单例模式 # 方法 1: 使用类变量 class Singleton: _instance = None def __new__(cls, *args, **kwargs): if not cls._instance: cls._instance = super(Singleton, cls).__ 阅读全文
posted @ 2024-06-29 20:05 wanghongwei-dev 阅读(41) 评论(0) 推荐(0)
摘要: 组合 class Engine: """引擎类,提供基本的引擎功能""" def __init__(self, power): self.power = power def start(self): print(f"引擎启动,功率:{self.power}") class Car: """汽车类,使 阅读全文
posted @ 2024-06-23 14:39 wanghongwei-dev 阅读(36) 评论(0) 推荐(0)
摘要: 函数的特殊参数 # /前的参数只能是位置参数,*后面的只能是关键字参数,之间的不限参数类型 def func(a, b, /, c, *, d, e): print(a, b, c, d, e) func(1, 2, 3, d=4, e=5) func(1, 2, c=3, d=4, e=5) # 阅读全文
posted @ 2024-06-23 14:39 wanghongwei-dev 阅读(42) 评论(0) 推荐(0)
摘要: 格式化输出 %[(name)][flags][width].[precision] typecode (name) :可选,用于选择指定的 key flags:可选,可供选择的值有: – + 右对齐:正数的加正号,负数的加负号 – - 左对齐:正数前没有负号,负数前加负号 width:可选,占有宽度 阅读全文
posted @ 2024-06-23 14:38 wanghongwei-dev 阅读(39) 评论(0) 推荐(0)
摘要: 1、确定主板和CPU都支持虚拟化技术,在BIOS将VT-d(芯片组、IO)、VT-x(CPU)设置成启用。 2、确保BIOS中启用了SR-IOV。 3、内核启动参数设置,开启IOMMU。 # 检查系统是否启用iommu cat /proc/cmdline | grep iommu # 编辑/etc/ 阅读全文
posted @ 2024-05-30 15:43 wanghongwei-dev 阅读(746) 评论(0) 推荐(0)
摘要: kolla-ansible提供的首次部署后初始化配置脚本,核心作用是:在OpenStack集群首次启动成功后,一次性完成基础环境初始化(下载导入Cirros测试镜像、配置Neutron网络、设置安全组/SSH密钥/资源配额、创建默认云主机规格),为后续部署测试云主机提供就绪的基础环境。只需根据实际环 阅读全文
posted @ 2024-03-30 11:43 wanghongwei-dev 阅读(77) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 10 ··· 21 下一页