To check if Apache2 service is running, simply run the following command:
sudo service apache2 statusTo check if MySQL service is running, simply run the following command:
sudo service mysql statusFor CentOS or Fedora:
To restart the service:
$ sudo systemctl restart httpdTo check the service status:
$sudo systemctl status httpd
