Sunday, June 29, 2008

Oracle EE Installation Part I

Man, compared to previous try to install Oracle XE, Oracle EE (Enterprise Edition) is MUCH MUCH more difficult to configure and to install. Due to the installation is perform from a Windows machine to a Linux server, "ssh -X" command cannot be used, hence, have to adopt manual installation. It took me 3 days to test and find out what minimum steps are needed, and took me another 3 days to install it and create 2 new databases. Most of the time is resource digging on the configuration part and I have forgotten how many installation guides I have gone through. It is just too much information around.

Let me share how it is installed.

Basically to install Oracle EE involve 3 sections:
1) Pre-installation
2) Installation
3) Post-installation

Today, I'm going to share the first section, Pre-Installation.

Before I share the steps, this installation is performed on a Suse 9 Linux platform, with Oracle Database 10g Release 2 (10.2.0.1.0) for Linux x86 version. You can download the installer from here.

Now, again, due to I can't use 'ssh -X' command on a Windows machine, I'll have to go for the Silent Mode installation. (Now I know why to install Oracle through a GUI app is much much recommended!! Silent Mode installation is no fun at all, be warned!) After you've downloaded the installer, unzip it and you should be able to see the Oracle Universal Installer named 'runInstaller' and you'll be touching the 'response' folder alot as well.

This is what you need to prepare the environment for the pre-installation:
1) Check hardware requirement. ie. At least have 1024MB of physical RAM, swapspace, etc. Best to reference the official installation guide on this. You can get the installation guide from here.

2) Check software requirement. For example packages needed prior to install Oracle. For Suse 9, these are needed:
binutils-2.15.90.0.1.1-32.5
gcc-3.3.3-43.24
gcc-c++-3.3.3-43.24
glibc-2.3.3-98.28
gnome-libs-1.4.1.7-671.1
libstdc++-3.3.3-43.24
libstdc++-devel-3.3.3-43.24
make-3.80-184.1
pdksh-5.2.14-780.1
sysstat-5.0.1-35.1
xscreensaver-4.16-2.6

3) Creating Required Operating System Groups and Users (skip this step if already created user and groups)
a) Create user 'oracle'
b) Create group 'dba', 'oper', and 'oinstall'
c) Make 'oracle' user has primary group of 'oinstall' and secondary group of 'dba' and 'oper'

You should be able to do this with the following command:
$ useradd -goinstall -Gdba,oper -pxxxx -m oracle
-g flag is to set primary group
-G flag is to set secondary group
-p flag is to set password
-m flag is to create home directory for the new user

4) Configuring Kernel Parameters
This are the kernel settings needed in Suse 9 platform:
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 1048576
net.core.rmem_max = 1048576
net.core.wmem_default = 262144
net.core.wmem_max = 262144

5) Software location
Oracle RDBMS and other products are installed into /u01 and this directory is typically reserved for software only (i.e. no data/control/redolog/etc. files are to be created/put in this directory or its subdirectories). If you have only one disk, you can put the datafiles into /u01/oradata.
The typical structure of /u01 is
/u01/app/oracle - Base ($ORACLE_BASE)
/u01/app/oracle/oraInventory - Oracle Inventory
/u01/app/oracle/product - Oracle Software
/u01/app/oracle/product/10.2.0/db_1 - Oracle10g Home ($ORACLE_HOME)
/u01/app/oracle/admin - Administrative
/u01/app/oracle/admin/TAR - Admin Support Logs
/u01/app/oracle/admin/sid - Admin Subtree for a SID
/u01/app/oracle/doc - Online Docs

The Base is the base of all Oracle software installation (not just database: development and administartion tools, application server, etc. is also installed here). The ORACLE_BASE environment variable's value must be the absolute path of this location; typically /u01/app/oracle. You should create it before installation.

The above is copied from an installation guide (sorry, don't know which one was it, too many guides!!). For me, I created (with user 'oracle'):
/u01/app/oracle
/u01/app/oracle/oradata
/u01/app/oracle/oraInventory

and set the following environment variables in oracle user's profile:

export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export LD_LIBRARY_PATH=/u01/app/oracle/product/10.2.0/db_1/lib
export PATH=$PATH:$ORACLE_HOME/bin

6) Create oraInst.loc file

If you plan to install Oracle products using Oracle Universal Installer in silent or suppressed mode, you must manually create the oraInst.loc file if it does not already exist. This file specifies the location of the Oracle Inventory directory where Oracle Universal Installer creates the inventory of Oracle products installed on the system.

Note:
If Oracle software has been installed previously on the system, the oraInst.loc file might already exist. If the file does exist, you do not need to create a file.

To create the oraInst.loc file, follow these steps:

1. Switch user to root:
$ su - root

2. Change directory as follows:
# cd /etc

3. Use a text editor to create the oraInst.loc file, containing the following lines:
inventory_loc=/u01/app/oracle/oraInventory
inst_group=oinstall

4. Enter the following commands to set the appropriate owner, group, and permissions on the oraInst.loc file:
# chown oracle:oinstall oraInst.loc
# chmod 664 oraInst.loc

7) Create response file
Go to the installer folder search for the 'response' directory, locate a file named 'enterprise.rsp' and edit it. (I suggest to backup a copy first before you edit it)

Unfortunately I'm not familiar with all the settings inside, below is what I find it workable towards the installation (stuck here for quite awhile and make lot of mistakes with multiple combinations configuration setup!) I'll only share a few errors I made or needed attention:

1. Best to comment out whatever you think is not necessary for the installation
2. Must enclose all string value with quotes - ""
3. Put a complete path to 'FROM_LOCATION' field for the products.xml location
4. Take note that SYSMAN and DBSNMP password do not allow to be the same as the username
5. Due to many combination setup inside, I choose the most easiest one, which is:

a) INSTALL_TYPE = "EE"
Installation type of the component

The following choices are available. The value should contain only one of these choices.
EE : Enterprise Edition
SE : Standard Edition
Custom : Custom

b) n_dbType = 1
Determines the type of database to create

This entry should be specified as a number. The valid values that you can use:
1 - General Purpose Starter Database
2 - Transaction Processing Starter Database
3 - Data Warehouse Starter Database
4 - Advanced Configuration

c) n_configurationOption = 1
Determines the type of configuration to perform for the session

This entry should be specified as an number. The valid values that you can use:
1 - Create a Database
2 - Configure an ASM instance
3 - Install Software Only

d) n_performUpgrade = 0
Determines whether to perform an upgrade during the installation or not

If n_performUpgrade=1, then an upgrade will be performed at the end of the installation.
If n_performUpgrade=0, then an upgrade will not be performed

e) n_dbStorageType = 1
Determines the type of storage to use for the the database

This entry should be specified as an number. The valid values that you can use:
1 - Place the data files on a file system
2 - Use Automatic Storage Management (ASM)
3 - Place the datafiles on raw partitions

f) b_enableAutoBackup = false
Determines whether to enable automated backups or not

Pre-requsites for setting this variable:
n_configurationOption=1
n_performUpgrade=0
n_dbType = 1, 2, or 3

g) b_useSamePassword = false
Determines whether the same password is set for each database schema or whether different passwords should be specified.

If b_useSamePassword=true, then you must specify the password that will be used for all accounts using:
- s_superAdminSamePasswd
- s_superAdminSamePasswdAgain

If b_useSamePassword=false, then you must specify the passwords the will be used for each account using:
- sl_superAdminPasswds
- sl_superAdminPasswdsAgain

Please note that this is just a small amount of things that I share it here, in the response file, there're lots more to look into.

After edit this file, you'll need to edit the dbca.rsp file as well. (If you want to create a new DB after the Oracle installation) In dbca.rsp file, is quite straight forward. You only need to look at the 'createDatabase' section and fill in the values accordingly. It is similar to other response file structure where have bunch of key=value pairs.

After all these, you should be ready for the second installation section, which is the real installation part. Will post it as Part II in the blog soon.

Happy installing!

No comments: