Go Premium for a chance to win a PS4. Enter to Win

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 403
  • Last Modified:

steps after installing 11gr2 on linux

HI Guys, i just installed 11gr2 on linux, please tell me the steps to set .profile and environment
  • 4
  • 2
6 Solutions
slightwv (䄆 Netminder) Commented:
Did you run root.sh as root?

>> please tell me the steps to set .profile and environment

Environment to do what and as whom?
nirvairghumanAuthor Commented:
i have set oracle_home and oracle_sid
slightwv (䄆 Netminder) Commented:
You 'have' set or you 'need to' set?

The only other thing you need is to add $ORACLE_HOME/bin to your PATH and possible add some entries to your LD_LIBRARY_PATH but that depends on what I was asking in my original post:  

It all depends on what you are using and who will be using them.

Everything should already be set up for the 'oracle' user and you should not need to do anything.
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.


After installation make sure you ran 2 root scripts mentioned in the installation wizard.

you are running oracle on linux so you can do  something like this :

Put following in your   .bashrc

# .bashrc

# User specific aliases and functions

# Source global definitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc

. oraenv

alias sid='env | grep SID'
export PS1="\u | SID: $ORACLE_SID | \w >"

Open in new window

see . oraenv in the file.

Wheen you login oraenv will get sourced in and will ask you for a SID. You can provide the sid there (works great if you are running multiple DBs.)

Now set your  .bash_profile like this

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc

# User specific environment and startup programs


export PATH

Open in new window

Put your SID and HOme in /etc/oratab like this


Open in new window

slightwv (䄆 Netminder) Commented:
>>Wheen you login oraenv will get sourced in and will ask you for a SID.

I agree but this might be a bad thing.  This is why I was waiting for more information on who will be using these 'env' variables.

For example:  Any user such as 'oracle' that needs to run a cron cannot just run oraenv unless they first export ORACLE_SID and ORAENV_ASK=NO.  Otherwise the cron job will never run.

The question does not say anything about cron jobs.

While the cron jobs can set that in their ORAENV_ASK=NO and ORACLE_SID in the script. You can find an example in one of my earlier posts.

One can also put ORACLE_SID, ORACLE_HOME, ORACLE_BASE etc. in .bashrc but the option I have proposed is the one that I use every day. I have 50+ SIDs and I think this is the most efficient.


slightwv (䄆 Netminder) Commented:
>>I have proposed is the one that I use every day.

I'm not disputing that.  That is how I had mine set up as well.

>>The question does not say anything about cron jobs.

Agreed but it also doesn't.  It asks how to set the env after install.  We do not know what users, apps, processes, ???  needs to use them or from where.

Until we know that, we really cannot answer the question.  Anything we post until we know that is a guess.

That is why my first post included "Environment to do what and as whom?".

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now