![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
shell脚本练习
友人a笔记
Aiden
展开
-
shell 判断三个条件满足情况
要求:视频软件会每天定时上传文件,列表文件名字已知,并且每个文件都会有三个不同后缀名,需要每天自动检测是否有缺少某个视频文件,以便补充文件。例如:上传结果A.1、A.2、A.3、B.1、B.2、C.3需要根据已知的文件列表去对比结果,然后提示缺少的文件B.3、C.1、C.2原创 2023-03-21 10:24:20 · 175 阅读 · 0 评论 -
Centos 集群时间同步chrony
实验环境系统 角色 IPCentos7.6 Server 192.168.14.217Centos7.6 Client 192.168.14.218一、Server端配置1、Centos7系统已经默认安装chrony服务,没有再执行以下命令[root@server ~]# yum install -y chrony2、启动服务[root@server ~]# systemctl start chronyd[root@原创 2020-07-06 08:52:05 · 582 阅读 · 0 评论 -
Centos7 系统服务监控脚本,mail邮件告警
编写脚本检测应用服务状态,结合计划任务自动发送邮件告警系统版本[root@localhost ~]# cat /etc/redhat-release CentOS Linux release 7.6.1810 (Core) 一、根据需求安装应用服务,实验安装http做测试[root@localhost ~]# yum install -y httpd二、启动服务,注意查看...原创 2019-03-25 10:04:28 · 1838 阅读 · 0 评论 -
一键安装nginx脚本
1、自动配置epel源,要给脚本执行权限[root@localhost ~]# cat nginx.sh #!/bin/bashecho "--------------------------"echo "--------------------------"echo "change firewall status and selinux"echo "---------------...原创 2019-10-07 20:53:14 · 882 阅读 · 0 评论 -
Centos7 网络监控脚本,mail邮件告警
编写ping脚本检测网络状态,结合计划任务自动发送邮件告警系统版本[root@localhost ~]# cat /etc/redhat-release CentOS Linux release 7.6.1810 (Core)如果不想使用系统自带邮件包,先进行删除#rpm -qa |grep mailx sendmail#rpm -e xxx一、yum安装依赖包[...原创 2019-03-25 10:04:07 · 2560 阅读 · 1 评论