I'm not much into linux, so can any body please guide me how do i check if the apache is installed with php and mysql on ubuntu server through ssh. And if set up in which directory.

And when just in case another package is installed like lighttpd.

Thanks.

Type aptitude to begin the package manager. There you can observe which programs are installed.

Use / to find packages. Try trying to find apache2 and php5 (or whatever versions you need to use). If they're installed, they must be bold and also have an i before them. If they're not installed (p while watching line) and you need to set them up (and you've got root permissions), use + to choose them after which g (two times) to set up it.

Word of warning: Before doing that, it may be smart to possess a glance at some aptitude tutorial on the internet.

A different way to discover if your program is installed is to apply the which command. It'll show the road from the program you are trying to find. For instance if whenever your trying to find apache you should use the next command:

$ which apache2ctl
/usr/sbin/apache2ctl

And when you trying to find PHP do this:

$ which php
/usr/bin/php

You can inspect the accessible apache2 modules:

$ ls /usr/lib/apache2/modules/

Or attempt to let the php module, if you possess the appropriate access:

$ a2enmod
Which module would you like to enable?
Your choices are: actions alias asis ...
... php5 proxy_ajp proxy_balancer proxy_connect ..