-
10 年前
OpenSSL创建自签名SSL证书及Nginx配置
ssl自签名证书 nginx ssl配置 运维技术
一、例如给test.imdst.com创建自签名证书 创建根证书的私匙 openssl genrsa -out test.imdst.com.key 2048 利用私钥创建签名请求 openssl req -new -subj "/C=US/ST=GuangDong/L=GuangZhou/O=Your Company Name/OU=imdst.com/CN=test.imdst.com"…
-
10 年前
Python 多行合并一行 行尾加上换行符'\n'并写入文件
Shell/Python python合并行
原始文件 活动一: 活动名称:每日充值接力 活动二: 活动名称:天天充值接力 脚本处理 #!/usr/bin/python # _*_coding:utf-8 _*_ newfile = [] with open("notice.txt",'rb') as fp: for i in fp.readlines(): i = i.strip() if len…
-
10 年前
-
10 年前
nagios 监控网卡带宽脚本
Shell/Python 运维监控
#!/bin/bash #set nagios status STATE_OK=0 STATE_WARNING=1 STATE_CRITICAL=2 STATE_UNKNOWN=3 usage (){ echo -en "Usage: $0 -d [ eth|bond ]\nFor example:\t$0 -d bond0 -w 100[B|K|M|G] -c 2…
-
10 年前
nagios 监控物理内存使用率脚本
Shell/Python
Linux 空闲内存计算方式 空闲内存=free+buffers+cached #!/bin/bash #nagios exit code STATE_OK=0 STATE_WARNING=1 STATE_CRITICAL=2 STATE_UNKNOWN=3 help () { local command=`basename $0` echo "NA…
Linux运维笔记|自动化运维攻城狮

