Posts Tagged ‘linux’

Getting Mysql version on Linux OS

Friday, October 19th, 2007

Question: How can I determine the linux version installed in a Linux OS

Answer: To determine your Mysql version, we will be using the mysql command with the -V (capitalize) option.

[darwin@myserver]$ mysql -V
mysql  Ver 14.7 Distrib 4.1.20, for pc-linux-gnu (i686) using  EditLine wrapper

Your mysql version here is 4.1.2.0.

Getting Apache version installed in your Linux OS

Friday, October 19th, 2007

Question: How can you determine the version of your Apache Web Server on your Linux machine?

Answer: First determine the installation directory of your apache server. You can find this by issuing this command, but basically you can do better that this one in finding the installation directory of your apache.

[darwin@myserver]$ whereis apache
apache: /usr/local/apache

Once you know where the directory is we will try to execute the httpd command with the -v option

[darwin@myserver]$ /usr/local/apache/bin/httpd -v
Server version: Apache/1.3.36 (Unix)
Server built:   Jul 18 2006 14:34:00

And there you go your Apache version is 1.3.36.

Thanks again Mark.

How to get installed linux OS version

Friday, October 19th, 2007

Wondering how to get the Linux OS version installed on a server or PC? Here are some commands our system administrator taught me and wanted to share it with you.

Using dmesg command

[conai@myserver]$ dmesg | head -1
Linux version 2.6.15-1.2054_FC5smp (bhcompile@hs20-bc1-3.build.redhat.com)
(gcc version 4.1.0 20060304 (Red Hat 4.1.0-3)) #1 SMP Tue Mar 14 16:05:46 EST 2006

Using uname command

[conai@myserver]$ uname -a
 Linux dugong.mbsautomotive.com 2.6.15-1.2054_FC5smp #1 SMP Tue Mar 14 16:05:46 EST
2006 i686 i686 i386 GNU/Linux

Opening the /etc/issue file

[conai@myserver]$ cat /etc/issue
Fedora Core release 5 (Bordeaux)
Kernel \r on an \m

Opening the /proc/version file

[conai@myserver]$ cat /proc/version
 Linux version 2.6.15-1.2054_FC5smp (bhcompile@hs20-bc1-3.build.redhat.com)
(gcc version 4.1.0 20060304 (Red Hat 4.1.0-3)) #1 SMP Tue Mar 14 16:05:46 EST 2006

According to Rai and Mark, there are still other ways to do this but I think these are enough to get the information I need. Pick whatever suites your needs. Thank Rai and Mark for sharing this information with me.