How to check the presence of php and apache on ubuntu server through ssh

Viewed 176582

How can I check whether apache is installed with php and mysql on Ubuntu server through ssh?

Also if it is installed, in which directory?

And if in case some other package is installed, like lighttpd, where that is.

5 Answers

How to tell on Ubuntu if apache2 is running:

sudo service apache2 status

/etc/init.d/apache2 status

ps aux | grep apache
Related