Friday, February 11, 2011

How to find out CentOS's version

$ cat /etc/issue
CentOS release 5.7 (Final)
Kernel \r on an \m

$ cat /etc/centos-release
CentOS release 6.3 (Final)

$ uname -a
Linux cle-dev 2.6.18-274.18.1.el5 #1 SMP Thu Feb 9 12:45:44 EST 2012 x86_64 x86_64 x86_64 GNU/Linux

$ rpm -qa | grep ^centos

$ yum list installed |grep ^centos
centos-release.x86_64 6-3.el6.centos.9  @anaconda-CentOS-201207061011.x86_64/6.3

# Find out what package were installed with 'yum'
$ yum list installed

# e.g. mysql-server
$ yum list installed |grep ^mysql-server
mysql-server.x86_64   5.1.61-4.el6      @base

# e.g. php modules
$ yum list installed |grep ^php
php.x86_64            5.3.3-14.el6_3    @updates
php-cli.x86_64        5.3.3-14.el6_3    @updates
php-common.x86_64     5.3.3-14.el6_3    @updates
php-gd.x86_64         5.3.3-14.el6_3    @updates
php-intl.x86_64       5.3.3-14.el6_3    @updates
php-mbstring.x86_64   5.3.3-14.el6_3    @updates
php-mysql.x86_64      5.3.3-14.el6_3    @updates
php-pdo.x86_64        5.3.3-14.el6_3    @updates
php-soap.x86_64       5.3.3-14.el6_3    @updates
php-xml.x86_64        5.3.3-14.el6_3    @updates
php-xmlrpc.x86_64     5.3.3-14.el6_3    @updates