该文被密码保护。 阅读全文
摘要:
zabbix agent 自定义 UserParameter 阅读全文
摘要:
工具从网络自行下载,目前我存储在网盘上,可下载后调用 @echo off rem 文件变量 set zip=D:\tools\7za.exe set md5=D:\tools\FileCheck_MD5.exe ::file_package cd /d %~pd0 %md5% -create %~p 阅读全文
摘要:
脚本很简单,直接上功能介绍及脚本,可以做模板使用: #!/bin/bash ####################################################### # $Version: v1.0 # $Function: Shell Template Script # $A 阅读全文
摘要:
#!/bin/bash cd `dirname $0` KEY_FILE='/home/www/.ssh/id_rsa' SSH_OPTIONS='-C -o StrictHostKeyChecking=no ' chmod 600 ${KEY_FILE} /usr/bin/rsync -rzt - 阅读全文
摘要:
redis常用命令、redis备份与恢复 阅读全文
摘要:
定期对服务器进行扫描,将危险端口有开放的服务器记录日志或通过邮件、微信告警出来先定义服务器列表 iplist:10.10.0.5010.10.0.5110.10.0.52....检查端口过程如下: #!/bin/bash for i in `awk '{print $1}' iplist`; do 阅读全文
摘要:
此脚本用于同业务服务器新增节点,同步文件使用主要使用到的技巧为:Shell 脚本传递带有空格的参数(正常遇到空格自动断开)可以通过@命令来处理即将参数7换成echo${@:7},这样将自动识别到的第7个开始,全部获取到作为最后第7个参数以下为同步脚本: #!/bin/bash RSYNC_FILE( 阅读全文
摘要:
注意修改配置文件,server_name ip启动Nginx服务systemctl start nginxsystemctl enable nginx验证http://localhost 创建一个index curl -u elastic:changeme -XPUT http://localhos 阅读全文
摘要:
sshfs 安装yum install glib2-devel fuse-sshfs官方版本地址https://github.com/libfuse/sshfs/releases目前最新版本:wget https://github.com/libfuse/sshfs/releases/downloa 阅读全文
摘要:
本脚本可获取服务器Site值和服务器ip,执行之后可通过RTX推送系统消息 脚本例子如下: #!/bin/bash function alarm(){ user="$1" content="$2" stat=$(curl --connect-timeout 60 -s "http://yw.test 阅读全文
摘要:
日常使用范例见如下例子: 利用 ${ } 还可针对不同的变数状态赋值 (沒设定、空值、非空值): ${file-my.file.txt} :假如 $file 沒有设定,則使用 my.file.txt 作传回值。(空值及非空值時不作处理) ${file:-my.file.txt} :假如 $file 阅读全文
摘要:
docker 容器默认的空间是 10G, 如果想指定默认容器的大小(在启动容器的时候指定),可以在 docker 配置文件里通过 dm.basesize 参数指定,比如 docker -d --storage-opt dm.basesize=20G 是指定默认的大小为 20G 动态扩展的优点: 1、 阅读全文
摘要:
Ansible 是一款基于 Python 开发的自动化运维工具,可以进行配置管理、批量部署等功能。对于机器较多的场景,可以使用 Ansible 来免去重复敲命令的烦恼。 阅读全文