If you run mysql, nginx, php in one server, it may cause out of memory, mysqld server will down cause of that, here, I get three scripts for checking my server.(nginx | apache)

1.Check MySQL

vim /your_path/checkmysql.sh

2.Check httpd

vim /your_path/checkhttpd.sh

3.Check nginx

vim /your_path/checknginx.sh

4.Check php-fpm

vim /your_path/checkphpfpm.sh

5.Add x for script

cd your_path
chmod +x *
Or you can add by one.

6.Add crontab

Notice, your server won’t cover nginx and apache, right? So, the script for crontab should not add all.

crontab -e


电子邮件地址不会被公开。 必填项已用*标注