摘要: ## awk根据列过滤内容 ```shell netstat -nap | awk '{if($4~":6443" && $(NF-1)=="LISTEN") print $0}' ``` > `if()` :括号里面条件满足,则执行 `print $0` > `$4` : 第四列内容包含有 :64 阅读全文
posted @ 2021-12-16 09:44 jiaxzeng 阅读(120) 评论(0) 推荐(0) 编辑
摘要: Kubeconform项目 Kubeconform 是一个 Kubernetes 清单验证工具。Kubernetes 的 API 使用 OpenAPI(以前称为 swagger)规范在签入主 Kubernetes 存储库的文件中进行描述。 由于针对 OpenAPI 模式执行验证的工具的状态,项目通常 阅读全文
posted @ 2024-03-11 15:50 jiaxzeng 阅读(589) 评论(0) 推荐(0) 编辑
摘要: 为 docker,ctr,crictl 和 nerdctl 命令设置拉起镜像加速 阅读全文
posted @ 2024-02-20 14:58 jiaxzeng 阅读(1372) 评论(0) 推荐(1) 编辑
该文被密码保护。 阅读全文
posted @ 2024-01-09 09:41 jiaxzeng 阅读(1) 评论(0) 推荐(0) 编辑
摘要: postgresql 14 主备切换,原主加入集群中 阅读全文
posted @ 2023-12-29 14:48 jiaxzeng 阅读(796) 评论(1) 推荐(0) 编辑
摘要: 1 主库操作 1.1 创建用于数据流的用户 主库操作 $ psql -h 127.0.0.1 -p 5432 -U postgres -W Password: psql (14.10) Type "help" for help. postgres=# create role repl login r 阅读全文
posted @ 2023-12-29 11:45 jiaxzeng 阅读(1382) 评论(0) 推荐(1) 编辑
摘要: 背景说明 三个 keepalived 服务组成一个高可用环境。风和日丽的下午突然通知某个生产环境 vip 不通,使用承载 vip 的主机测试服务是正常。进而推断 keepalived 导致的问题。。。 三个主机IP地址分别是:x.x.3.17 、 x.x.3.18、x.x.3.19。 VIP地址是: 阅读全文
posted @ 2023-12-28 14:53 jiaxzeng 阅读(173) 评论(0) 推荐(0) 编辑
摘要: 内核参数 cat <<'EOF' | sudo tee /etc/sysctl.d/postgresql.conf >> /dev/null # 表示内核所允许的最大共享内存段的大小。推荐设置物理内存的一半 kernel.shmmax = 4294967296 # 共享内存的个数。推荐值:物理内存 阅读全文
posted @ 2023-12-25 15:43 jiaxzeng 阅读(234) 评论(0) 推荐(0) 编辑
摘要: 确认环境 egrep -c '(vmx|svm)' /proc/cpuinfo 输出结果需要大于0,否则主机需要开启cpu虚拟化功能。 内核参数 这个三个参数 =1 时,虚机桥接网卡DHCP获取不到IP地址 cat <<'EOF' | sudo tee /etc/sysctl.d/bridge.co 阅读全文
posted @ 2023-12-22 14:32 jiaxzeng 阅读(273) 评论(0) 推荐(0) 编辑
摘要: kvm宿主机要包含以下内核参数 cat <<'EOF' | sudo tee /etc/sysctl.d/bridge.conf > /dev/null net.bridge.bridge-nf-call-arptables = 0 net.bridge.bridge-nf-call-ip6tabl 阅读全文
posted @ 2023-12-20 16:26 jiaxzeng 阅读(43) 评论(0) 推荐(0) 编辑
摘要: 需求说明 CentOS7 关机之前自动执行脚本 解决方法 创建 shutdown-clean 服务 cat <<'EOF' | sudo tee /usr/lib/systemd/system/shutdown-clean.service > /dev/null [Unit] Description 阅读全文
posted @ 2023-12-18 17:38 jiaxzeng 阅读(75) 评论(0) 推荐(0) 编辑
点击右上角即可分享
微信分享提示