会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
vae_test_yu
博客园
首页
新随笔
联系
管理
订阅
上一页
1
2
3
4
5
6
7
···
10
下一页
2022年6月2日
更新服务器时间
摘要: ntpdate pool.ntp.org
阅读全文
posted @ 2022-06-02 18:13 test_yu
阅读(42)
评论(0)
推荐(0)
2022年5月27日
获取服务器序列号
摘要: dmidecode -t 1 | grep Serial| sed 's/^.*ber: //g'
阅读全文
posted @ 2022-05-27 22:30 test_yu
阅读(39)
评论(0)
推荐(0)
获取当前时间前30天循环增加三分钟
摘要: import datetime i=0 while True: ret = (datetime.datetime.now() +datetime.timedelta(days=-30)+datetime.timedelta(minutes=+i)).strftime('%Y-%m-%d %H:%M:
阅读全文
posted @ 2022-05-27 22:22 test_yu
阅读(35)
评论(0)
推荐(0)
随机生成浮点数,保留两位
摘要: import random #生成随机数,浮点类型控制随机数的精度round(数值,精度) float = round(random.uniform(1, 100), 2) # 取0-100之间的数值精确到小数点后两位 print (float)
阅读全文
posted @ 2022-05-27 22:18 test_yu
阅读(723)
评论(0)
推荐(0)
2022年5月17日
centos7升级node版本
摘要: 1、清除缓存信息 sudo npm cache clean -f 2、下载node安装包 sudo npm install -g n 3、升级到nodejs最新稳定版本 sudo n stable1、清除缓存信息 sudo npm cache clean -f 2、下载node安装包 sudo np
阅读全文
posted @ 2022-05-17 19:35 test_yu
阅读(553)
评论(0)
推荐(0)
2022年5月9日
centos7-shell脚本判断fdfs掉线重启
摘要: #!/bin/bash a=`netstat -unltp|grep fdfs_trackerd|wc -l` b=`netstat -unltp|grep fdfs_stroraged|wc -l` echo "$a" if [ "$a" -ne "1" ];then `fdfs_trackerd
阅读全文
posted @ 2022-05-09 19:01 test_yu
阅读(84)
评论(0)
推荐(0)
2022年5月6日
docker问题处理
摘要: # 1.解决docker 端口防火墙拦截不住问题处理:```vim /etc/docker/daemon.json{"iptables": false}```# 2.解决容器不能访问外网和内网同网段ip开启ipv4端口转发```vi /etc/sysctl.confnet.ipv4.ip_forwa
阅读全文
posted @ 2022-05-06 16:52 test_yu
阅读(42)
评论(0)
推荐(0)
漏洞处理
摘要: 漏洞处理: 1. 服务器防火墙拦截不住docker 映射的端口问题修复: 在如下配置文件添加次配置:"iptables": false vim /etc/docker/daemon.json { "registry-mirrors": ["http://hub-mirror.c.163.com"],
阅读全文
posted @ 2022-05-06 15:04 test_yu
阅读(156)
评论(0)
推荐(0)
2022年4月19日
nginx-conf配置文件
摘要: server { listen 4443 ssl; server_name 127.0.0.1; ssl on; ssl_certificate /usr/local/nginx/ssl/server_cert.crt; ssl_certificate_key /usr/local/nginx/ss
阅读全文
posted @ 2022-04-19 12:00 test_yu
阅读(47)
评论(0)
推荐(0)
nginx相关配置
摘要: 1. nginx 漏洞修复处理: 1)server 增加如下配置: ssl_protocols TLSv1.2; (TLS Version 1.0 Protocol Detection 漏洞修复) ssl_dhparam {$path}/dhparams.pem; (Secure Sockets L
阅读全文
posted @ 2022-04-19 11:59 test_yu
阅读(307)
评论(0)
推荐(1)
上一页
1
2
3
4
5
6
7
···
10
下一页
公告