检测lamp各项服务是否正常开启和运行的命令

1、检查Apache,php和Mariadb服务是否正常运行

1.1、检查Apache服务

systemctl status httpd.service

看到   Active: active (running)  就说明运行正常。

否则开启Apache服务

systemctl enable httpd && systemctl start httpd  //开启服务,并设置开机启动

1.2检查php是否在运行

ps -ef | grep php

看到

root 4411 3967 0 22:30 pts/1 00:00:00 grep --color=auto php

就说明正常运行

1.3检查Mariadb服务

systemctl status mariadb.service

看到   Active: active (running)  就说明运行正常。

否则开启Mariadb服务

systemctl enable mariadb && systemctl start mariadb  //开启服务,并设置开机启动
posted @ 2020-07-07 22:43  养猪至富  阅读(387)  评论(0编辑  收藏  举报