TABLE OF CONTENTS
Overview The following article is a summary of the steps required to successfully install the Oracle9i (9.2.0) RDBMS software on Redhat Linux 8.0 and create a database using RAW devices. Keep in mind the following assumptions throughout this article:
Swap space considerations
Install the Java Development Kit (JDK) In order to use Oracle's HTTP [Apache] Server, you will need to download the appropiate SDK from Sun. As per the JDK documentation, install JDK under /usr/local.
Creat
Create Oracle user account: # groupadd -g 115 dba Create Oracle directories: # mkdir /u01 # mkdir /opt/bin An example ".bash_profile" is provided in the configuration files/scripts section below. Ensure to set the environment variable: LD_ASSUME_KERNEL=2.2.5 NOTE: Failing to set the LD_ASSUME_KERNEL parameter will cause the Oracle Universal Installer to hang!
Downloading/unpacking the Oracle9i installation files 1. Run "gunzip 2. Extract the cpio archives with the command: "cpio -idmv <
Run the Oracle Installer As the "oracle" user account:
About 84% into the Link phase of the install, you will get an error when invoking the target of "install" in makefile: /u01/app/oracle/product/9.2.0/ctx/lib/ins_ctx.mk. Leave this error message up and refer to the next section, Errors during the Relink Phase of the Install, on how to resolve and continue from this error. You will come back to this error dialog box after modify the $ORACLE_HOME/ctx/lib/env_ctx.mk file.
The "Link" phase will now successfully continue to 100% complete. When the "Link" phase is complete, you will be prompted to run the $ORACLE_HOME/root.sh script as the "root" user account. Go ahead and perform this action. When prompted for the "local bin directory," I generally choose to put the files in /opt/bin keeping with by old conventions of Solaris. You may choose to use the default of /usr/local/bin if you would like. Just make sure that whatever directory you choose that it is in the PATH environment variable of the "oracle" user account.
After running the root.sh script in the above step, you have successfully installed the Oracle9i RDBMS software. At the "End of Installation" screen, simply hit the "Exit" button. A few seconds after hitting the "Exit" button will bring up "Oracle Enterprise Manager" (OEM). I generally exit from the OEM application as I keep a central repository for all nodes and databases.
From here, it is time to create the O920DB Oracle database. In the configuration files/scripts section of this document, I put together an example initO920DB.ora instance parameter file along with a set of CREATE DATABASE... scripts in an archive named create_database920.tar.
Good Luck!
Errors during the relink phase of the install During the "Link Phase" of the install, you will get an error while trying to make/install CTX. (The same issue exists in 9.0.1 on RedHat Linux).
The following errors will exist in $ORACLE_HOME/install/make.log
/lib/libdl.so.2: undefined reference to `__ctype_b_loc@GLIBC_2.3' This error occurs when the following is executed:
/usr/bin/make -f ins_ctx.mk install Solution
The solution is to edit the file $ORACLE_HOME/ctx/lib/env_ctx.mk and go to "INSO_LINK =", add a "$(LDLIBFLAG)dl" to the line and save it.
Here is the full line with the added "$(LDLIBFLAG)dl" flag:
INSO_LINK = -L$(CTXLIB) $(LDLIBFLAG)m $(LDLIBFLAG)dl $(LDLIBFLAG)sc_ca $(LDLIBFLAG)sc_fa $(LDLIBFLAG)sc_ex $(LDLIBFLAG)sc_da $(LDLIBFLAG)sc_ut $(LDLIBFLAG)sc_ch $(LDLIBFLAG)sc_fi $(LLIBCTXHX) $(LDLIBFLAG)c -Wl,-rpath,$(CTXHOME)lib $(CORELIBS) $(COMPEOBJS)
Set LD_ASSUME_KERNEL
You will also need to enter LD_ASSUME_KERNEL=2.2.5 in your .profile (or .bash_profile if you are using BASH) for the "oracle" user account so that they you can run programs like "dbssist" and "netca".
Return and retry
After making the above change, return to the popup error dialog box and hit "Retry". It should continue from here with no errors.
Creating an Oracle9i Database on RAW devices Now to the heart of this document, and that is how to create a database using RAW devices instead of using files on a file system. So far, all of the action has taken place on the master IDE drive, /dev/hda. It is now time to work with that second hard drive in our system, /dev/hdb. As I mentioned in the first section of this document, the Linux operating system and the Oracle RDBMS software will be installed on /dev/hda, while we will be creating a database named O920DB on RAW devices on the /dev/hdb disk. Here is a short overview of how we will be accomplishing this:
Removing any partitions on second IDE internal hard drive
I decided to use my second IDE 40GB hard drive as the one to store the Oracle database files. The device was recognized on my system as: /dev/hdb. Lets assume for the purpose of this document that the entire hard drive should be dedicated to Oracle database files and that no partitions will exist. If there are partitions on the /dev/hdb hard disk, there are several ways to remove them. The first way is to use the Linux fdisk utility. Using fdisk, you can simply walk through any of the primary / extended partitions and use the proper commands to remove them. Once you have removed all of the partitions, use the p command within fdisk to verify that no further partitions exist. When you are sure they are all removed, use the w command within fdisk to write your changes to the hard disk's partition table.
Another way to remove any entries in the hard disk's partition table is to use the dd command:
The following commands will destroy the partition table on the disk being operated on. Be very sure it is the correct disk before continuing!
# dd if=/dev/zero of=/dev/hdb bs=1K count=1 # blockdev --rereadpt /dev/hdb Create the LVM physical volume
In this step, we will create an LVM Physical Volume called /dev/pv1 for the entire hard disk /dev/hdb.
Before continuing with the syntax for creating the LVM Physical Volume, I want to mention that within the configuration files/scripts section of this document, I included a shell script named create_hdb_lvm.sh that contains all of the commands to create the LVM Physical Volume, LVM Volume Group, and LVM Logical Volumes for the /dev/hdb hard drive. Create an LVM Physical Volume named /dev/pv1 for the entire /dev/hdb hard drive using the following command: Create the LVM volume group
In this step, we will create an LVM Volume Group that will contain the LVM Physical Volume /dev/pv1.
Like mentioned in the previous section, all commands for creating the LVM Logical Volumes are contained in the script create_hdb_lvm.sh. Create an LVM Volume Group named that contains the LVM Physical Volume /dev/pv1.
# vgcreate -l 256 -p 256 -s 128k /dev/pv1 /dev/hdb Create all LVM logical volumes
Now that we have a LVM Volume Group that contains the block device /dev/hdb, it is time to create all of the LVM Logical Volumes that will be used to house all of the Oracle database files.
Like mentioned in the previous section, all commands for creating the LVM Logical Volumes are contained in the script create_hdb_lvm.sh. Create all required LVM Logical Volumes as determined by the number of Oracle database files you will need for the database. In our example, we will need to create 24 LVM Logical Volumes in order to store the 24 Oracle database files for our O920DB database.
# lvcreate -L 900m /dev/pv1 # SYSTEM Tablespace - (800m) # lvcreate -L 120m /dev/pv1 # Control File 1 - (110m) # lvcreate -L 120m /dev/pv1 # Control File 2 - (110m) # lvcreate -L 120m /dev/pv1 # Control File 3 - (110m) # lvcreate -L 60m /dev/pv1 # redo_g01a.log - (50m) # lvcreate -L 60m /dev/pv1 # redo_g01b.log - (50m) # lvcreate -L 60m /dev/pv1 # redo_g01c.log - (50m) # lvcreate -L 60m /dev/pv1 # redo_g02a.log - (50m) # lvcreate -L 60m /dev/pv1 # redo_g02b.log - (50m) # lvcreate -L 60m /dev/pv1 # redo_g02c.log - (50m) # lvcreate -L 60m /dev/pv1 # redo_g03a.log - (50m) # lvcreate -L 60m /dev/pv1 # redo_g03b.log - (50m) # lvcreate -L 60m /dev/pv1 # redo_g03c.log - (50m) # lvcreate -L 250m /dev/pv1 # UNDOTBS Tablespace - (200m) # lvcreate -L 250m /dev/pv1 # TEMP Tablespace - (200m) # lvcreate -L 60m /dev/pv1 # DRSYS Tablespace - (50m) # lvcreate -L 60m /dev/pv1 # CWMLITE Tablespace - (50m) # lvcreate -L 200m /dev/pv1 # EXAMPLE Tablespace - (150m) # lvcreate -L 300m /dev/pv1 # PERFSTAT Tablespace - (250m) # lvcreate -L 60m /dev/pv1 # ODM Tablespace - (50m) # lvcreate -L 60m /dev/pv1 # XDB Tablespace - (50m) # lvcreate -L 150m /dev/pv1 # USERS Tablespace - (100m) # lvcreate -L 150m /dev/pv1 # INDX Tablespace - (100m) # lvcreate -L 100m /dev/pv1 # TOOLS Tablespace - (50m) Create RAW bindings
In this step, we will create (or edit) a script called /etc/init.d/dbora that contains all of the commands that will bind the volumes to RAW devices. Also included are the commands to change the ownership of the raw devices for use by the Oracle database user "oracle".
I put these commands in script since they will need to be executed on each machine startup. Keep in mind that in most cases, the commands to start and stop the database are included in the /etc/init.d/dbora file. You can simply put the commands to bind the volumes to raw and chown commands in the start) portion of your script.
A sample script named dbora is include in the configuration files/scripts section of this document.
# vgchange -a y /dev/pv1 # /usr/bin/raw /dev/raw/raw1 /dev/pv1/lvol1 # SYSTEM Tablespace # /usr/bin/raw /dev/raw/raw2 /dev/pv1/lvol2 # Control File 1 # /usr/bin/raw /dev/raw/raw3 /dev/pv1/lvol3 # Control File 2 # /usr/bin/raw /dev/raw/raw4 /dev/pv1/lvol4 # Control File 3 # /usr/bin/raw /dev/raw/raw5 /dev/pv1/lvol5 # redo_g01a.log # /usr/bin/raw /dev/raw/raw6 /dev/pv1/lvol6 # redo_g01b.log # /usr/bin/raw /dev/raw/raw7 /dev/pv1/lvol7 # redo_g01c.log # /usr/bin/raw /dev/raw/raw8 /dev/pv1/lvol8 # redo_g02a.log # /usr/bin/raw /dev/raw/raw9 /dev/pv1/lvol9 # redo_g02b.log # /usr/bin/raw /dev/raw/raw10 /dev/pv1/lvol10 # redo_g02c.log # /usr/bin/raw /dev/raw/raw11 /dev/pv1/lvol11 # redo_g03a.log # /usr/bin/raw /dev/raw/raw12 /dev/pv1/lvol12 # redo_g03b.log # /usr/bin/raw /dev/raw/raw13 /dev/pv1/lvol13 # redo_g03c.log # /usr/bin/raw /dev/raw/raw14 /dev/pv1/lvol14 # UNDOTBS Tablespace # /usr/bin/raw /dev/raw/raw15 /dev/pv1/lvol15 # TEMP Tablespace # /usr/bin/raw /dev/raw/raw16 /dev/pv1/lvol16 # DRSYS Tablespace # /usr/bin/raw /dev/raw/raw17 /dev/pv1/lvol17 # CWMLITE Tablespace # /usr/bin/raw /dev/raw/raw18 /dev/pv1/lvol18 # EXAMPLE Tablespace # /usr/bin/raw /dev/raw/raw19 /dev/pv1/lvol19 # PERFSTAT Tablespace # /usr/bin/raw /dev/raw/raw20 /dev/pv1/lvol20 # ODM Tablespace # /usr/bin/raw /dev/raw/raw21 /dev/pv1/lvol21 # XDB Tablespace # /usr/bin/raw /dev/raw/raw22 /dev/pv1/lvol22 # USERS Tablespace # /usr/bin/raw /dev/raw/raw23 /dev/pv1/lvol23 # INDX Tablespace # /usr/bin/raw /dev/raw/raw24 /dev/pv1/lvol24 # TOOLS Tablespace # /bin/chmod 600 /dev/raw/raw1 # /bin/chown oracle:dba /dev/raw/raw1 Create the Oracle9i Database O920DB
If you have successfully made it to this point, you are almost done. The only part left now, is to create the O920DB database. I put together an example initO920DB.ora instance parameter file along with a set of CREATE DATABASE... scripts in an archive create_database920.tar in the configuration files/scripts section of this document.
Configuration files/scripts [TABLE]
DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Oracle Development Solutions - SQL, J2EE, XML, SOA |
| About Us | Contact Us | For Advertisers | For Business Partners | Site Index | RSS |
|
|
|
|||||||