0

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.

6 Answers 6

5

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.

3
  • 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, 2010 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, 2010 at 7:10
  • On RHEL, the Apache package is called httpd. The OUtput of rpm -qa should mention php.
    – wzzrd
    Sep 4, 2010 at 10:49
2

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.

1

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

0

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

0

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

0

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .