This method is also useful When copying an oracle home to a new server which doesn't have an oracle inventory but manual relinking of libraries is needed afterwards.
1. tar the source binaries
tar --exclude=excludeList -cvzf 10g2.tgz /opt/app/oracle/product/10.2.0/entExclude log files, EM console related files in OC4J
2. Extract the tar file at the destination.
3. Set Oracle Base and Oracle Home variables, it is not necessary, if Oracle Base is not set and no oraInst.loc file exists oraInventory will be created in /home/oracle
export ORACLE_BASE=/opt/app/oracleAs seen from above output runInstaller doesn't creates the oraInventory inside the oracle base directorywhich is the default location when installing 10g. (Oracle binaries used here have been patched to 10.2.0.5).
export ORACLE_HOME=`pwd`
export ORACLE_HOME=/opt/app/oracle/product/10.2.0/ent
cd $ORACLE_HOME/oui/bin/
./runInstaller -silent -attachHome ORACLE_HOME=$ORACLE_HOME ORACLE_HOME_NAME="10ghome"
Starting Oracle Universal Installer...
No pre-requisite checks found in oraparam.ini, no system pre-requisite checks will be executed.
OiiolLogger.addFileHandler:Error while adding file handler - /opt/app/oraInventory/logs/AttachHome2010-09-08_02-40-58PM.log
java.io.FileNotFoundException: /opt/app/oraInventory/logs/AttachHome2010-09-08_02-40-58PM.log (No such file or directory)
'AttachHome' failed.
4. To fix this problem create the oraInventory manually
mkdir -p /opt/app/oraInventory/5. Run the command again
chown oracle:oinstall oraInventory
chmod 770 oraInventory
./runInstaller -silent -attachHome ORACLE_HOME=$ORACLE_HOME ORACLE_HOME_NAME="10ghome"This would have created the necessary files inside the oraInventory, added the oracle home to inventory and oraInst.loc file in /etc.
Starting Oracle Universal Installer...
No pre-requisite checks found in oraparam.ini, no system pre-requisite checks will be executed.
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /opt/app/oraInventory
Please execute the '/opt/app/oraInventory/orainstRoot.sh' script at the end of the session.
'AttachHome' was successful.
/opt/app/oraInventory/orainstRoot.sh
Changing permissions of /opt/app/oraInventory to 770.
Changing groupname of /opt/app/oraInventory to oinstall.
The execution of the script is complete
5. Use relink -all to relink the oracle binaries.