Installation of 11g R2 database 64 bit on Linux
1. Unpack Files
Unzip the files.
# 11.2.0.1
unzip linux.x64_11gR2_database_1of2.zip
unzip linux.x64_11gR2_database_2of2.zip
2. Prerequisites:
a) Setting the host file
The "/etc/hosts" file must contain a fully qualified name for the server.
127.0.0.1 localhost.localdomain localhost
192.168.56.101 racinfaserver
This step is very very important for all the following installations in Linux.
b) Many Linux packages are required to be installed for DB installations
“I
have done the installation on a VM so in order to do the automatic
package installation, access of internet is required. Regarding VM I
have to make the network settings of VM as NAT then only internet was
available inside my VM.”
Follow the below steps to do an automatic installation of the Linux packages after logging in as root:
1. Download and copy the appropriate yum configuration file in place, by running the following commands as root:
Oracle Linux 4, Update 6 or Newer
# cd /etc/yum.repos.d
# mv Oracle-Base.repo Oracle-Base.repo.disabled
# wget http://public-yum.oracle.com/public-yum-el4.repo
Oracle Linux 5
# cd /etc/yum.repos.d
# wget http://public-yum.oracle.com/public-yum-el5.repo
Oracle Linux 6
# cd /etc/yum.repos.d
# wget http://public-yum.oracle.com/public-yum-ol6.repo
Oracle VM 2
# cd /etc/yum.repos.d
# wget
http://public-yum.oracle.com/public-yum-ovm2.repo
2.
To validate the same run the following command:
# yum install oracle-validated
All necessary prerequisites will be performed automatically.
It is probably worth doing a full update as well, but this is not strictly speaking necessary.
# yum update
c) Creating Required Operating System Groups and Users
The Oracle Inventory group (typically, oinstall)
■ The OSDBA group (dba)
■ The Oracle software owner (typically, oracle)
To determine whether these groups and users already exist, and if necessary, to create
them, follow these steps:
1. To determine whether the oinstall group exists, enter the following command:
# more /etc/oraInst.loc
If the output of this command shows the oinstall group name, then the group
already exists.
If the oraInst.loc file exists, then the output from this command is similar to
the following:
inventory_loc=/u01/app/oraInventory
inst_group=oinstall
The inst_group parameter shows the name of the Oracle Inventory group,
Oinstall.
2. To determine whether the dba group exists, enter the following command:
# grep dba /etc/group
If the output from this commands shows the dba group name, then the group
already exists.
3. If necessary, enter the following commands to create the oinstall and dba
groups:
# /usr/sbin/groupadd oinstall
# /usr/sbin/groupadd dba
4. To determine whether the oracle user exists and belongs to the correct groups,
enter the following command:
# id oracle
If
the oracle user exists, then this command displays information about
the groups to which the user belongs. The output should be similar to
the following,indicating that oinstall is the primary group and dba is
a secondary group:
5. If necessary, complete one of the following actions:
■ If the oracle user exists, but its primary group is not oinstall or it is not a
member of the dba group, then enter the following command:
# /usr/sbin/usermod -g oinstall -G dba oracle
■ If the oracle user does not exist, enter the following command to create it:
# /usr/sbin/useradd -g oinstall -G dba oracle
This command creates the oracle user and specifies oinstall as the
primary group and dba as the secondary group.
6. Enter the following command to set the password of the oracle user:
# passwd oracle
d) Creating Required Directories in which the Oracle software will be installed.
mkdir -p /u01/a pp/oracle/product/11.2.0/db_1
chown -R oracle:oinstall /u01
chmod -R 775 /u01
e) Configuring the oracle User’s Environment
1) login into root user( su -l root)
2) execute this command : xhost +SI:localuser:oracle
3) login to the oracle user
NB: Sometimes it will not work then a machine reboot can make it work ;)
f) Setting up the environment variables
Login
as the oracle user and add the following lines at the end of the
".bash_profile" file, remembering to adjust them for your specific
installation.
How to edit the .bash_profile in Linux:
Type the following commands:
cd click enter
vi .bash_profile
it will be in insert mode then; now make the changes and once the changes are done
click esc button
click Shift :wq!
after that type the below command too:
source ~/.bash_profile
then only the changes will get reflected
# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_HOSTNAME=ol5-112.localdomain; export ORACLE_HOSTNAME
ORACLE_UNQNAME=DB11G; export ORACLE_UNQNAME
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOME
ORACLE_SID=DB11G; export ORACLE_SID
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
“SETTING UP ENVIRONMENT VARIABLES IS VERY IMPORTANT FOR ANY LINUX INSTALLATIONS”.
3. DB Installation:
Step 1: Launch Installer
Login as oracle user, change directory to 11GDB Software and launch runInstaller
Step 2: Configure Security Updates
Uncheck “I wish to receive security updates”, click Next to continue. Click on “Yes” on the popup.
Step 3: Download software updates
Check “Skip software updates”. Click Next to continue.
Step 4: Select Install option
Select “Create and Configure a database”. Click next to continue.
Step 5: System class
Select “Server Class”. Click next to continue.
Step 6: Grid installation option
Select “single instance database installation”. Click next to continue.
Step 7: Install Type
Select “Advanced Install”. Click next to continue.
Step 8: Product Language
Select English on selected Language panel. Click next to continue.
Step 9 Database Edition
Select “Enterprise Edition”. Click next to continue.
Step 10: Installation Location
Specify Oracle Base and Software Location. Click Next to continue.
Step 11: Configuration Type
Select “Data Warehousing” Type. Click Next to continue.
Step 12: Database Identifiers
Provide Global Database Name. Click Next to continue.
Step 13: Configuration Options
Allocate Memory according to Requirement, Provide Database Character Set as “AL32UTF8”. Click Next to continue.
Step 14: Management Options
Click Next to continue.
Step 15: Database Storage Options
Provide Location to Store Database files. Click Next to continue.
Step 16: Recovery Options
Select “Do not Enable automated backups”. Click Next to continue.
Step 17: Schema passwords
Use Different password for pre-loaded schemas or Same passwords across all schemas. Click Next to continue.
Step 18: Privileged group
Make sure Database Administrator Group is “DBA”. Click next to continue.
Step 19: Prerequisite Checks
Make sure all Prerequisite checks are fine. Click next to continue.
Step 20: Summary
Click on install to start the installation.
Step 21: Progress
Creation of Datawarehouse purpose Database is in progress.
Step 22: Database Creation Complete.
Upon Successfull creation of general-purpose database. Click on Exit.
Step 23: root.sh script
During the course of Installation, Installer will prompt to run root.sh script. Click ok.
Step 24: Installation completed
Installation completed.
4. DB service and listener startup-stop and status check:
Run the following commands to start the instance:
$ sqlplus
SQL> CONNECT SYS as SYSDBA
Enter password: sys_password
SQL> STARTUP
After the instance starts, you can exit from SQL*Plus.
Run the following commands to shut down the instance:
$ sqlplus
SQL> CONNECT SYS as SYSDBA
Enter password: sys_password
SQL> SHUTDOWN NORMAL
After the instance shuts down, you can quit SQL*Plus.
Listener service must be up otherwise informatica will not able to communicate to DB.
Display Oracle Listener Status
If the Oracle listener is not running, you’ll get the following message.
$ lsnrctl status
LSNRCTL for Linux: Version 11.1.0.6.0 - Production on 04-APR-2009 16:27:39
Copyright (c) 1991, 2007, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.2)(PORT=1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 2: No such file or directory
If the Oracle listener is running, you’ll get the following message.
$ lsnrctl status
LSNRCTL for Linux: Version 11.1.0.6.0 - Production on 04-APR-2009 16:27:02
Copyright (c) 1991, 2007, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.2)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.1.0.6.0 - Production
Start Date 29-APR-2009 18:43:13
Uptime 6 days 21 hr. 43 min. 49 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.1.0/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/devdb/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.2)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC)))
Services Summary...
Service "devdb" has 1 instance(s).
Instance "devdb", status UNKNOWN, has 1 handler(s) for this service...
Service "devdb.thegeekstuff.com" has 1 instance(s).
Instance "devdb", status READY, has 1 handler(s) for this service...
Service "devdbXDB.thegeekstuff.com" has 1 instance(s).
Instance "devdb", status READY, has 1 handler(s) for this service...
Service "devdb_XPT.thegeekstuff.com" has 1 instance(s).
Instance "devdb", status READY, has 1 handler(s) for this service...
The command completed successfully
Start Oracle Listener
If
the Oracle listener is not running, start the listener as shown below.
This will start all the listeners. If you want to start a specific
listener, specify the listener name next to start. i.e lsnrctl start
[listener-name]
$ lsnrctl start
LSNRCTL for Linux: Version 11.1.0.6.0 - Production on 04-APR-2009 16:27:42
Copyright (c) 1991, 2007, Oracle. All rights reserved.
Starting /u01/app/oracle/product/11.1.0/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 11.1.0.6.0 - Production
System parameter file is /u01/app/oracle/product/11.1.0/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/devdb/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.2)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.2)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.1.0.6.0 - Production
Start Date 04-APR-2009 16:27:42
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.1.0/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/devdb/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.2)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC)))
Services Summary...
Service "devdb" has 1 instance(s).
Instance "devdb", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
Restart Oracle Listener
To
restart the listener use lsnrctl reload as shown below instead of
lsnrctl stop and lsnrctl start. realod will read the listener.ora file
for new setting without stop and start of the Oracle listener.
lsnrctl reload
LSNRCTL for Linux: Version 11.1.0.6.0 - Production on 04-APR-2009 17:03:31
Copyright (c) 1991, 2007, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.2)(PORT=1521)))
The command completed successfully
5. Issues and Challenges Faced:
• bash.profile file was not edited to contain all env entries(which is very importnant)
• Oracle
home value was not set even after the script was run; when the
environment variable was echoed it was blank-resolved it by editing the
bash.profile file and performing the source command as mentioned in
the earlier section
• Path was wrong in sprofile.ora file
• LRM-00109: could not open parameter file
Symptom:
When trying to start up Oracle, the following error is encountered:
LRM-00109: could not open parameter file '...'
ORA-01078: failure in processing system parameters
Cause:
Oracle
could not open the init-ora file. Typically this is because either the
init-ora file is in a different directory to the one Oracle is looking
in, or it has a different name to what Oracle expects.
By default the init-ora file is located in the directory:
{ORACLE_HOME}/Database
and is called:
init{ORA_SID}.ora
Possibly Remedies:
· Check
the name and location of the init-ora file. Then when starting the
database specify explicity the location of the initialisation file, i.e.
Startup pfile=''
· If
the database is the 'default' database then set the location of the
init-ora file in the registry. (This possibly only applies to Oracle 7?)
This should be specified in the registry under the key '
HKEY_LOCAL_MACHINE \ Software \ Oracle
'. Add the values:ORACLE_SID = ""
PFILE_ =
• When tried to start the db service got the below issue:
ORA-01506:
missing or illegal database name
Cause: No db_name INIT.ORA aprameter was specified.
Action: The database name must be given in the db_name INIT.ORA parameter.
• Path to one of the ctl files was wrong in init.ora file which was present in one of the installation folder
To search init.ora file the following linux commands can be used:
updatedb
locate init.ora
6. How to uninstall server client of 11 g r2 server in windows:
The best video on install and uninstall on windows:
http://www.youtube.com/watch?v=nnnA2HcZl_8
No comments:
Post a Comment