摘要: UOS系统mysql服务安装 背景 1、安装环境:kvm虚拟机 2、运行环境:uos server-1060e 3、架构:x86 4、安装mysql版本:mysql-5.7 1、安装准备 # Mysql官网 https://downloads.mysql.com/archives/community 阅读全文
posted @ 2025-01-07 11:20 半路出家_24 阅读(779) 评论(0) 推荐(0)
摘要: 认识Token和Cookie 1、token和cookie有什么区别? ​ 1.1 存储位置及方式:Cookie是浏览器用来存储本地信息的文件,有一定的存储限制,而Token是由服务器按一定算法生成的密令,可以由前端指定存放到localStorage、sessionStorage或cookie中。 阅读全文
posted @ 2025-01-07 11:08 半路出家_24 阅读(151) 评论(0) 推荐(0)
摘要: 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)
摘要: # 新建配置文件 vim ~/.pip/pip.conf # 写入地址 [global] index-url = https://pypi.tuna.tsinghua.edu.cn/simple [install] trusted-host = https://pypi.tuna.tsinghua. 阅读全文
posted @ 2023-10-19 16:18 半路出家_24 阅读(288) 评论(0) 推荐(0)
摘要: 1 import http.client 2 import json 3 4 class HTTPS_Connection: 5 6 def __init__(self, res_type, body, url, api_path, headers): 7 self.res_type = res_t 阅读全文
posted @ 2023-10-16 14:00 半路出家_24 阅读(109) 评论(0) 推荐(0)