How can I check what software is present on a linux server? This is a default configuration and I want to check if it has apache, php, mysql on it.

link|improve this question

50% accept rate
feedback

6 Answers

Depends on the distribution.

For Red Hat, derivatives and other RPM-based distro's, you can type:

rpm -qa

For Debian and derivatives, you can type:

dpkg -l

Both will show a list of all installed packages on the machine.

Specifically for you requirements, I'd do the appropriate one and grep -i on httpd (Red Hat) or apache (Debian et al.), php and mysql.

link|improve this answer
If you know the specific package name rpm -q httpd is faster because the search is narrowed. But rpm -qa will give you a little more flexibility if you don't specifically know the package name. – Alex Sep 3 '10 at 15:53
rpm -qa showed me lots of information, but didnt mention php or apache, whereas php is definitely installed (I was able to run it from the command prompt) – TWord Sep 4 '10 at 7:10
On RHEL, the Apache package is called httpd. The OUtput of rpm -qa should mention php. – wzzrd Sep 4 '10 at 10:49
feedback

Perhaps you'd like to know which software was installed lately. If so, then run rpm -qa --last | tac. This shows all installed packages in chronological order.

link|improve this answer
feedback

For redhat/centos/fedora rpm -qa might be what you are looking for.

link|improve this answer
feedback

If you have a GUI installed on a Debian box, you can use synaptic. There is a preconfigured filter to show all installed packages.

link|improve this answer
feedback

there is one more way at /root/install.log will have all rpm install in redhat and centos /fedora server

link|improve this answer
feedback

For Red Hat-derived distributions: rpm -q httpd php mysql What distro are you running?

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.