摘要: virsh create命令创建虚拟机时报错: '/run/libvirt/virtlogd-sock': Connection refused 可以尝试删除这个文件:rm -f /run/virtlogd.pid 然后启动virtlogd: virtlogd -d 阅读全文
posted @ 2025-02-20 19:44 小鱼圆又圆 阅读(9) 评论(0) 推荐(0) 编辑
摘要: # 编辑文件 /etc/pam.d/system-authvim /etc/pam.d/system-auth注释这一行password required pam_pwhistory.so use_authtok remember=5 修改密码 阅读全文
posted @ 2025-02-20 09:22 小鱼圆又圆 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 在工具(Tools)->Python集成工具(Python Integrated Tools)->Docstrings里设置 选择reStructuredText 阅读全文
posted @ 2025-02-08 14:37 小鱼圆又圆 阅读(6) 评论(0) 推荐(0) 编辑
摘要: 类型注释 增加代码可读性 from typing import List, Dict, Set, Union, Optional def add_enter(b: str) -> str: return b + '\n' def parse_data(data): total = 0 for k, 阅读全文
posted @ 2025-01-03 17:05 小鱼圆又圆 阅读(2) 评论(0) 推荐(0) 编辑
摘要: super基础用法 Python有多继承机制,可以一次继承多个类 在无参数时,super返回的是继承的第一个父类 super().函数 = 第一个父类.函数(self) 加参数调用非第一个父类 当想指定调用非第一个父类的方法时,需要加入特定参数 实测super(指定父类, self).函数 ≠ 指定 阅读全文
posted @ 2025-01-01 23:01 小鱼圆又圆 阅读(13) 评论(0) 推荐(0) 编辑
摘要: libvirt是基于KVM虚拟机的管理软件 启动虚拟机需要xml配置文件+虚拟机镜像文件 创建虚拟机: `virsh create xxx.xml` 删除虚拟机 `virsh destroy xxx.xml` 查看所有虚拟机 `virsh list --all` 进入虚拟机(退出时使用Ctrl+]) 阅读全文
posted @ 2024-12-21 14:39 小鱼圆又圆 阅读(33) 评论(0) 推荐(0) 编辑
摘要: sed命令中,直接使用单引号会出错 将'改成'\''即可 阅读全文
posted @ 2024-12-21 14:35 小鱼圆又圆 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 系统版本: OpenEuler 22.03 问题描述: 系统在刚开始时能够正常上传/下载文件,使用一段时间后发现无法上传下载 原因: 为了交互美观,修改了.bashrc中的PS1变量,注释后文件上传下载恢复正常 原因分析: 该语句放在了`. /etc/bashrc`前面,/etc/bashrc中包含 阅读全文
posted @ 2024-11-11 14:16 小鱼圆又圆 阅读(19) 评论(0) 推荐(0) 编辑
摘要: mysql5.7及以后版本设置密码 开启skip-grant-tables配置 由于安装时没有指定密码,需要配置/etc/my.cnf(或者/etc/mysql/my.cnf等已存在的配置文件) 在[mysqld]下一行加上: skip-grant-tables 表示无密码登入 vim /etc/m 阅读全文
posted @ 2024-10-14 19:29 小鱼圆又圆 阅读(65) 评论(0) 推荐(0) 编辑
摘要: yum安装mysql-server或者mysql后,systemctl start mysqld启动mysql服务无效,尝试输入mysql命令后,报错:ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/v 阅读全文
posted @ 2024-10-14 18:10 小鱼圆又圆 阅读(326) 评论(0) 推荐(0) 编辑
点击右上角即可分享
微信分享提示