需求:检测Linux上Tomcat是否允许,挂了的话给运维发送邮件通知 实现:编写脚本一直检测Tomcat进程是否存活,否则给运维发送邮件,脚本设置开机时自动启动 1.Linux发送邮件 vim /etc/mail.rc 添加如下配置 set from=xxx@yeah.net set smtp=smtp.yeah.net set smtp-auth-user=xxx@yeah.net set smtp-auth-password=passwordxxx set smtp-auth=login
转:装完Centos7提示Initial setup of CentOS Linux 7 (core) 在用U盘装完CentOS后,重新开机启动后显示: Initial setup of CentOS Linux 7 (core) 1) [x] Creat user 2) [!] License information (no user will be created) (license not accepted) Please make your choice from above ['q
众所周知nginx安装后需要手动去启动,每次开机之后都要执行nginx的启动命令很蛋疼.那么我们来让nginx开机启动吧 1.先創建一個nginx文件把 [root@localhost ~]# vi /etc/init.d/nginx #这个命令可以直接创建一个nginx文件 2.把下面的代碼拷貝到剛剛創建的nginx文件里 #!/bin/bash # nginx Startup script for the Nginx HTTP Server # it version. # chkconfig