105.ubuntu常用工具安装

发表于 linux 分类,标签:
启动dockerdocker run -dit -v /data/countly:/usr/local/src --name countly ubuntu升级 apt-get update安装updateapt-get install openssh-server安装gccsudo apt install build-essential 安装procps包 psapt-get install procps安装其他apt-get install vimapt-get install net-toolsap...

104.使无进程docker容器保持运行

发表于 linux 分类,标签:
docker容器无进程启动docker run -i -t c1717d73fd69 /bin/bashk8s中添加循环使容器保持运行image: k8s-jingxiang-registry.cn-hangzhou.cr.aliyuncs.com/yaozh.com/nullpython3:v2name: pod-predictimagePullPolicy: IfNotPresentcommand: [ "/bin/sh", "-c", "--" ]args: [ "while true; do sleep 30;...

103.将ip段写入到redis白名单

发表于 mysql 分类,标签:
import redis# Redis连接信息redis_host = 'hostname'redis_port = 6379redis_password = 'passwd'redis_db = 5  # 选择数据库5# 连接到Redis服务器redis_client = redis.StrictRedis(    host=redis_host, port=redis_port, password=redis_password, db=redis_db, decode_respo...

102.git常用命令

发表于 linux 分类,标签:
#从本地push代码到仓库git add --allgit commit -m  "tkm2"git push --set-upstream origin develop#强制更新git fetch --allgit checkout -b master origin/mastergit reset --hard origin/mastergit pull origin master#查看分支git branch -a#切换分支git checkout m...

101.删除redis中whiteKey开头的值

发表于 mysql 分类,标签:
import redis# Redis连接信息redis_host = 'hostname'redis_port = 6379redis_password = 'passwd'redis_db = 5  # 选择数据库5# 连接到Redis服务器redis_client = redis.StrictRedis(    host=redis_host, port=redis_port, password=redis_password, db=redis_db, decode_respo...

100.redis批量写入ip地址脚本

发表于 mysql 分类,标签:
#要使用Python脚本连接到Redis主机、选择数据库、并执行设置操作,你可以使用redis库。请确保在运行脚本之前安装了该库(可以通过运行pip install redis安装)。import redisimport re# Redis连接信息redis_host = 'hostname'redis_port = 6379redis_password = 'passwd'redis_db = 5  # 选择数据库5# 读取文本文件中的IP地址file_path = '1.txt'  #...