- 博客(17)
- 收藏
- 关注
![](https://csdnimg.cn/release/blogv2/dist/pc/img/listFixedTop.png)
原创 zabbix安装部署及一键启动脚本
zabbix安装部署及一键启动脚本1.导入zabbix源2.安装zabbix包和数据库包3.创建zabbix库授权用户将sql语句导入数据库编辑配置文件更改时区启动服务查看端口Zabbix安装启动脚本:...
2020-04-23 09:15:15
422
![](https://csdnimg.cn/release/blogv2/dist/pc/img/listFixedTop.png)
原创 检测mysql主从
检测mysql主从系统环境:centos7mysql主从已安装完毕#!/bin/bash mysqL_shuzu=(`mysql -e "show slave status \G;" | grep "Running" | awk '{print $2}'`) echo ${mysql_shuzu[@]}1f [ ${mysql_shuzu[0] == "Yes" -a ${mysql_...
2020-04-20 18:22:57
172
![](https://csdnimg.cn/release/blogv2/dist/pc/img/listFixedTop.png)
原创 系统巡检脚本
#!/bin/bash#日常巡检脚本包括###########################################系统信息os_check(){#操作系统的类型os_type=$(uname -r)echo "系统类型为:${os_type}"#操作系统的版本号os_version=$(cat /etc/redhat-release)echo "系统版本号为:${os...
2020-04-20 17:52:52
259
![](https://csdnimg.cn/release/blogv2/dist/pc/img/listFixedTop.png)
原创 shell脚本的基本应用与操作
shell脚本**shell脚本**二级目录三级目录shell脚本#!/bin/bash (解释器)#ifconfig#shell 变量name=""二级目录三级目录
2020-04-17 17:10:41
122
原创 linux重要及常用命令
Linux下的一些重要命令du: 单独使用时显示当前文件夹中所有文件(当前存在的)占系统数据块的情况-a 显示所有文件对系统数据块的使用情况(包括子目录下所有文件和文件夹)-b 显示数据块大小时以字节为单位-c 显示数据块情况以及文件总和-s 显示文
2020-06-30 23:21:15
168
原创 zabbix 4.0安装
zabbix 4.0安装系统centos7关闭防火墙关闭selinux登录1 配置yum源 zabbix.repo[zabbix]name=Zabbix Official Repository - $basearchbaseurl=http://mirrors.aliyun.com/zabbix/zabbix/4.4/rhel/7/$basearch/enabled=1gpgcheck=0gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBI
2020-05-09 09:57:03
136
原创 elk的搭建
1 ELK平台搭建两台虚拟机:192.168.44.134 192.168.44.135关闭防火墙,关闭selinuxsystemctl stop firewalldsetenforce 0配置文件系统优化(两台虚拟机都配置)Vi /etc/security/limits.conf在最后一行添加vi /etc/sysctl.conf(两台虚拟机都配置)拉入ELK.zip...
2020-04-27 12:02:59
183
原创 Nginx源码安装启动及启动脚本
Nginx源码安装启动及启动脚本Yum安装环境 yum -y install pcre-devel zlib-devel openssl openssl-devel gcc gcc-c++关闭防火墙及selinux/ : [root@localhost ~]# systemctl stop firewalld[root@localhost ~]# setenforce 0导入ngin...
2020-04-24 18:31:41
445
原创 shell 三剑客
shell三剑客grep====================================================grep 的全程为Global search Regular Expression and Print out the line (类似windows 平台的ctrl+F)#过滤出/etc/passwd 包含root的行cat /etc/passwd|grep ...
2020-04-23 18:36:35
128
原创 通过封禁ip来解决ddos
通过封禁ip来解决ddosmkdir dropip在dropip中添加ip获取连接数最多的前10个ip并临时写入文件dropip中#!/bin/bashnetstat -an|grep ESTABLISHED|awk '{print $5}'|awk -F ':' {print $1}' |sort | uniq >> dropipfor ip in 'cat dropip...
2020-04-20 18:37:14
417
原创 猜数字,shell脚本
#!/bin/bashji=0read -p "请输入一个数:"awhile truedosun=$(($RANDOM%100+0)) if [ $sun -gt $a ];then echo "${sun}>${a}隨机数大" elif [ $sun -lt $a ];then echo "${sun}<${a}隨机数小" else echo "两数相等" ...
2020-04-20 18:17:24
94
原创 expect ftp免交互
系统环境:centos7yum安装expect:yum -y install expect#!/usr/bin/expectspawn ftp localhostexpect "name*"send "ftp\r"expect "ftp>*"send "cd pub/other\r"expect "ftp>*"send "put /tmp/123.txt xo.txt...
2020-04-20 18:01:04
273
原创 expect ssh免交互--vsftpd
系统环境:centos7yum安装expect:yum -y install expect#!/usr/bin/expectspawn ssh root@192.168.44.131expect { "(yes/no)?" {send "yes\r";} "password:" {send "123\r"} }expect "]#"se...
2020-04-20 17:57:18
92
原创 MYSQL的主从复制+读写分离,检测MySQL主从小脚本简化
@mysql一级目录系统环境:centos7主mysql上:#cp /etc/my.cnf /etc/my.cnf.bak#vi /etc/my.cnf#service mysqld restart登录MySQLmysql> grant all on . to ‘replication’@’%’ identified by ‘replication’;mysql&g...
2020-04-19 21:50:06
153
原创 shell脚本简单检测网站是否存活!
检测网站是否存活!编写一个url.txt文件(公司域名)使用curl 命令 判断 访问网站的状态码(200为ok)#vim url.sh#!/bin/bashcheck(){code=curl -I -m 10 -o /dev/null -s -w %{http_code} http://${url} (curl 命令)if [ $code -eq 200 ];then (i...
2020-04-17 19:25:33
844
原创 mendmail邮件的发送(简)
mendmail邮件的发送yum安装sendmail启动sendmail:service sendmail start配置/etc/mail.rc:vim /etc/mail.rc 在最后添加:set smtp-auth-user=1342******@***.com #这里输入邮箱的账号set smtp-auth-password=dgrk####这里是邮箱的授权码而不是密码...
2020-04-17 19:15:01
513
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人