Versions.sh – Shell Script to Find Installed Versions of Major Server Daemons

by damonp on February 26, 2007

in Sites,SysAdmin

I look at a lot of servers throughout the day. When taking a first look at a server it’s always helpful to know what versions of Apache, PHP and MySQL installed. I use Versions.sh to get the low down on one screen.

[root@servername root]# versions.sh
Linux <em>servername</em> 2.4.21-27.ELsmp #1 SMP Wed Dec 1 21:59:02 EST 2004 i686 i686 i386 GNU/Linux

Redhat Version:
Red Hat Enterprise Linux ES release 3 (Taroon Update 4)

Apache:
Server version: Apache/2.0.46
Server built:   Jul  8 2005 14:05:56
PHP 4.4.0 (cgi) (built: Jul 12 2005 02:09:00)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies

MySQL:
mysql  Ver 11.18 Distrib 3.23.58, for redhat-linux-gnu (i386)

Security:
OpenSSH_3.6.1p2, SSH protocols 1.5/2.0, OpenSSL 0x0090701f
OpenSSL 0.9.7a Feb 19 2003

Download versions.sh

I usually check out ifconfig too for IP information. Any other information, just add at the bottom of the script.

Popularity: 1%

Most Popular Posts

Damon Parker is a freelance sysadmin and web developer in Texas. He specializes in server setup, server security and high performance server configurations. Need help setting up a web server or getting a server back online after a crash or hack? Email Damon

{ 2 comments… read them below or add one }

J. E. Aneiros June 10, 2011 at 11:00 am

What about this small change to the script to make it more general?

cat `ls /etc/*release | head -1`

This will work with Solaris, OpenSolaris, Ubuntu, Fedora and Redhat.

Reply

damonp June 27, 2011 at 7:43 am

Good idea.

Reply

Leave a Comment

Previous post:

Next post: