I have PHP installed on a server and I'd like to know which RPM it was build off of (webtatic or remi). How do I find this out.

Also, how would I find out if and when that changed?


You can use the rpm command to find out information about a particular package:

$ rpm -qi php
Name        : php                          Relocations: (not relocatable)
Version     : 5.3.8                             Vendor: Fedora Project
Release     : 3.fc14                        Build Date: Wed 28 Sep 2011 01:40:37 PM EDT
Install Date: Wed 04 Jul 2012 12:42:03 PM EDT      Build Host: x86-12.phx2.fedoraproject.org
Group       : Development/Languages         Source RPM: php-5.3.8-3.fc14.src.rpm
Size        : 3773261                          License: PHP
Signature   : RSA/SHA256, Wed 28 Sep 2011 10:20:06 AM EDT, Key ID 421caddb97a1071f
Packager    : Fedora Project
URL         : http://www.php.net/
Summary     : PHP scripting language for creating dynamic web sites
Description :
PHP is an HTML-embedded scripting language. PHP attempts to make it
easy for developers to write dynamically generated web pages. PHP also
offers built-in database integration for several commercial and
non-commercial database management systems, so writing a
database-enabled webpage with PHP is fairly simple. The most common
use of PHP coding is probably as a replacement for CGI scripts.

The php package contains the module which adds support for the PHP
language to Apache HTTP Server.

The line you're interested in is Source RPM. The build date is also in this information.

Alternative executable

If you happen not to know the name of the package that a given executable is provided by, you can back into this information too:

$ type -a php
php is /usr/bin/php

$ rpm -qf /usr/bin/php

Like this:

[root@jimmy ~]# which php
[root@jimmy ~]# rpm -qf /usr/bin/php
[root@jimmy ~]# 

Then if you want to know more about the package, use "rpm -qi php" like slm said.


You can always check rpm installation history with timestamp:

#rpm -qa --last

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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