linux
2025/6/30大约 3 分钟约 753 字
1.使用certbot为域名证书过期续签
1.安装snapd 并配置 certbot & nginx
yum install snapd -y
systemctl enable --now snapd.socket
ln -s /var/lib/snapd/snap /snap
echo 'export PATH="$PATH:/snap/bin"' >> ~/.bashrc
source ~/.bashrc
// 到此 安装snapd 结束
snap install --classic certbot
setenforce 0 # 关闭linux
certbot --version
snap set certbot trust-plugin-with-root=ok
snap install certbot-dns-nginx关联nginx目录 用于自动配置
ln -s /program/env/nginx-1.24.0/sbin/nginx /usr/bin/nginx
ln -s /program/env/nginx-1.24.0/conf/ /etc/nginx申请指定域名证书
certbot --nginx -d mudwap.top查看证书列表
certbot certificates设置定时任务
0 */12 * * * certbot renew --quiet --no-self-upgrade --renew-hook 'nginx -s reload'2.设置banner
vim /etc/motd_ _
| ()
| | _ _ _ | | | '_ | | | \ \/ / | | | | | | || |> < ||_|| ||\,_/_/_\
用途:wap_mud server
qq群:123
启动mongo:mongod -f bin/mongodb.conf
启动jenkins:nohup java -jar /hhx/jenkins.war --httpPort=8990 >/123/service/log/jenkins.log 2>&1 & password:123
jenkins工作目录:/root/.jenkins/workspace/wap_mud
日志目录:/123/service/log/3. 运部署快速kill + 启动
ps x | grep day-and | grep -v bash | grep -v grep | awk '{print $1}' |xargs kill -9 ; setsid java -jar /program/day-and-night.jar
ps x | grep tyol | grep -v bash | grep -v grep | awk '{print $1}' |xargs kill -9 ; setsid java -jar /program/tyol.jar4 finalShell finalshell
- 参考文档 https://cuanmu.com/237.html
- 专业版高级版算法
FinalShell 激活码在线生成
⚠️ 请输入机器码后再试!
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8"/>
<title>FinalShell 离线激活码生成 </title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.1.1/crypto-js.min.js"></script>
<style>
body {
font-family: sans-serif;
padding: 2rem;
background: #f5f5f5;
}
.box {
background: white;
padding: 2rem;
border-radius: 8px;
max-width: 500px;
margin: auto;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
input, button {
padding: 0.5rem;
width: 100%;
margin-top: 1rem;
}
.result {
margin-top: 1.5rem;
white-space: pre-wrap;
}
</style>
</head>
<body>
<div class="box">
<h2 id='pk-menu-3'> 离线激活码生成器 </h2>
<input id="machineCode" type="text" placeholder=" 请输入机器码..."/>
<button onclick="generate()"> 生成授权码</button>
<div class="result" id="output"></div>
</div>
<script>
function md5(str) {
return CryptoJS.MD5(str).toString();
}
function keccak384(str) {
return CryptoJS.SHA3(str, { outputLength: 384 }).toString();
}
function generate() {
const code = document.getElementById('machineCode').value.trim();
const out = document.getElementById('output');
let res = '';
res += 'FinalShell < 3.9.6\n';
res += '高级版:' + md5('61305' + code + '8552').slice(8, 24) + '\n';
res += '专业版:' + md5('2356' + code + '13593').slice(8, 24) + '\n\n';
res += 'FinalShell ≥ 3.9.6\n';
res += '高级版:' + keccak384(code + 'hSf(78cvVlS5E').slice(12, 28) + '\n';
res += '专业版:' + keccak384(code + 'FF3Go(*Xvbb5s2').slice(12, 28) + '\n\n';
res += 'FinalShell 4.5\n';
res += '高级版:' + keccak384(code + 'wcegS3gzA$').slice(12, 28) + '\n';
res += '专业版:' + keccak384(code + 'b(xxkHn%z);x').slice(12, 28) + '\n';
res += 'FinalShell 4.6\n';
res += '高级版:' + keccak384(code + 'csSf5*xlkgYSX,y').slice(12, 28) + '\n';
res += '专业版:' + keccak384(code + 'Scfg*ZkvJZc,s,Y').slice(12, 28) + '\n';
out.textContent = res;
}
</script>
</body>
</html>5.使用 acme.sh 自动更新超时证书
- 安装
wget https://gitee.com/neilpang/acme.sh/raw/master/acme.sh
./acme.sh --install- 腾讯dnsPods 申请key
- 配置密钥
# 配置 ~/.acme.sh/account.conf 文件
DP_Id="xxxx"
DP_Key="xxxxxxxx"- 生成证书
acme.sh --install-cert -d mudwap.top --ecc --key-file /program/env/nginx-1.24.0/ssl/mudwap.top.key --fullchain-file /program/env/nginx-1.24.0/ssl/mudwap.top_bundle.pem --reloadcmd "nginx -s reload"- 检查定时任务
# 检查是否有定时任务处理域名 crontab -l
# 编辑定时任务 crontab -e排查linux系统里进程资源占用
# top 面板
top
ps aux --sort=-%mem | head -n 10- M(大写 M) → 按内存使用率排序(%MEM)。
- P(大写 P) → 按 CPU 使用率排序。
- N → 按进程号排序。
- T → 按运行时间排序。
# 查看占用最大内存的进程实际cmd 路径的两种方法
ps -p 26697 -o pid,user,cmd
ls -l /proc/26697/exe