Showing posts with label oracle. Show all posts
Showing posts with label oracle. Show all posts

Making programs and commands run on user login

0 comments

This week while installing Oracle 11g on Oracle Linux Server, I needed to automatically start some programs when the user logins in.

Here is why. Oracle Linux boots, by default, into a command line terminal or console. But to use the Oracle 11g Database Control application, you'll need to start the GUI X window. The command to do that is $ startx
The other issue is, the GUI launches into a blank desktop, no applications center or start menu bar. To start any program you'll have to right click, launch the Terminal and start you program via the command line.
For me this is no issue, but the intended end user of this Oracle 11g aren't that Linux savvy. I wanted them to just start the system and the X window would start automatically once they login and the dbconsole would be started too and finally Firefox would launch and open http://localhost:1158/em automatically.

Well, it was easy to accomplish. All I did was to edit the ~/.bash_profile file. I added the following lines -
startx
emctl start dbconsole
firefox http://localhost:1158/em

And voila, that did it.

How to set system environments permanently for a user

0 comments

I finally got Oracle 11g installed on Oracle Linux Server, it was no easy task. I had to edit so many kernel or system settings files.

To run Oracle, I had to set $ORACLE_UNQNAME to orcl each time I login to the Linux. And the command to start up the dbconsole, aarghh, it was a pain to type out - /u01/app/oracle/product/11.2.0/dbhome_1/bin/emctl start dbconsole
I'm yet to forget it.

Well, I decided to fix this once and for all. And all I did was to edit the ~/.bash_profile, added the following lines -
export ORACLE_UNQNAME=orcl
export PATH=$PATH:/u01/app/oracle/product/11.2.0/dbhome_1/bin

So now I no longer need to set the ORACLE_UNQNAME=orcl anymore as it is been done for me. And the long path to emctl command has been added permanently to the system PATH. All I now do is type
emctl start dbconsole
and voila, I'm done.

 
Follow me on Twitter | About me | Terms of Service | Privacy Policy