©
本文檔使用 php中文網手册 發布
If you have attempted to install Oracle 8 onto your new RH Linux 6.0 installation, and you are not already an Oracle DBA and quite knowledgeable about all things Linux, you are probably quite frustrated with the installation documentation that is available from Oracle for Linux - the glaring errors, critical omissions, etc.
After fighting with this for well over a day and pouring through discussion threads and any online references I could get my hands on, I finally got the install to work. I thought it might be a good idea for myself to record step-by-step what I did so in the future I will have something to reference, as well as put something up for those of you out there in a similar situation. I hope this helps. Please let me know if there are any mistakes or omissions! I am only a developer - not an Oracle DBA or master (by any means) and only have a basic level of understanding on the ins and outs of Linux. Therefore this advice may be completely worthless to you. However, I do hope you find something of value out of it.
The environment this document was written for is RedHat Linux 6.0 (Hedgwig), Linux kernel v2.2.5-15, running on a Dell Pentium Pro 180 with 128 megs RAM and 2 IDE hard drives. I do not know how these instructions will apply to other versions of Linux, so please let me know if you have success or failure.
Thanks,
-Reuben King
reuben@sagemediagroup.com
Memory:
As per the specification in the install guide from Oracle, at least
32 megs of RAM, and swap space equal to three times your physical memory, is
recommended.
Disk Space:
Oracle recommends four devices: One for the Oracle software distribution
and three for creating an OFA compliant database.
So, how many devices and how big should each device/partition be? This, of course, is one of those difficult decisions which requires answering the elusive question "how much space will I need?". For small development-base installs, you could certainly pack it all into one partition. However, for higher demand and mission-critical situations, this is definitely one of those issues you need to do your homework on and make sure you form a good understanding of your needs. I am setting up a small Oracle development box, so these instructions will reflect the decisions I made in this spirit.
The Oracle Enterprise install takes approximately 400-500 megs. I partitioned my software partition to be 600 megs just to be on safe side. If you have more room to spare, you might want to use it. I also created one 1.5 gig partition to hold my databases, however you could start with significantly less - even around 200 megs I believe will be sufficient just to load the starter database objects. Since I am only setting up a development instance, I am not concerned with splitting the database across multiple devices. In fact, I could have also simply made one large partition and put both the program executables and the database files all in one spot, however for personal druthers I decided not to do this.
I went ahead and recorded the exact steps I went through to partition, format, and mount my drives for Oracle. If you would like to see what I did, go here.
A single developer license of Oracle 8.0.5.1 is available free of charge from Oracle at http://technet.oracle.com/tech/linux/main.htm (At least this is true as of the date of this writing, August 8 '99). There is various documentation available both in PDF and HTML form also at http://technet.oracle.com/doc/linux.htm. If you experience problems downloading the software, read my notes on the subject.
If you are running RedHat Linux 6.0, or any Linux version which uses the Glibc 2.1 libraries (don't worry if you don't know what that means), you will need an update called "glibcpatch.tgz". Without this, installation may fail and you will be left scratching your head wondering what the heck a "Segmentation fault" is. Oracle 8.0.5 was written to the Glibc 2.0 libraries and it breaks in the new Linux environment which has the newer (and improved) 2.1 libraries. The patch is available via FTP at ftp://ftp.oracle.com/pub/www/otn/linux/glibcpatch.tgz.
In addition to glibcpatch for Redhat, you may need to get these compat RPM's and install them as well (if they aren't installed, the glibcpatch may not run properly):
You can get these from ftp://ftp.redhat.com/pub/redhat/redhat-6.0/i386/RedHat/RPMS or from one of the mirror sites listed at http://www.redhat.com/mirrors.html.
(This is for those of you who are downloading the installer as an archive from Oracle. If you are installing from CD, you may skip this section.)
For this guide, I am going to put the installation software in /oracle_install
.
The glibcpatch will be placed in /oracle_install/glibcpatch
. To
start, I am going to have the files Oracle8051EE_Intel.tgz
and
glibcpatch.tgz
inside /oracle_install
.
Note: For the first steps of this, it will be necessary to log in as root
.
This installer is pretty big, too -- You will need about 650 megs of free space
in /oracle_install
.
cd /oracle_install
"tar
xzvf Oracle8051EE_Intel.tgz
". (this is a big file and will take awhile
to unpack, so be patient).mkdir glibcpatch
"cd glibcpatch
"tar xzvf ../glibcpatch.tgz
".cd ../
"
Don't run the installer just yet -- There are some initial things which will need to be done first.
In section 2 of the Oracle Install Guide, "Setting the Environment", there are a number of steps which will need be performed by the root user and then by the oracle user. This begins on page 2-1, but I will summarize below.
Important: Everything I am doing here will be using the bash shell. If you have personal preferences other than this, you will need to make the necessary adjustments to the instructions I am giving.
As the root user:userconf
utility to maintain users and groups./bin/bash
.bin
directory if you don't have one already;
Using the Linux default /usr/local/bin
is fine.oratab.sh
script using the following commands:cd /oracle_install/orainst
"export ORACLE_OWNER=oracle
" (* Or whatever you just
set the Oracle account to be)./oratab.sh
"/etc/oratab
file will
be created.chown oracle.dba /oracle
"chown oracle.dba /oracle_db
"rpm -i compat-binutils-5.2-2.9.1.0.23.1.i386.rpm
"rpm -i compat-egcs-5.2-1.0.3a.1.i386.rpm
"rpm -i compat-egcs-c++-5.2-1.0.3a.1.i386.rpm
"rpm -i compat-glibc-5.2-2.0.7.1.i386.rpm
"rpm -i compat-libs-5.2-1.i386.rpm
"As the oracle user:
umask 022
" to accomplish
this..bash_profile
file in the home directory ("~/
") as follows:
.bash_profile
script:ORACLE_BASE=/oracle
ORACLE_HOME=$ORACLE_BASE/oracle8051
LD_LIBRARY_PATH=$ORACLE_HOME/lib
ORACLE_SID=orcl
ORACLE_TERM=vt100
PATH=$PATH:$ORACLE_HOME/bin
TMPDIR=/tmp
export ORACLE_BASE ORACLE_HOME LD_LIBRARY_PATH ORACLE_SID ORACLE_TERM
PATH TMPDIR
Note: In this document, when I refer to paths such as $ORACLE_HOME/bin
,
this refers to the setting you just placed in that file above. The oracle
account's login script sets the variables which will tell both Oracle and the
Oracle Installer where you want Oracle to live, what user is the Oracle owner,
etc. Remember this!
Note: You must run the installer while logged in as the oracle account. Do Not run the installer as root!
Hopefully the installer you have matches the one I have and you can follow the screens step-by-step as I have outlined below. If something has changed, it shouldn't be a big deal and you should be able to approximate. One important lesson with the Oracle installer is to resist the temptation to let it "Create DB Objects" at the first pass. By choosing this, the installer will probably fail and leave you wondering why. One of the reasons behind this is because it will attempt to execute several programs to create the database objects. However, because of the glibc 2.0 vs. 2.1 problem I mentioned earlier, these programs will core dump and thus the installer will fail. Instead, run the installer once to install the software, then run the glibcpatch to update the software, then run the installer again to create the database objects.
Step-by-step instructions follow:cd /oracle_install/orainst
"./orainst
" to launch installercd /oracle_install/glibcpatch
"./glibcpatch.sh
"cd /oracle_install/orainst
and then ./orainst
rm -rf
/oracle
ows_sol_rel=4;
+ solaris_rel=5;
if (solaris_rel > ows_sol_rel)
Start_Server=false;
--
*** ows/3.0/install/wrb.ins~ Tue Jun
30 02:12:36 1998
--- ows/3.0/install/wrb.ins Sun Dec 27
23:39:07 1998
***************
*** 1204,1209 ****
--- 1204,1210 ----
}
ows_sol_rel=4;
+ solaris_rel=5;
if (solaris_rel > ows_sol_rel)
Start_Server=false;
--
*** ows/3.0/install/ows.ins~ Tue Jun
30 02:12:32 1998
--- ows/3.0/install/ows.ins Sun Dec 27
23:43:02 1998
***************
*** 431,436 ****
--- 431,437 ----
}
ows_sol_rel=4;
+ solaris_rel=5;
if (solaris_rel > ows_sol_rel)
Start_Server=false;
After applying the patches, you can install the product.
3.2 Post-install patches
After installation, you can apply the following patch:
*** owsctl.orig Wed Dec 30 14:55:28 1998
--- owsctl Wed Dec 30 14:56:17 1998
***************
*** 224,233 ****
OPTION="$1"
# save the option
shift
! if [ "$1" = "WRB" -o "$1"
= "wrb" -o "$1" = "-p" -o "$1" = "-e" -o "$1"
= "NCX" -o "$1" = "ncx" ]
then
$CONTROLPATH/wrbctl $OPTION $@
! elif [ "$1" = "CARTRIDGE"
-o "$1" = "cartridge" -o "$1" = "-p" ]
then
$CONTROLPATH/wrbctl $OPTION $@
else
--- 224,233 ----
OPTION="$1"
# save the option
shift
! if [ "x$1" = "xWRB" -o "x$1"
= "xwrb" -o "x$1" = "x-p" -o "x$1" = "x-e"
-o "x$1" = "xNCX" -o "x$1" = "xncx" ]
then
$CONTROLPATH/wrbctl $OPTION $@
! elif [ "x$1" = "xCARTRIDGE"
-o "x$1" = "xcartridge" -o "x$1" = "x-p" ]
then
$CONTROLPATH/wrbctl $OPTION $@
else
The patch is optional in that owsctl does work without it, but generates
some annoying errors.
4. Known problems
-
When an instance of a listener (oraweb) terminates, it sometimes coredumps.
The cause has not been investigated yet.
-
Oraweb leaves a lot of zombies. This may be related to the previous bullet.