wzh 发布的文章

安装
dpkg -i CyberPower_PPL_Linux+64bit+(deb)_v1.4.1).deb
在上述设置中,运行一个名为 pwrstatd-powerfail.sh 的脚本需要 1 秒钟,系统将在发生停电事件 60 秒后关闭。
pwrstat -pwrfail -delay 60 -active on -cmd /etc/pwrstatd-powerfail.sh -duration 1 -shutdown on
在上述设置中,在目录 /etc 中运行名为 pwrstatd-lowbatt.sh 的 Shell 脚本将花费 1 秒,并且当剩余运行时间少于 300 秒或电池容量低于 35% 时,系统将被关闭。
pwrstat -lowbatt -runtime 300 -capacity 35 -active on -cmd /etc/pwrstatd-lowbatt.sh -duration 1 -shutdown on
在上述设置中,系统将在发生停电事件 60 秒后关闭。
pwrstat -pwrfail -delay 60 -shutdown on
查看配置信息
pwrstat -config
显示当前UPS状态。
pwrstat -status

pwrstat -pwrfail -delay 60 -cmd /etc/pwrstatd-powerfail.sh -duration 1 -shutdown on
pwrstat -lowbatt -runtime 300 -capacity 35 -cmd /etc/pwrstatd-lowbatt.sh -duration 1 -shutdown on

#!/bin/bash
#pve9换源

#修改基础系统(Debian)的源文件 下面两个命令替换 Debian 官方源和安全更新源。
sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list.d/debian.sources
sed -i 's/security.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list.d/debian.sources

#修改 Proxmox 的源文件 换源
cat > /etc/apt/sources.list.d/pve-no-subscription.sources <<EOF
Types: deb
URIs: https://mirrors.ustc.edu.cn/proxmox/debian/pve
Suites: trixie
Components: pve-no-subscription
Signed-By: /usr/share/keyrings/proxmox-archive-keyring.gpg
EOF

#修改 ceph 源文件 换源
if [ -f /etc/apt/sources.list.d/ceph.sources ]; then
  CEPH_CODENAME=`ceph -v | grep ceph | awk '{print $(NF-1)}'`
  source /etc/os-release
  cat > /etc/apt/sources.list.d/ceph.sources <<EOF
Types: deb
URIs: https://mirrors.ustc.edu.cn/proxmox/debian/ceph-$CEPH_CODENAME
Suites: $VERSION_CODENAME
Components: no-subscription
Signed-By: /usr/share/keyrings/proxmox-archive-keyring.gpg
EOF
fi

文件修改

vi /etc/config/dhcp

config dhcp 'lan'

option leasetime '1h'  # DHCPv4租约时间
option ra_maxinterval '60' #最长 RA 间隔
option ra_mininterval '20' #最短 RA 间隔
option ra_lifetime '180' # RA 生存时间
option ra_useleasetime '1' # 使用DHCPv4租约时间作为IPv6前缀的首选和有效生命周期的限制 对应valid_time
option preferred_lifetime '10m' # IPv6前缀生存时间 对应preferred_time
option ra_default '2' #默认路由强制的

命令修改

uci set dhcp.lan.leasetime='1h'
uci set dhcp.lan.ra_default='2'
uci set dhcp.lan.ra_maxinterval='60'
uci set dhcp.lan.ra_mininterval='20'
uci set dhcp.lan.ra_lifetime='180'
uci set dhcp.lan.preferred_lifetime='5m'

uci set dhcp.lan.leasetime='1h'
uci set dhcp.lan.ra_default='2'
uci set dhcp.lan.ra_maxinterval='60'
uci set dhcp.lan.ra_mininterval='20'
uci set dhcp.lan.ra_lifetime='180'
uci set dhcp.lan.preferred_lifetime='5m'

知识库
https://openwrt.org/docs/techref/odhcpd

nano /etc/ssh/sshd_config
在sshd_config文件中,找到PermitRootLogin这一行,并确保它被设置为yes。如果没有这一行,你可以添加它:
PermitRootLogin yes
确保没有其他的行设置了PermitRootLogin prohibit-password或PermitRootLogin forced-commands-only,这些设置会限制root用户的登录方式。
重启SSH服务
systemctl restart sshd