-
Installing Oracle 9iR2 on Redhat 9
Part I
Ok people so here goes...
Pre-Installation Checks
_____________________
[1] OS : Redhat 9 (latest updated version from the RHN, _27.9)
[2] Software : Oracle 9iR2 database from otn.oracle.com. Go to downloads and download it.(to preferably /tmp directory, make sure you have enough space in it as you will be copying/and unzipping it to your local HDA)
[3] Make sure you have enough hard disk space. (I'll say keep it 5 G just in case, although 3.5G in ok).
[4] Powerful machine? I don't know about tht. I have a chevo laptop 40G diskspace(RH9 uses 10G), 1G mem, 600MB swap space. So I am way above the specs. but a min of 500mb swap space. Oracle recommends a swap partition of either 400 megabytes or twice the amount of your RAM, whichever is greater.
[5] Oracle is not certified to run on Redhat 9 so I assume you're doing all that for development/curiosity/learning(I'm doing it to learn linux better heh)
So we're ready to go?
Step 1:(I've also carried out steps in different orders, yep I know, it ain't windoos, you can do things in varienty of ways)
Make users and Groups(These at a minimum, I've seen more groups being made)
Code:
[root@cc345772-a root]# groupadd dba
[root@cc345772-a root]# groupadd oinstall
[root@cc345772-a root]# useradd -g oinstall -G dba oracle
[root@cc345772-a root]# passwd oracle
here you'll be prompted for a pwd, punch it twice in and you're done with this part.
Step 2 : Creating directories, I want to go the OFA way so I made 6 directories, just doing it by the book
Code:
[root@cc345772-a root]# mkdir /u01 /u02 /u03 /u04 /u05 /u06
[root@cc345772-a root]# chown oracle.dba /u01 /u02 /u03 /u04 /u05 /u06
[root@cc345772-a root]# chmod 775 /u01 /u02 /u03 /u04 /u05 /u06
[root@cc345772-a root]#
Step 3 : Downloading/Unzipping etc
OK If you haven't downloaded oracle 9iR2 do so from the oracle website http://otn.oracle.com/software/produ...linuxsoft.html
[root@cc345772-a root]# cd /tmp/9i
[root@cc345772-a 9i]# -- Here I've created new directory and gave oracle user as well all the rights(you might encounter errors when you start installation while logged on as
user oracle , linking of files gave me errors at the end of it)
This way you avoid the gunzip/ then cpio command. in one go,
Code:
[root@cc345772-a 9i]# zcat lnx_920_disk1.cpio.gz | cpio -idmv
[root@cc345772-a 9i]# zcat lnx_920_disk2.cpio.gz | cpio -idmv
[root@cc345772-a 9i]# zcat lnx_920_disk3.cpio.gz | cpio -idmv
Or gunzip it,
Code:
gunzip lnx_920_disk1.cpio.gz lnx_920_disk2.cpio.gz lnx_920_disk3.cpio.gz
# and then unpack it...
cpio -idmv < lnx_920_disk1.cpio
cpio -idmv < lnx_920_disk2.cpio
cpio -idmv < lnx_920_disk3.cpio
Then you have Disk1, Disk2 and Disk3 respectively ready for you.(Which ever way you chose).
Step4: Tools and Libraries for backward compatibility?
Well I've seen people suggesting this for backward compatibility.
Code:
gcc-3.2.2-5
cpp-3.2.2-5
glibc-devel-2.3.2-11.9
binutils-2.13.90.0.18-9
compat-gcc-7.3-2.96.118.i386.rpm
compat-libgcj-7.3-2.96.118.i386.rpm
compat-libgcj-devel-7.3-2.96.118.i386.rpm
nss_db-compat-2.2-20.i386.rpm
I did this to check what I have on my hand...
Code:
[root@cc345772-a root]# rpm -q gcc cpp compat-libstdc++ glibc-devel kernel-headers binutils
gcc-3.2.2-5
cpp-3.2.2-5
compat-libstdc++-7.3-2.96.118
glibc-devel-2.3.2-27.9.7
package kernel-headers is not installed
binutils-2.13.90.0.18-9
[root@cc345772-a root]#
As you can see I don't have it all but it didn't make much of a difference with the installation.
Anyways check it up and you can always install them if you don't have it from your shrike disk3. With redhat 9 you can do it withthe GUI.
Start menu->System Settings->Add/Remove Applications, or from the command line, using:
rpm -Uvh
Step5: Tuning kernel parameters
Append these to the /etc/sysctl.conf...
Code:
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.shmall = 2097152
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
And
append these lines to /etc/security/limits.conf
Code:
oracle soft nofile 65536
oracle hard nofile 65536
oracle soft nproc 16384
oracle hard nproc 16384
Then you can reboot to let the changes take effect , If you can't then do this to change kernel parameters at runtime...
Code:
[root@cc345772-a root]# echo 250 32000 100 128 > /proc/sys/kernel/sem
[root@cc345772-a root]# echo 536870912 > /proc/sys/kernel/shmmax
[root@cc345772-a root]# echo 4096 > /proc/sys/kernel/shmmni
[root@cc345772-a root]# echo 2097152 > /proc/sys/kernel/shmall
[root@cc345772-a root]# echo 65536 > /proc/sys/fs/file-max
[root@cc345772-a root]# echo 1024 65000 > /proc/sys/net/ipv4/ip_local_port_range
Step6: Setting up env variables for user oracle
Now login as oracle user
su - oracle
append these lines to the .bash_profile
Code:
# oracle 9i
export ORACLE_BASE=/u01/ora92 -- your file locations
export ORACLE_HOME=/u01/ora92/product/9.2
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/Apache/Apache/bin:$PATH
# -- NO NEED TO DO ANY OF THE JRE/JDK(more on that later)
export ORACLE_OWNER=oracle
export ORACLE_SID=nick920
# -- Your own sid
export ORACLE_TERM=xterm
# Use old Linuxthreads with floating stacks instead of
# the new Native POSIX Thread Library (NPTL)
export LD_ASSUME_KERNEL=2.4.1
export THREADS_FLAG=native
# Edit paths
export LD_LIBRARY_PATH=/opt/ora9/product/9.2/lib:$LD_LIBRARY_PATH
export PATH=/opt/ora9/product/9.2/bin:$PATH
export SQLPATH=$ORACLE_HOME/dbs
#
# change this NLS settings to suit your country:
# example:
# german_germany.we8iso8859p15, american_america.we8iso8859p2 etc.
# BTW you don't need to append it wth the .we8iso8859p2, if you're not sure, otherwise you may get trouble while creating the db or even logging into sqlplus etc.(if you
export NLS_LANG='american_america'
Step7: You can set up temporary swap space logged is as ROOT.
Code:
% dd if=/dev/zero of=tmp_swap bs=1k count=900000
% chmod 600 tmp_swap
% mkswap tmp_swap
% swapon tmp_swap
And then free it (I didn't need it as I had enough of it)
Code:
% swapoff tmp_swap
% rm tmp_swap
log off as oracle user to let the env variables take effect.
Check then after logging as...
Code:
[oracle@cc345772-a oracle]$ env | grep ORACLE
ORACLE_OWNER=oracle
ORACLE_SID=nick920
ORACLE_BASE=/u01/ora92
ORACLE_TERM=xterm
ORACLE_HOME=/u01/ora92/product/9.2
[oracle@cc345772-a oracle]$
PS: About the JDK/JRE , there is no need to install it seperately as oracle has it's own jre , unless you want to setup the startup of listener, database(s), agent, http server,
you might want to download a rpm from http://www.gurulabs.com/downloads.We'll come to that later. For dbca, oemapp(enterprize manager stuff like that), I'll say, NO NEED.
Oracle installer must run from X and in order to let oracle user to be able to write to X do...
(Again I didn't do it as I am doing it from X)
Continued on Part II...
Last edited by Tarry; 12-30-2003 at 02:33 PM.
Tarry Singh
I'm a JOLE(JavaOracleLinuxEnthusiast)
--- Everything was meant to be---
-
Part II
INSTALLATION
______________
Well it's not really a big deal.
[1] This command $ /tmp/9i/Disk1/runInstaller
will open up the OUI(Oracle Universal Installer)
[2] Next It will ask for orainvertory location, and that will be the one you chose in your .bash_profile.
[3] Next Unix group type in 'oinstall'
[4] Next you'll be prompted to run orainstRoot.sh from the terminal logged on as root. Do it.
PS: A small note/tip here, I always open two terminal sessions, one as oracle and other as root, this way I can carry out scripts as the user needed by the installer.
tick in exactly as the message says it, sometimes you end up doing a orainstroot.sh(watch out for case sensitivity)
for example : [root@cc345772-a root]# /tmp/orainstRoot.sh
Then after succesfully running the script, click continue to close hte dialog box.
[5] File location will be suggested by the installer, should be A OK. If you also choose for DBCA it's no problem ,some say don't do it. I've done it without problems. BUT before
you reach this stage of creating database you'll run into two errors.
Error 1: ins_oemagent.mk
click ignore(will be dealt with later)
Error 2: Error in invoking target install of makefile $ORACLE_HOME/ctx/lib/ins_ctx.mk -- Check out hte attachment below.
When this comes open up the terminal as user ORACLE
Code:
[oracle@cc345772-a oracle]$ cd $ORACLE_HOME/install
[oracle@cc345772-a install]$ tail make.log
And then copy this line...
Code:
gcc -o ctxhx -L/opt/ora9/product/9.2/ctx/lib/ -L/opt/ora9/product/9.2/lib/
-L/opt/ora9/product/9.2/lib/stubs/ /opt/ora9/product/9.2/ctx/lib/ctxhx.o
-L/opt/ora9/product/9.2/ctx/lib/ -lm -lsc_ca -lsc_fa -lsc_ex -lsc_da -lsc_ut
-lsc_ch -lsc_fi -lctxhx -lc -Wl,-rpath,/opt/ora9/product/9.2/ctx/lib -lnls9
-lcore9 -lnls9 -lcore9 -lnls9 -lxml9 -lcore9 -lunls9 -lnls9
and append -ldl to it, like this
Code:
gcc -o ctxhx -L/opt/ora9/product/9.2/ctx/lib/ -L/opt/ora9/product/9.2/lib/
-L/opt/ora9/product/9.2/lib/stubs/ /opt/ora9/product/9.2/ctx/lib/ctxhx.o
-L/opt/ora9/product/9.2/ctx/lib/ -lm -lsc_ca -lsc_fa -lsc_ex -lsc_da -lsc_ut
-lsc_ch -lsc_fi -lctxhx -lc -Wl,-rpath,/opt/ora9/product/9.2/ctx/lib -lnls9
-lcore9 -lnls9 -lcore9 -lnls9 -lxml9 -lcore9 -lunls9 -lnls9 -ldl
and run it in $ORACLE_HOME/bin
Code:
[oracle@cc345772-a install]$ cd
[oracle@cc345772-a oracle]$ cd $ORACLE_HOME/bin
[oracle@cc345772-a bin]$
then click ignore on the second error and carry on with the installation.
[6] You can like I said carry on with the DB creation.
POST INSTALLATION
____________________
[1] Fixing the ins_ctx.mk issue and starting the agent.
Code:
[oracle@cc345772-a oracle]$ cd $ORACLE_HOME/network/lib
[oracle@cc345772-a lib]$ make -f ins_net_client.mk install
Now go on and edit the $ORACLE_HOME/ctx/lib/ins_ctx.mk file. Change lines 13-14 from:
Code:
ctxhx: $(CTXHXOBJ)
$(LINK) $(CTXHXOBJ) $(INSO_LINK)
to
Code:
ctxhx: $(CTXHXOBJ)
$(LINK) -ldl $(CTXHXOBJ) $(INSO_LINK)
and then do
Code:
[oracle@cc345772-a lib]$ make -f $ORACLE_HOME/ctx/lib/ins_ctx.mk install
[2] Well that's just about it. You can go on and start your listener/database or create your database using dbca from command line.
To start EM do
[oracle@cc345772-a oracle]$ oemapp console
starting up listener/database...
Code:
[oracle@cc345772-a oracle]$ lsnrctl start
LSNRCTL for Linux: Version 9.2.0.1.0 - Production on 29-DEC-2003 00:14:19
Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.
Starting /u01/ora92/product/9.2/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 9.2.0.1.0 - Production
System parameter file is /u01/ora92/product/9.2/network/admin/listener.ora
Log messages written to /u01/ora92/product/9.2/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=cc345772-a)(PORT=1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 9.2.0.1.0 - Production
Start Date 29-DEC-2003 00:14:19
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security OFF
SNMP OFF
Listener Parameter File /u01/ora92/product/9.2/network/admin/listener.ora
Listener Log File /u01/ora92/product/9.2/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=cc345772-a)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "nick920" has 1 instance(s).
Instance "nick920", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
[oracle@cc345772-a oracle]$ sqlplus
SQL*Plus: Release 9.2.0.1.0 - Production on Mon Dec 29 00:14:49 2003
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Enter user-name: tarry as sysdba
Enter password:
Connected to an idle instance.
tarry
tarry> startup
ORACLE instance started.
Total System Global Area 235999352 bytes
Fixed Size 450680 bytes
Variable Size 201326592 bytes
Database Buffers 33554432 bytes
Redo Buffers 667648 bytes
Database mounted.
Database opened.
tarry>
[3] Automatically starting/shutting down db and other services simultaneosly, down load the Oracle 9i RHL run pkg from http://www.gurulabs.com/downloads.html
I haven't tried the one form the oracle doco's script. Some say it does not work wel but anyways you gotta try and then see for yourself.
Check these out as well...
[1] Installing Linux : http://www.redhat.com/docs/manuals/l...install-guide/
[2] Installing Oracle/Linux, Errors etc: http://www.puschitz.com/InstallingOracle9i.shtml
[3] http://metalink.oracle.com/oracleins...unix.html#Uoui
[4] http://www.gurulabs.com/
Cheers...
Tarry
Last edited by Tarry; 12-29-2003 at 03:14 AM.
Tarry Singh
I'm a JOLE(JavaOracleLinuxEnthusiast)
--- Everything was meant to be---
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|