Skip to content
David Kittell
David Kittell

Application & System: Development / Integration / Orchestration

  • Services
    • Application Development
    • Online Application Integration
  • Code
  • Online Tools
  • Tech Support
David Kittell

Application & System: Development / Integration / Orchestration

UNIX – Extract RedHat/CentOS/Fedora RPM File

Posted on April 21, 2016April 21, 2016 By David Kittell

I love to find RPM files that someone has compiled so that I don’t have to do the manual work but when I find one at a questionable location or one I’m simply not familiar with it’s nice to know what is in it.

Recently I did a search on RPMFind.net for Redis (https://www.rpmfind.net/linux/rpm2html/search.php?query=redis)

I found what I was looking for but it it has an IP instead of a domain.

Doing a quick lookup on the IP I didn’t get much more than that it’s a French IP address block.

I found a nice article on nixCraft (http://www.cyberciti.biz/tips/how-to-extract-an-rpm-package-without-installing-it.html) that described how to extract the RPM.

cd ~/
wget -O RedHat_Redis.rpm ftp://195.220.108.108/linux/remi/enterprise/7/remi/x86_64/redis-3.0.7-1.el7.remi.x86_64.rpm

rpm2cpio RedHat_Redis.rpm | cpio -idmv

The command will output something like this

$ rpm2cpio RedHat_Redis.rpm | cpio -idmv
./etc/logrotate.d/redis
./etc/redis-sentinel.conf
./etc/redis.conf
./etc/systemd/system/redis-sentinel.service.d
./etc/systemd/system/redis-sentinel.service.d/limit.conf
./etc/systemd/system/redis.service.d
./etc/systemd/system/redis.service.d/limit.conf
./usr/bin/redis-benchmark
./usr/bin/redis-check-aof
./usr/bin/redis-check-dump
./usr/bin/redis-cli
./usr/bin/redis-sentinel
./usr/bin/redis-server
./usr/bin/redis-shutdown
./usr/lib/systemd/system/redis-sentinel.service
./usr/lib/systemd/system/redis.service
./usr/lib/tmpfiles.d/redis.conf
./usr/share/doc/redis-3.0.7
./usr/share/doc/redis-3.0.7/00-RELEASENOTES
./usr/share/doc/redis-3.0.7/BUGS
./usr/share/doc/redis-3.0.7/CONTRIBUTING
./usr/share/doc/redis-3.0.7/MANIFESTO
./usr/share/doc/redis-3.0.7/README
./usr/share/licenses/redis-3.0.7
./usr/share/licenses/redis-3.0.7/COPYING
./var/lib/redis
./var/log/redis
./var/run/redis
2366 blocks
$

Now I can go and nano or vi each file to to compare to to the files that I have from building from source.

References: http://www.cyberciti.biz/tips/how-to-extract-an-rpm-package-without-installing-it.html

All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what it is doing not just what it appears it is doing. I accept no responsibility for any damage you may do with this code.

Related

CentOS Code Fedora Red Hat UNIX UNIX Shell Scripts CentOSExtractFedoraRed HatRedHatRPMRPM Extract

Post navigation

Previous post
Next post

Related Posts

Format Zip Code Properly

Posted on November 11, 2013October 26, 2015

Sometimes a zip code is presented in a database with all nine numbers in the same column that has only five numbers. This query below will assist in formatting the numbers properly. SELECT CASE WHEN len(zip) = 10 AND substring(zip, 6, 1) = ‘-‘ THEN zip WHEN len(zip) = 5…

Read More

PowerShell – Install Azure Modules

Posted on March 30, 2016October 16, 2017

In order to work in PowerShell with Azure you need to have the modules setup properly, the script below will help get you ready to go then test it. # Azure PowerShell Get-Module PowerShellGet -list | Select-Object Name,Version,Path # Install the Azure Resource Manager modules from the PowerShell Gallery Install-Module…

Read More

PowerShell – Get Computer Information

Posted on November 6, 2015November 10, 2015

This script is pieced together from various posts, I only take credit for combining the resources. There is more than initially is seen to this script, based on the code below it will write a text file on c:\ and does need admin privileges in order to run. Right around…

Read More

Code

Top Posts & Pages

  • PowerShell - Rename Pictures to Image Taken
  • PowerShell - IIS Remove Site
  • Front Page
  • SQLite - Auto-Increment / Auto Generate GUID
  • PowerShell - FTP Upload Directory With Sub-Directories

Recent Posts

  • Javascript – Digital Clock with Style
  • BASH – Web Ping Log
  • BASH – Picture / Video File Name Manipulation
  • Mac OSX Terminal – Create SSH Key
  • Bash – Rename Picture

Top Posts

  • PowerShell - Rename Pictures to Image Taken
  • PowerShell - IIS Remove Site
  • SQLite - Auto-Increment / Auto Generate GUID
  • PowerShell - FTP Upload Directory With Sub-Directories
  • Raspberry Pi - Remove Default Apps
  • PowerShell - Change Windows CD/DVD Drive Letter
©2025 David Kittell | WordPress Theme by SuperbThemes