When installing oralce in Linux, you must first check whether one pair of RPM has been installed. If you check them one by one each time, it will be very troublesome, so a script is simplified.
This script takes only three steps:
1) Save the following shell script as orarpm. Sh. In this article, put the file in the home directory:
#! /Bin/bash </P> <p> If [$ #-ne 1]; then <br/> echo "Usage: $0 rpmlist "<br/> Exit 1 <br/> fi </P> <p> rpmlist = $1 <br/> errfile = ~ /Rpminst 'date + % Y % m % d % H % m % s '. err <br/> for PKG in 'cat $ rpmlist' <br/> DO <br/> rpm-Qa | grep $ PKG &>/dev/null <br/> If [$? -Ne 0]; then <br/> echo $ PKG is not installed yet, starting to install... <br/> rpm-uvh $ PKG * 2> $ errfile <br/> else <br/> echo $ PKG already installed. <br/> fi <br/> done
2) In the Oracle Installation documentation, find the RPM list to be checked and copy it to save it as a file. Here I use PKG. lst:
Binutils-2.17.50.0.6 <br/> compat-libstdc ++-33-3.2.3 <br/> elfutils-libelf-0.125 <br/> elfutils-libelf-devel-0.125 <br/> elfutils-libelf-devel-static-0.125 <br/> gcc-4.1.2 <br/> gcc-C + +-4.1.2 <br/> glibc-2.5-24 <br/> glibc-common-2.5 <br/> glibc-devel-2.5 <br/> glibc-headers-2.5 <br/> kernel-headers-2.6.18 <br/> ksh-20060214 <br/>/> libaio-0.3.106 <br/> libaio-devel-0.3.106 <br/> libgcc-4.1.2 <br/> libgomp-4.1.2 <br/> libstdc ++-4.1.2 <br/> libstdc ++-devel-4.1.2 <br/> make -3.81 <br/> sysstat-7.0.2 <br/> unixODBC-2.2.11 <br/> unixODBC-devel-2.2.11
3) switch to the RPM directory of the CD and run the following command to automatically check and install the RPM package.
If the script fails to be automatically installed, you only need to check the rpminst *. Err file in the home directory after the script is executed, and then manually install the failed package.
~ /Orarpm. Sh ~ /PKG. lst