Sunday Blog

人生是一场刻意练习

Ubuntu 22.04 安装 Wireguard

Ubuntu 22.04 Install Wireguard

环境 wireguard服务器: 外网 网卡接口:ens192 IP: 139.38.120.136 内网 网卡接口:ens160 IP: 192.168.77.3 wireguard网段: 10.78.0.0/24 注:不可与双方内网网段重

Sftp 多用户不同权限配置

Sftp Mutil Directory Permissions

sftp 多用户,多目录不同权限设置 sftp配置多用户, 设置权限只能访问自己的目录, 显示家目录为/ OS: Centos7 显示路径为/ useradd -g 用户组 -d 指定家目录 -s shell

minio + picgo 自建图床

minio + picgo 自建图床

obsidian安装插件实现贴入图片自动上传到图床 安装 mkdir -p /data/minio/{data,config} docker 运行 docker run \ -p 9000:9000 \ -p 9090:9090 \ --name minio \ -d --restart=always \ -e "MINIO_ROOT_USER=admin" \ -e "MINIO_ROOT_PASSWORD=admin_password" \ -v /data/minio/data:/data \ -v /data/minio/config:/root/.minio \ minio/minio \ server /data --console-address ":9090" docker-compose 运行 version:

kube-flannel cni failed to find plugin "bridge" in path [/opt/cni/bin]错误

kube-flannel cni failed to find plugin "bridge" in path [/opt/cni/bin]

安装kube-flannel网络插件后,发现新建pod一直在创建中,一开始还以为是镜像拉不下来, 查看日志才发现是缺少bridge插件 root@k8s-master01:~# kubectl get pod

kube-flannel pod 不断重启

kube-flannel always restaring

wget https://raw.githubusercontent.com/flannel-io/flannel/master/Documentation/kube-flannel.yml 安装flannel网络插件后发现pod不断在重启 STATUS状态重复这几种变化 Runnging、Complete、CrashLoopBa

Raid Disk Health Check

Raid Disk Health Check

磁盘阵列卡检测与监控硬盘健康状况 常用软件 MegeRAID Hard Disk Sentinel 一般地,支持RAID 5的卡,我们称其为阵列卡,都可以使用LSI官方提供的MegaCli工具来

Dingtalk Shell 脚本

Dingtalk Shell

#!/bin/bash export PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:$PATH" # 钉钉关键词: 20, ERROR, INFO, WARN title="Dingtalk Test" content="Hello" atMobiles=("156xxx") atUserIds=() isAtAll="False" dingtalk_text(){ webhook_url='https://oapi.dingtalk.com/robot/send?access_token=097cxxxxxxxxxxxxxxxxxxxc924' current_time=$(date +"%Y-%m-%d %H:%M:%S") if [[ $content != "" ]];then title_date="【$(hostname) $title】 $current_time" message="{ \"msgtype\": \"text\",

CentOS 7.4 安装 Cobbler 实现自动化安装 Ubuntu 18.04

Cobbler + Kickstart

https://cobbler.github.io 环境准备 OS: CentOS 7.6 IP: 192.168.1.22 关闭防火墙 sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config setenforce 0 systemctl stop firewalld.service systemctl disable firewalld.service 阿里云源 curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo 安装Cobbler 安装cobbler yum install cobbler cobbler-web dhcp debmirror pykickstart fence-agents -y 开机启动

Java Redis Exception Connection Reset by Peer

Java Redis Exception Connection Reset by Peer

报错信息 2023-05-18 14:18:01.916 ERROR 109202 --- [pool-6-thread-1] o.s.s.s.TaskUtils$LoggingErrorHandler : Unexpected error occurred in scheduled task. org.springframework.data.redis.RedisSystemException: Redis exception; nested exception is io.lettuce.core.RedisException: io.netty.channel.unix.Errors$NativeIoException: readAddress(..) failed: Connection reset by peer at org.springframework.data.redis.connection.lettuce.LettuceExceptionConverter.convert(LettuceExceptionConverter.java:74) ~[spring-data-redis-2.1.10.RELEASE.jar!/:2.1.10.RELEASE] at org.springframework.data.redis.connection.lettuce.LettuceExceptionConverter.convert(LettuceExceptionConverter.java:41) ~[spring-data-redis-2.1.10.RELEASE.jar!/:2.1.10.RELEASE] at org.springframework.data.redis.PassThroughExceptionTranslationStrategy.translate(PassThroughExceptionTranslationStrategy.java:44) ~[spring-data-redis-2.1.10.RELEASE.jar!/:2.1.10.RELEASE] at org.springframework.data.redis.FallbackExceptionTranslationStrategy.translate(FallbackExceptionTranslationStrategy.java:42) ~[spring-data-redis-2.1.10.RELEASE.jar!/:2.1.10.RELEASE] at org.springframework.data.redis.connection.lettuce.LettuceConnection.convertLettuceAccessException(LettuceConnection.java:268) ~[spring-data-redis-2.1.10.RELEASE.jar!/:2.1.10.RELEASE] at org.springframework.data.redis.connection.lettuce.LettuceSetCommands.convertLettuceAccessException(LettuceSetCommands.java:520) ~[spring-data-redis-2.1.10.RELEASE.jar!/:2.1.10.RELEASE] at org.springframework.data.redis.connection.lettuce.LettuceSetCommands.sMembers(LettuceSetCommands.java:245) ~[spring-data-redis-2.1.10.RELEASE.jar!/:2.1.10.RELEASE] at org.springframework.data.redis.connection.DefaultedRedisConnection.sMembers(DefaultedRedisConnection.java:607) ~[spring-data-redis-2.1.10.RELEASE.jar!/:2.1.10.RELEASE] at org.springframework.data.redis.core.DefaultSetOperations.lambda$members$6(DefaultSetOperations.java:158) ~[spring-data-redis-2.1.10.RELEASE.jar!/:2.1.10.RELEASE] at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:224) ~[spring-data-redis-2.1.10.RELEASE.jar!/:2.1.10.RELEASE] at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:184) ~[spring-data-redis-2.1.10.RELEASE.jar!/:2.1.10.RELEASE] at org.springframework.data.redis.core.AbstractOperations.execute(AbstractOperations.java:95) ~[spring-data-redis-2.1.10.RELEASE.jar!/:2.1.10.RELEASE] at org.springframework.data.redis.core.DefaultSetOperations.members(DefaultSetOperations.java:158)

iptables NAT转发共享上网

iptables nat forward share network

原文:http://wwdhks.blog.51cto.com/839773/1154032 iptables是一个Linux下优秀的nat+

Golang 基础知识笔记

Golang Basic Knowledge Notes

一、GO变量 1.1 变量的介绍 变量概念 变量相当于内存中的一个数据存储空间,可以将变量看做是一个房间的门牌号,通过门牌号我们可以找到房间,同样的道理

ESXi 6.6 固态硬盘阵列不识别为SSD类型解决

Esxi 6 Ssd Arry Identification

ESXi开启SSH,登陆ESXI主机 # 列出储存清单 esxcli storage nmp device list # WEB界面 - 存储 - 设备 查看 naa.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx # 设置为SSD类型 esxcli storage nmp satp rule add -s VMW_SATP_LOCAL --device naa.644a84200b26dc0023dda3c80dcac2xx --option="enable_ssd" 重启ESX

Dell R620 R630 R720 R730 通过IPMI手动控制服务器风扇转速

Dell Server Ipmi Fan Offset

测试IPMI的连接性: ipmitool -I lanplus -H 192.168.1.149 -U root -P root raw 将风扇设置为手动调节转速 ipmitool -I lanplus -H 192.168.1.149 -U root -P root-passwd raw 0x30 0x30 0x01 0x00 手动设置风扇转速(最后一字节指示风扇转速的百分

Ubuntu 20.04 Netplan Dns

Ubuntu 20.04 Netplan Dns

如果在netplan设置dns了,但是实际验证中发现无效。 例如通过nslookup去解析域名,显示的是 dns服务器是127.0.0.53 但是

Ubuntu 22.04 设置静态IP

ubuntu 22.04 setting static ip

cat /etc/netplan/00-installer-config.yaml # This is the network config written by 'subiquity' network: ethernets: ens160: dhcp4: false addresses: - 192.168.77.3/24 ens192: dhcp4: false addresses: - 119.38.120.107/27 nameservers: addresses: - 223.5.5.5 routes: - to: default via: 119.38.120.1 version: 2 netplan apply