I assume you are using a Linux client (CentOS, Ubuntu, ...) with a desktop environment installed (Gnome, KDE, ...).
The steps are straightforward and I gonna choose a simple deployment configuration.
- Login on the server with oracle user with SSH X11 Forwarding:
- You already had the $ORACLE_HOME/bin on the PATH environment variable (see ~/.bash_profile here) so you can issue:
- An X11 windows should be launched on your Linux desktop, on the Operations panel choose "Create a database":
- Select "General Purpose or transaction Processing" on the Database Templates panel:
- On Database Identification Panel put a Global Database Name "demo.home.dev" and Oracle System Identifier (SID) "demo". NOTE: on this example, I used "demo.home.dev" as the global database name and "demo" for the SID, but I recommend to let it as simple as possible and choose "demo" for both:
- On Management Options panel check "Configure Enterprise Manager" and "Configure Database Control for local management"
- On Database Credentials panel I choose "Use the Same Administrative Password for All Accounts" but you can make a different choice and set each password individually:
- On the Storage Options panel I choose "File System":
- I let the Database File Locations with the defaults:
- Also the default settings on Recovery Configuration:
- On database content I didn't touch anything:
- You can tweak the database Initialization Parameters according to your system configuration and usage scenario:
- On Security Settings panel I recommend to use the enhanced 11g default security as well:
- I also enabled the Automatic Maintenance Tasks at certain schedule:
- I used defaults Database Storage options:
- On Creation Options panel don't forget to check the Create Database and optionally check Save as Database Template if you want to reuse this settings further:
- You should be able to see an install progress like this:
- An finally a summary screen like this: Once finished you should had a fresh empty database.
- Finnally add the ORACLE_SID environment variable to oracle's ~/.bash_profile. Login to the server as oracle user and edit:
- DON'T FORGET to set the recently created database in autostart mode at /etc/oratab. Edit with oracle user:
- One final thing to do is to test the 3 main components installed: listener, database and enterprise manager. Login as oracle user and issue:
- To verify if you can connect to the database, on the server issue the following command and enter the password supplied on the Database Credentials panel:
- To check if the listener, database and enterprise manager are running, open a browser at the URL: https://SERVERNAME:1158/em/console/aboutApplication. NOTE: Remember to open this port on iptables if you want remote database access, otherwise you won't be able to use it.
$ ssh -Y oracle@SERVER
$ dbca
then append:$ nano ~/.bash_profile
at the end the ~/.bash_profile archive should look like:export ORACLE_SID=demo
# .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programs PATH=$PATH:$HOME/bin export PATH umask 022 export TMPDIR=$TMP export ORACLE_BASE=/opt/app/oracle export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1 export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib export PATH=$ORACLE_HOME/bin:$PATH export ORACLE_SID=demo export ORACLE_HOME_LISTNER=LISTENER
and it should look like. Notice the red Y:$ nano /etc/oratab
# This file is used by ORACLE utilities. It is created by root.sh # and updated by the Database Configuration Assistant when creating # a database. # A colon, ':', is used as the field terminator. A new line terminates # the entry. Lines beginning with a pound sign, '#', are comments. # # Entries are of the form: # $ORACLE_SID:$ORACLE_HOME:: # # The first and second fields are the system identifier and home # directory of the database respectively. The third filed indicates # to the dbstart utility that the database should , "Y", or should not, # "N", be brought up at system boot time. # # Multiple entries with the same $ORACLE_SID are not allowed. # # fresh:/opt/app/oracle/product/11.2.0/db_1:Y
$ lsnrctl start
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 08-FEB-2012 16:44:03
...
The command completed successfully
then run. (NOTE: you must have the autostart mode for the database. See previous step):
and finally the Enterprise Manager:$ dbstart $ORACLE_HOME Processing Database instance "fresh": log file /opt/app/oracle/product/11.2.0/db_1/startup.log ...
$ emctl start dbconsole Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0 Copyright (c) 1996, 2009 Oracle Corporation. All rights reserved. https://SERVERNAME:1158/em/console/aboutApplication Starting Oracle Enterprise Manager 11g Database Control ......... started. ...
then issue the following query:$ sqlplus sys@demo AS SYSDBA SQL*Plus: Release 11.2.0.1.0 Production on Mon Feb 6 17:36:28 2012 Copyright (c) 1982, 2009, Oracle. All rights reserved. Enter password: Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL>
SQL> select * from dual; D - X
Perfect!!!
ReplyDeleteThanks for this little 'How to' of configuration of Oracle DB 11
hi ed's
ReplyDeleteyour post is good ..
by the way do you have a way how to create new oracle by console, not GUI
for example the oracle server is located at A city, then I remote the server by SSH, and then I create new oracle by remote. any suggest?
thank you
Hi:
DeleteEven on top of SSH you can use a GUI installer by tunneling X11. I think you should read first my post http://eduardo-lago.blogspot.com/2012/01/step-by-step-installing-oracle-ready.html, in the step 14 "Prepare the CentOS server for installing Oracle products ..." I prepare SSH X11 Forwarding to enjoy a GUI wizard on top of SSH w/o the need of a full graphical environment like Gnome/KDE on the server side. Of course you will need a X11 server on your PC, Gnome/KDE Desktop both have a built-in X11 server. On windows there many X11 server implementations.
My advise WRT to Oracle DB installer is to use the GUI on top of SSH X11 Forwarding, cuz the Wizard is very rich and its difficult to replace using only a terminal.
Enjoy it!
Hi Ed,
ReplyDeleteVery good post, straight and to the point.
Just a quick note to state that I followed these instructions to install Oracle 11.2.0.3.0 on 64-bit CentOS 6.3 and only one error popped up - namely, when trying to run 'emctl start dbconsole' I got an error that ORACLE_UNQNAME needs to be set. Googling revealed:
ReplyDeletehttp://blog.mclaughlinsoftware.com/2012/08/23/whats-oracle_unqname/
where the solution is detailed.
Cheers,
ak.
Thank you so much took the long guess work out of the equation
ReplyDeleteGreat article
This post is very simple to read and appreciate without leaving any details out. Great work! new company name suggestions
ReplyDelete