OracleLinux 5.6 Ebusiness pre-req check bash script

This bash script will check required OEL5/RHEL5 x86_64 packages for Oracle E-Business release 12.
This will also generate "missing.sh" that you can run to automatically install missing packages.

 

#!/bin/bash

el5_x64_required_packages=”
openmotif21.i386
xorg-x11-libs-compat.i386
gcc.x86_64
gcc-c++.x86_64
glibc.i686
glibc.x86_64
glibc-common.x86_64
glibc-devel.i386
glibc-devel.x86_64
libgcc.i386
libgcc.x86_64
libstdc++-devel.i386
libstdc++-devel.x86_64
libstdc++.i386
libstdc++.x86_64
make.x86_64
gdbm.i386
gdbm.x86_64
libXp.i386
libXp.x86_64
libaio.i386
libaio.x86_64
libgomp.x86_64
sysstat.x86_64
util-linux.x86_64
compat-libstdc++-296.i386
compat-libstdc++-33.i386
compat-libstdc++-33.x86_64
elfutils-libelf-devel.x86_64
elfutils-libelf-devel-static.x86_64
libaio-devel.x86_64
unixODBC.i386
unixODBC-devel.i386
unixODBC.x86_64
unixODBC-devel.x86_64
kernel-uek-headers.x86_64

function verify()
{
echo “” > missing.sh
for i in $1; do
rpm -qa –queryformat ‘[%{NAME}.%{ARCH} \n]’ |grep -w $i
RETVAL=$?
[ $RETVAL = 0 ] && echo “OK: $i is installed!”
[ $RETVAL != 0 ] && echo “Error: $i is not installed!” && echo “yum install $i”>> missing.sh
done
}

# check packages listed in $required_packages
verify “$el5_x64_required_packages” “\$el5_x64_required_packages”

 

 

Advertisements

About this entry