2023年11月14日

摘要: import pymysql class HandleMysql: def __init__(self, host, user, password, db, port): self.conn = pymysql.connect(host=host, user=user, password=passw 阅读全文
posted @ 2023-11-14 19:38 wolun666 阅读(9) 评论(0) 推荐(0) 编辑
 
摘要: import paramiko class HandleSSH: def __init__(self, ssh_ip=None, ssh_port=None, ssh_user="", ssh_password=""): self.ssh_ip = ssh_ip self.ssh_port = ss 阅读全文
posted @ 2023-11-14 17:18 wolun666 阅读(7) 评论(0) 推荐(0) 编辑

2023年11月13日

摘要: import requests import json class HandleRequest: param_type_dict = { 'form': 'application/x-www-form-urlencoded', 'data': 'application/x-www-form-urle 阅读全文
posted @ 2023-11-13 15:36 wolun666 阅读(5) 评论(0) 推荐(0) 编辑

2023年7月18日

摘要: 返回文件的位置 find -name '文件名' 返回符合条件的文件个数 find -name '文件名' | wc -l 删除当前路径下所有符合条件的文件或目录 find . -name "*.py" | xargs rm -rf find . -name "目录名" | xargs rm -rf 阅读全文
posted @ 2023-07-18 17:06 wolun666 阅读(194) 评论(0) 推荐(0) 编辑
 
摘要: * yum 安装前需要配置正确的yum安装源 `/etc/yum.repos.d/xxx.repo` 安装源分三种主,次,网络:base,addon,net 用到的 enable处要注意改为1 修改yum源配置文档后要yum clean all && yum makecache 若要备份/etc/y 阅读全文
posted @ 2023-07-18 16:52 wolun666 阅读(7) 评论(0) 推荐(0) 编辑
 
摘要: * 方式一 先查询指定进程的PID `ps -ef | grep 进程名` `top -p PID` * 方式二 直接使用ps查询指定进程名或PID `ps -aux | grep 进程名/PID` * 查看更详细的信息 `cat /proc/指定的PID/status` * 查看所有进程可用 to 阅读全文
posted @ 2023-07-18 16:49 wolun666 阅读(256) 评论(0) 推荐(0) 编辑
 
摘要: * 启动防火墙 `systemctl start firewalld` * 关闭防火墙 `systemctl stop firewalld` * 重启防火墙,一般修改端口后都要重启生效 `systemctl restart firewalld` * 查看状态 `systemctl status fi 阅读全文
posted @ 2023-07-18 16:36 wolun666 阅读(83) 评论(0) 推荐(0) 编辑

2021年11月4日

摘要: 转自:https://www.cnblogs.com/harrymore/p/8665154.html 一、什么是RPM RPM的全名是Red Hat Package Manager,本意是Red Hat 软件包管理,顾名思义是Red Hat 贡献出来的软件包管理;在Fedora 、Redhat、M 阅读全文
posted @ 2021-11-04 10:37 wolun666 阅读(402) 评论(0) 推荐(0) 编辑

2021年4月27日

摘要: 环境里已存在低版本的gcc,安装高版本gcc后,查看版本仍显示低版本,此时需要用到SCL技术临时使用高版本 1、安装启动scl所需的软件包 yum install scl-utils 2、查看 SCL 中可用包的完整列表 yum --disablerepo="*" --enablerepo="scl 阅读全文
posted @ 2021-04-27 10:44 wolun666 阅读(630) 评论(0) 推荐(0) 编辑

2021年4月15日

摘要: 1、Python自带多线程模块 _thread _thread.start_new_thread(function, (参数元组)), function结束,线程也结束 2、第三方模块 threading, 要重写 init 和 run() import threading class A(thre 阅读全文
posted @ 2021-04-15 16:31 wolun666 阅读(116) 评论(0) 推荐(0) 编辑