

# strip \0 as it gets dropped with warning otherwiseī="$(_dd $(($offset + $i)) bs=1 count=1 | tr -d '\0' echo. *) fatal "File doesn't look like rpm: $pkg" To install into /opt/splunk, use the following command: tar xvzf splunkpackagename.tgz -C /opt RedHat RPM installation RPM packages are available for Red Hat, CentOS, and similar versions of Linux. You can confirm that MariaDB has been installed by using the MySQL client.

"$(printf '\216\255\350')"*) # '\x8e\xad\xe8' Installing the MariaDB RPM files installs the MySQL tools in the /usr/bin directory. If you have tried the rpm2cpio.sh script above and it didn't work, you can save the follwing script and invoke like this: rpm2cpio.sh rpmname | cpio -idmv, it workes on my CentOS 7. # Typical usage: rpm2cpio.sh rpmname | cpio -idmvĭECOMPRESSOR="`which unlzma 2>/dev/null`"Įcho "Warning: DECOMPRESSOR not found, assuming 'cat'" 1>&2 # rpm2cpio.sh - extract 'cpio' contents of RPM I've done a few updates, particularly adding some comments and using "case" instead of stacked "if" statements, and included that fix below #!/bin/sh

Simply replacing 'grep -q' with 'grep -q -i' everywhere seems to resolve the issue well. The result of the "COMPRESSION:" check is: COMPRESSION='/dev/stdin: XZ compressed data' The "DECOMPRESSION" test fails on CygWin, one of the most potentiaally useful platforms for it, due to the "grep" check for "xz" being case sensitive. * ) DECOMPRESSOR=`which lzmash 2>/dev/null` # Most versions of file don't support LZMA, therefore we assume O=`expr $o + $sigsize + \( 8 - \( $sigsize \% 8 \) \) \% 8 + 8`ĬOMPRESSION=`($EXTRACTOR |file -) 2>/dev/null`Įlif echo $COMPRESSION |grep -q bzip2 thenĮlif echo $COMPRESSION |grep -iq xz then # xz and XZ safeĮlif echo $COMPRESSION |grep -q cpio then

Reposted for posterity … and the next generation. The first step is to download the RPM file that you want to install: wget To install the package, use the yum localinstall command followed by the path to the package name: sudo yum localinstall file.rpm yum will prompt you for confirmation. That extracts the payload from a *.rpm package. For those who do not have rpm2cpio, here is the ancient rpm2cpio.sh script SYNOPSIS top QUERYING AND VERIFYING PACKAGES: rpm
