20080611 infraenv for oracle infrastructure - plembo/onemoretech GitHub Wiki

title: infra.env for Oracle Infrastructure link: https://onemoretech.wordpress.com/2008/06/11/infraenv-for-oracle-infrastructure/ author: lembobro description: post_id: 505 created: 2008/06/11 18:20:42 created_gmt: 2008/06/11 18:20:42 comment_status: open post_name: infraenv-for-oracle-infrastructure status: publish post_type: post

infra.env for Oracle Infrastructure

For those who haven’t noticed, the primary purpose of this blog is to serve as a web accessible journal for my many projects. More than occasionally I’ll post stuff here that is of no interest to anyone but myself.

Here is something I just whipped up as part of a rework of how I install Oracle Identity Management.

In the past I’ve created a unique system user for each component (orainfra, oraportal, etc.) with a primary group of “dba”, and installed that part of the stack using this system account. As a result of some discussions with colleagues, I’ve now come to agree with their position that using a single “oracle” system user is better. In this approach, separate .env scripts are used to set the environment as needed.

Another change I’m making now is to make /u01/app/oracle the home directory for this new user:

useradd -g dba -c "Oracle User" -d /u01/app/oracle oracle

Following is a simple shell script that sets the environment for a common “oracle” system user. Additional scripts could be developed for different pieces of the IDM stack, as well as other OAS components like Portal. Invoke it by “sourcing” the script:

. ./infra.env

Here’s the code:

`

#!/bin/bash
unset PATH OH ORACLE_HOME ORACLE_SID JAVA_HOME
export PATH=/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:$HOME/bin
export OH=/u01/app/oracle/product/infra
export ORACLE_HOME=$OH
export ORACLE_SID=infrat
export JAVA_HOME=$OH/jdk
export PATH=$OH/bin:$OH/opmn/bin:$OH/dcm/bin:$OH/ldap/bin:
$JAVA_HOME/bin:$PATH

`

Copyright 2004-2019 Phil Lembo