摘要:
1、python连接pgsql import psycopg2 def connect_pgsql(list_sql): conn = psycopg2.connect(host='db_host', user='db_user', password='db_passwd', database='d 阅读全文
posted @ 2023-12-15 14:15
半路出家_24
阅读(243)
评论(0)
推荐(0)
摘要:
# 当我们在服务器上部署好我们的环境后,一定要检查一下防火墙的端口策略;否则客户端无法连接。# 查看防火墙状态 systemctl status firewalld # 查看防火墙设已开放的端口 # 临时端口(默认为空) firewall-cmd --list-ports # 永久开放端口(默认为空 阅读全文
posted @ 2023-12-15 13:43
半路出家_24
阅读(312)
评论(0)
推荐(0)
摘要:
创建一个文件夹用于存放你的虚拟环境 cd 到存放虚拟环境的地址 安装虚拟环境库: pip3 install virtualenv 创建虚拟环境:python3 -m venv 环境名称 激活虚拟环境: source 创建的虚拟环境地址下的bin/activate 退出:deactivate 阅读全文
posted @ 2023-12-15 13:38
半路出家_24
阅读(46)
评论(0)
推荐(0)
摘要:
import paramiko def content_ssh(): ssh = paramiko.SSHClient() ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) ssh.connect('pc-ip', port=22, 阅读全文
posted @ 2023-12-15 13:35
半路出家_24
阅读(64)
评论(0)
推荐(0)
摘要:
linux 下一切皆文件 1、获取指定路径下文件或目录 ls -la /usr/local/ |grep xxx | head -n 1 |awk '{print$9}'xxx : 替换为要匹配的文件名或目录命令解释: ls -la /usr/local/: 列出 /usr/local/ 目录下的所 阅读全文
posted @ 2023-12-15 11:42
半路出家_24
阅读(737)
评论(0)
推荐(0)
摘要:
背景 1、安装环境:kvm虚拟机 2、运行环境:linux 3、架构:x86 4、安装mysql版本:mysql-5.7 1、安装准备 # Mysql官网 https://downloads.mysql.com/archives/community/ # 下载安装包 wget -i -c http: 阅读全文
posted @ 2023-12-15 10:53
半路出家_24
阅读(68)
评论(0)
推荐(0)

浙公网安备 33010602011771号