RedHat
6.1
Step-by-step
Install notes for Oracle 8i
IMPORTANT!
NOTES ABOUT ORACLE 8i
Despite the release of some patches in December
(which are part of this doc's install process), this product is still very
buggy. Hopefully, Oracle 8i, release 2, which hasn't been released for
Linux yet, will fix some of the problems.
The
machine I used to install Oracle
Though Oracle recommends at least 256 megs RAM, I used a Pentium
III 450 with 128 megs. Building the database took a long time on this machine,
but it works.
What's in this doc
There are six parts:
RedHat initial install - Covers what
is needed at minimum to install with RedHat 6.1, plus memory parameters
recommended by Oracle and why you shouldn't use them.
Stuff you have to download before installing
- You need the Java RunTime Environment and a patch before even
proceeding with the installation.
Oracle pre-install - Setting up your
users, groups, mount points and environment variables.
Oracle install - Where you actually
install the software.
Changing permissions and applying the patch -
Highly recommended you apply this patch.
Oracle post-install - Clean-up tasks
and testing.
I make no guarantees that the installation will work if you decide
to just use part of these instructions vs. the whole thing.
Editorial comment about
this document
I'm not a Linux guru, but I proceeded to put these pages up to help
other lost soles like me. If you see something that makes you laugh hysterically
here, do me a favor: When you're done laughing, drop a note to me, tbissett@fwn.fortwayne.com,
and (kindly) let me know where I'm nuts.
Why use Redhat?
Oracle used RedHat when they ported the server to Linux and will continue
to use RedHat when developing. It likely will be the least hassle to install.
Redhat
Initial Install
Install any way you would like, keeping the following steps in mind
as you're doing it.
A. Partitioning
1) Make swap partitions (max. 128 mb ea.) equivalent to three times
RAM installed.
2) Partition the drive to your preferences. I ignored the OFA-compliance
and just made one mount point (/u01). You can also fake OFA by making four
directories, but you won't gain any performance from this. You'll gain
some performance by creating four distinct partitions (/u01, /u02, /u03,
/u04) and you'll gain the most performance by having each of these mount
points on four distinct drives, as Oracle recommends.
B. X Windows
Love it or hate it, you have to have X Windows for Oracle 8i.
The installer is now GUI-based. With Redhat 6.1, you can use Gnome or KDE.
They both work fine right out of the box.
C. Install options
Will the Redhat WORKSTATION installation work? Yes.
Will the RedHat SERVER installation work? Yes.
Will the RedHat CUSTOM installation work? As long as you install
the following packages:
-
XWindows of some sort
-
Development
-
You can add other packages to suit your needs.
D. If you want to reconfigure the kernel:
1) If you have the RedHat 6.1 CD, place it in your CD drive. If it
doesn't automatically mount, mount it and change to the /RedHat/RPMS directory.
-
mount -t iso9660 /dev/cdrom /mnt/cdrom
-
cd /cdrom/RedHat/RPMS
2) Install the kernel source RPM. You only need to do this if you want
to change the kernel parameters:
-
rpm -ivh kernel-source-2.2.12-20.i386.rpm. This is the kernel source,
so that we can recompile the kernel for new memory parameters. More on
that later.
3) Change out of the cdrom directory and unmount the RedHat CD:
Kernel memory params
The front of the Oracle installation manual lists some memory parameters
which, according to the Oracle install manual, need to be changed before
installing the software.
Oracle will run fine without changing any of the RedHat parameters.
This
is because nearly all the RedHat parameters are already above Oracle's
recommendation.
(somebody, please correct
me if I am wrong).
The only parameter you MIGHT have to worry about is the SHMMAX setting,
and you should only worry about this one if your machine has more than
64 megs RAM, and you are really going to do some heavy database work. If
you feel like you MUST change it (and I wouldn't necessarily recommend
it), here's how:
WARNING!
Changing the kernel parameters requires recompiling the Linux kernel.
If you have never done this, I highly recommend you get a good book
that walks you through the process and all the 100+ different options when
you run the configure script. If you aren't sure of some of them, choosing
the wrong one may prevent you from booting your system!
Changing memory params
1) Change to the directory listed below and edit the shmparam.h file.
-
cd /usr/src/linux/include/asm
-
vi shmparam.h
2) A little further down is a line that says "#define SHMMAX 0x2000000."
The 0x2000000 is hex for 32 megs. Oracle says this value should be one-half
of your installed memory. Change it to the appropriate value. For example,
I have 128 megs RAM in my machine, so Oracle suggests I change this setting
to 0x4000000, or slightly above 64 megs.
Other values:
0x4000000 = 67108854
0x6000000 = 100663296
0x8000000 = 134217728
3) Save the file.
4) You're now ready to proceed with the process of recompiling the kernel.
Recompile it, then continue below.
Stuff
you have to download before installing
Java RunTime Environment
Starting with 8i, Oracle requires a Java RunTime Environment to
run the installer. The bad news is that RedHat doesn't come with one,
so you have to download it. the good news is it's real easy to obtain and
install.
1) Login as root and use a web browser to go to http://www.blackdown.org
2) Click on the downloads link.
3) Pick an FTP site that is geographically near you.
4) The file to look for is jre_1.1.6-v5-glibc-x86.tar.gz. Do
NOT
download a newer version and make sure you are downloading the file
that begins with jre... and NOT the one that starts with jdk... This
is the wrong file.
5) Download this file to /usr/local.
6) Open a terminal window. We'll now extract the file and create
a symbolic link so the Oracle Installer can find it. Run the following
commands:
-
tar xzvf jre_1.1.6-v5-glibc-x86.tar.gz
-
ln -s /usr/local/jre116_v5 /usr/local/jre
7) That's all there is to it!
The oracle 8i patchset
These patches fix some critical problems in Oracle 8i for Linux.
It is highly recommended you install these patches!
1) Use your web browser to go to http://technet.oracle.com.
2) If you haven't registered, do so now. It's free and and is a good
site for getting help.
3) Click on the Software button.
4) On the "Select a Product" pulldown, select "8i Enterprise
Edition," even if you are are installing the Standard edition. The
patchset is the same.
5) Enter in your name and password when it asks.
6) Click on the appropriate product on the next screen.
7) Accept the license agreement.
3) Finally, the file you are looking for is linux_815patches.tgz
4) Save this file to root's home directory for now. We'll move
it later.
Now that you have downloaded these files, it's time for the Oracle pre-install
tasks.
Oracle
Pre-Install
In this section, we create the necessary user groups and accounts which
will ultimately manage the oracle software..
Set up Oracle account and group
The oracle account is what we will use to install software and start
and stop the oracle database. It should not be used for day-to-day operations.
The dba groups is for Database Administrators.
1) If you don't have a terminal window already open, open one now.
2) In the terminal windows, create your groups.
3) Create the oracle user.
-
useradd oracle -g dba (sub number with dba group number from above)
-
passwd oracle (to change password)
4) Remember the linux_815patches.tgz file we downloaded earlier?
Let's
move it to a directory within oracle's home directory now and change the
permissions so oracle can run it later. Enter the following commands in
a terminal window:
-
mv ~/linux_815patches.tgz /home/oracle
-
chown -R oracle.dba /home/oracle/linux_815patches.tgz
5) If you didn't make mount points with disk partitioning, make a directory
for oracle, such as /u01.
-
mkdir /u01. (You can also fake the OFA-compliancy by mkdir /u01,
/u02, /u03 and /u04.
6) Change owner and group permissions on these mount points.
-
chown oracle.dba /u01 (run same command for /u02, /u03 and /u04
if you have them)
7) Log out.
8) Log in as oracle.
Setting up the oracle user's environment
1) If you don't have a terminal window open, open one now.
2) If your Oracle CD isn't already in the CD drive, put it in now. If
it doesn't mount automatically, you can use the following commands to mount
it:
-
su root (enter password)
-
mount -t iso9660 /dev/cdrom /mnt/cdrom (sub w/ your CD device locator).
-
exit (to exit superuser privileges).
3) Verify umask is 022 by typing umask [enter]. If it is, great.
If not, you'll need to put it in .bash_profile, which we edit in the next
step.
4) Use your favorite editor to edit the .bash_profile file in
your oracle account's home directory. Put the following lines in this file:
-
ORACLE_HOME=/u01/app/oracle/product/8.1.5; export ORACLE_HOME
-
LD_LIBRARY_PATH=/u01/app/oracle/product/8.1.5/lib; export LD_LIBRARY_PATH
-
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
-
ORACLE_SID=ORCL; export ORACLE_SID
-
ORACLE_TERM=vt100; export ORACLE_TERM
-
ORA_NLS33=/u01/app/oracle/product/8.1.5/ocommon/nls/admin/data; export
ORA_NLS33
-
PATH=$PATH:/u01/app/oracle/product/8.1.5/bin; export PATH
-
(optional) umask 022 (only if umask does not default to 022)
3) There is one more environment variable you need to add to your .bash_profile.
it is the NLS_LANG variable and depends on which language set you want
to use. You MUST add this variable or the database creation will
likely fail! Here are the available values (use the quotes in your NLS_LANG
variable if they appear below):
In my case, since I use US English, I'll put the following in my .bash_profile:
-
NLS_LANG=american; export NLS_LANG
Language |
NLS_LANG value |
US English |
american |
Arabic |
arabic |
Brazilian Portugese |
"brazilian portugese" |
Canadian French |
frc |
Czech |
czech |
Danish |
danish |
Dutch |
dutch |
Finnish |
finnish |
French |
french |
German |
german |
Hungarian |
hungarian |
Icelandic |
is |
Italian |
italian |
Japanese |
japanese |
Korean |
korean |
Lithuanian |
lt |
Mexican Spanish |
esm |
Norweigan |
norweigan |
Polish |
polish |
Portugese |
portugese |
Russian |
russian |
Simplified Chinese |
"simplified chinese" |
Slovak |
slovak |
Swedish |
swedish |
Thai |
th |
Traditional Chinese |
"traditional chinese" |
Turkish |
turkish |
3) Log out, then back in as oracle. Open a terminal window again
if one isn't open and type env to see if all the above variables now
appear in your environment.
4) Also make sure all the following paths are in your path statement,
in addition to the Oracle path you specified above: /bin, /usr/bin,
/usr/local/bin.
5) If everything isn't there, double-check your spelling, etc.
in your .bash_profile. If everything is there, great! We're ready to install
some software.
Oracle
Install
Since we are using RedHat, we have to run a special version of the
installer. If you do NOT use RedHat try running runInstall at the CD's
root level. For RedHat, follow the instructions below.
1) If your CD isn't mounted when you log back in, use a terminal windows
to mount it again with the following commands:
-
su root (enter root password)
-
mount -t iso9660 /dev/cdrom /mnt/cdrom
-
exit (to exit superuser privledges).
2) In a terminal window, change to the directory containing the RedHat
install script.
-
cd /mnt/cdrom/install/linux
2) Start the installer
3) A GUI window appears. Welcome to the Java-based Oracle installer.
4) Click the Next button.
5) Verify that the Source path says [cd mount point]/stage/products.jar
6) The Destination path should be the same as your $ORACLE_HOME
environment variable.
7) Click Next.
8) At the Unix Group Name window, enter "dba" as the group,
then click Next.
9) A window will now pop up asking you to run the orainstRoot.sh script.
Here is how to do that:
-
Open a new terminal window
-
su root (enter your password)
-
cd /tmp/orainstall
-
./orainstRoot.sh
-
exit (to exit the SU privileges)
-
exit (to close the terminal session)
10) Go back to that popup window that appeared and click the Retry
button.
11) You will now get the Available Products screen. Select Oracle
8i 8.1.5.0.0 and click Next.
12) On the next screen, select Custom, then Next. It seems this
is the only option that works halfway decently.
13) You will now be at the Available Product Components screen.
You can pretty much leave it as is. The one option you may wish to deselect
is Oracle Intermedia. It doesn't work too well yet, so why bother?
You're choice, though. Click Next when you finished.
14) Now, the installer asks you if you want to create a database. Select
No. Even though you select No, it will still try to create one later.
We just choose No for now to get rid of a few extra windows. Click Next.
15) The Oracle Protocol Support window now appears. It will
be blank, which is fine. TCP/IP is always installed, so don't worry
about not seeing it as an option. Click Next.
16) Finally, we're at the Summary window, which lists everything
you're about to install. Click the Install button.
17) I have noticed a bug where the installer might tell you that
you don't have enough disk space to install everything. If you are sure
you do, just hit OK on the warning(s).
18) The software begins installing! Woo-woo!
19) After files have been copied, you will get another pop-up asking
you to run the root.sh script.
-
Open a terminal window
-
su root (enter password)
-
cd $ORACLE_HOME
-
chmod 744 root.sh (fixes the script to execute)
-
./root.sh
-
Just hit Enter when it asks for the Path to your local bin directory
-
exit (to exit superuser privileges)
-
exit (to exit the terminal window)
20) Return to that pop-up window and hit OK.
21) The Oracle Database Configuration Assistant now starts (even
though we told it not to earlier).
22) You will get an error message that starts with "JNLS Exception."
Ignore
it. Hit OK.
23) When the Database Configuration Assistant comes up, just
hit the Cancel button.
24) Confirm that you want to exit at the next window.
25) You will now get a message saying one or more tools have failed.
You can ignore this window. Hit OK.
26) Hit the Next button.
27) You are now at the End of Installation screen. Hit Exit.
28) Confirm that you want to exit.
29) Now, we change permissions on some files and apply the patch.
Changing
permissions and patching Oracle 8i
Changing the permissions
This script will change permissions on certain files. Use the same
terminal window that you used to apply the patch.
1) Run the following commands:
-
cd $ORACLE_HOME/install/utl
-
./linux.sh
2) Move on to applying the patch when this script finishes..
The patch
The version you just installed was Oracle 8i 8.1.5.0.0. This
patch will take it to 8.1.5.0.2. Oracle strongly recommends applying
this patch.
1) Do the following commands:
-
cd ~
-
tar xzvf linux_815patches.tgz
-
cd linux_815patches
-
./linux_815patches.sh
2) You will now get a couple of messages telling you the patches are being
applied. Don't worry about the message at the end telling you to link
the Intelligent Agent executables.
3) It's time to create the database.
Create
the Database
This is where we create the original database. This can take a long
time. It took over an hour on my Pentium III 450.
1) In your teminal window, enter the following command:
2) You will once again get the annoying but meaningless JNLS Exception
error. Hit OK.
3) Select Create a Database and hit Next.
4) Select Custom and hit Next.
5) You can pretty much accept the defaults on the next four screens.
Hit Next through them, stopping at the screen that asks you for the Global
Database Name.
6) At this prompt, enter a name to identify this database. The name
MUST be eight characters or less. Your SID should also be the same
as you entered earlier in your environment variables.
7) Hit Next.
8) You can accept the defaults through the next six screens.
Hit next until you get to the window that asks to Create database now.
9) Make sure Create database now is selected, then hit the Finish
button.
10) Confirm that you want to proceed by hitting Yes.
11) Go get some lunch or watch TV. It's going to take a while.
12) When the database creation is finished, you will get a message
saying so. Hit OK and proceed to the post-install tasks.
Oracle
post-install
Now comes the fun part!
IMPORTANT! Default passwords
Oracle installed two accounts off the bat for administering the database. Here are the names and passwords for both:
sys - change_on_install
system - manager
1) Use the same terminal window as before.
2) If you want to access the Oracle server with the GUI management
tools from another PC, you will need to start the TNS listener.
The default config works for most TCP/IP installations, but you may need
to change it. It worked for us.
3) The Oracle Server should be running. If not, you can start it
with the following commands:
-
svrmgrl
-
connect internal
-
startup
-
quit
4) If you want to set up the sample tables for user scott/tiger, you
can do it this way:
-
cd $ORACLE_HOME/rdbms/admin
-
sqlplus (Connect as sys)
-
@utlsampl.sql
5) Now start SQLPlus and login as user scott and password "tiger". Do a
"select * from emp" and you should get some records back.
6) You should now be able to create users tables etc. Your RDBMS is
up and running!
|