| Home -> oracle -> Oracle 9i release 2 (9.2.0.1.0) on RedHat 8.0 |
Oracle 9i release 2 (9.2.0.1.0) installation on Red Hat Linux 8.0Step-by-step installation guide for Oracle 9i release 2 (9.2.0.1.0) database on RedHat linux 8.0.Please note that oracle 9i release 2 is not certified to run on RedHat 8.0, so you should not use this combination on a production server. You can examine Oracle certification matrix at Metalink
Contents
1. Changing kernel parametersTo change the kernel parameters login as root and type:[root@marvin]# echo 250 32000 100 128 > /proc/sys/kernel/sem [root@marvin]# echo 2147483648 > /proc/sys/kernel/shmmax [root@marvin]# echo 4096 > /proc/sys/kernel/shmmni [root@marvin]# echo 2097152 > /proc/sys/kernel/shmallIn earlier versions of oracle server on linux I never bothered to change these parameters because the default values were good enough. This time I ended up with ORA-27123: unable to attach to shared memory segment when running dbca.
At first I thought that I don't have enough RAM installed (256M), but after changing
these parameters I was able to create the database.You can write a script to initialize these parameters during system startup. I put these lines in the script that starts oracle database. 2. Creating users and groupsCreate user oracle and dependent groups that will own oracle software. In this example we'll name the user 'ora9':[root@marvin]# groupadd oinstall [root@marvin]# groupadd dba [root@marvin]# useradd -g oinstall -G dba ora9 [root@marvin]# passwd ora9Create directories in which oracle software will be installed. Oracle recommends OFA - Optimal Flexible Architecture (see oracle installation guide), but in this example everything will be installed under /home/ora9: [root@marvin]# mkdir -p /home/ora9/product/9.2 [root@marvin]# chown -R ora9.oinstall /home/ora9/* [root@marvin]# mkdir /var/opt/oracle [root@marvin]# chown ora9.dba /var/opt/oracleLogin as user oracle and put the following lines at the end of your .bashrc: #oracle 9i export ORACLE_HOME=/home/ora9/product/9.2 export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/Apache/Apache/bin:$PATH # # change this NLS settings to suit your country: # example: # german_germany.we8iso8859p15, american_america.we8iso8859p2 etc. # export NLS_LANG='croatian_croatia.ee8iso8859p2'Since I am from Croatia, I use Croatian national language support (NLS_LANG, NLS_DATE_LANGUAGE, NLS_SORT and NLS_DATE_FORMAT). You should set these variables to suit your needs. Listing of valid Oracle NLS Data parameters including supported languages, territories and storage character sets can be found here. Execute .bashrc in order to initialize these variables:[ora9@marvin]$ source /home/ora9/.bashrcor just log off and than back on as user oracle. If you use some shell other than bash (tcsh, sh, ...) these variables should be set according to syntax of your shell and put in script that automatically executes at user login. 3. Unpacking downloaded installation filesIf you downloaded oracle software from technet, you have three files: lnx_920_disk1.cpio.gz, lnx_920_disk2.cpio.gz and lnx_920_disk3.cpio.gz. First run[ora9@marvin]$ gunzip lnx_920*.cpio.gzand then [ora9@marvin]$ cpio -idmv<lnx_920_disk1.cpio [ora9@marvin]$ cpio -idmv<lnx_920_disk2.cpio [ora9@marvin]$ cpio -idmv<lnx_920_disk3.cpio 4. Running the installerOracle installer MUST be run from Xwindows.Login as user oracle, start Xwindows and from terminal window and start the installer: $ /wherever/you/unpacked/it/Disk1/runInstalleror (if you have the CD set): $ /mnt/cdrom/runInstallerIf you install oracle from CD, do not change directory to CD-ROM and run installer from there because later you will not be able to unmount the first CD. During the linking of oracle software you'll get the following error - view snapshot (new window): Error in invoking target install of makefile $ORACLE_HOME/ctx/lib/ins_ctx.mk At this point leave the error window up and open new terminal window. Then do [ora9@marvin]$ cd $ORACLE_HOME/install [ora9@marvin]$ tail make.logYou will see that the last gcc line that failed looks like this: (your path values may be different)
Copy this line, add -ldl at the end of line and run it in $ORACLE_HOME/bin:
If you need to relink oracle later using oracle
-ldl at the end of that line and save the file. Now you will be able to 'relink all' if you need to.
5. Starting the database for the first time5.1 Starting the databaseIn.bashrc (if you use bash shell) for user oracle add variable
ORACLE_SID=your_sid_name.
I named my instance ora9, so my line looks like this:
export ORACLE_SID=ora9Initialize this variable for current session: [ora9@marvin]$ export ORACLE_SID=ora9Edit /etc/oratab and make sure that it contains the following line:
ora9:/home/ora9/product/9.2:YYou should replace the first 'ora9' (SID) with the name of your instance and change the last argument from 'N' to 'Y' Start oracle TNS listener and Apache http server: [ora9@marvin]$ lsnrctl start [ora9@marvin]$ apachectl startLet's start the database now: [ora9@marvin]$ dbstartOr you can do it the other way: [ora9@marvin]$ sqlplus /nolog SQL*Plus: Release 9.2.0.1.0 - Production on Mon Mar 17 20:51:08 2003 Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved. SQL> conn / as sysdba Connected to an idle instance. SQL> startup ORACLE instance started. Total System Global Area 168890408 bytes Fixed Size 450600 bytes Variable Size 100663296 bytes Database Buffers 67108864 bytes Redo Buffers 667648 bytes Database mounted. Database opened. SQL> select sysdate from dual; SYSDATE --------- 17-MAR-03 SQL> exit Disconnected from Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production With the Partitioning, OLAP and Oracle Data Mining options JServer Release 9.2.0.1.0 - Production [ora9@marvin]$ 5.2 Shutting down the databaseFirst we'll shut down TNS listener and Apache:[ora9@marvin]$ lsnrctl stop [ora9@marvin]$ apachectl stopTo shut down the database use: [ora9@marvin]$ dbshutor through the SQL*PLUS: [ora9@marvin]$ sqlplus /nolog SQL*Plus: Release 9.2.0.1.0 - Production on Mon Mar 17 20:54:49 2003 Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved. SQL> conn / as sysdba Connected. SQL> shutdown Database closed. Database dismounted. ORACLE instance shut down. SQL> exit Disconnected from Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production With the Partitioning, OLAP and Oracle Data Mining options JServer Release 9.2.0.1.0 - Production [ora9@marvin]$ 5.3 Automating oracle startup and shutdownTo automatically start/shut oracle database during system startup/shutdown you need to write a script in/etc/rc.d/init.d directory. You can view this script as an example.
Make sure that your script is in /etc/rc.d/init.d/ directory, owned by root, and that
it has exec permission set. Next, you should put the links to this script in runlevel in which you want
oracle so start or stop. Yo can also do it via GUI tool (e.g. ksysv, a part of KDE)
For example, I named my script ora9, and I want oracle to start in runlevel 5,
and to shut down when system goes to halt (runlevel 0) or reboot (runlevel 6):
[root@marvin]# ln -s /etc/rc.d/init.d/ora9 /etc/rc.d/rc5.d/S80ora9 [root@marvin]# ln -s /etc/rc.d/init.d/ora9 /etc/rc.d/rc0.d/K06ora9 [root@marvin]# ln -s /etc/rc.d/init.d/ora9 /etc/rc.d/rc6.d/K06ora9More info on SysV init can be found on The Linux Docummentation Project site. I hope this helps. If you have any questions or comments regarding this text, feel free
to contact me.
|
| Home -> oracle -> Oracle 9i (9.0.1) on RedHat 7.3 |
|
|
|