This document describes the process of installing Oracle® 8.0.5 and Oracle® 8.0.5.1 Enterprise Edition for Linux onto a FreeBSD machine.
Make sure you have both emulators/linux_base
and
devel/linux_devtools
from the Ports Collection
installed. If you run into difficulties with these ports,
you may have to use
the packages or older versions available in the Ports Collection.
If you want to run the intelligent agent, you will
also need to install the Red Hat Tcl package:
tcl-8.0.3-20.i386.rpm
. The general command
for installing packages with the official RPM port (archivers/rpm
) is:
#
rpm -i --ignoreos --root /compat/linux --dbpath /var/lib/rpm package
Installation of the package
should not generate any errors.
Before you can install Oracle®, you need to set up a proper environment. This document only describes what to do specially to run Oracle® for Linux on FreeBSD, not what has been described in the Oracle® installation guide.
As described in the Oracle® installation guide, you need to set
the maximum size of shared memory. Do not use
SHMMAX
under FreeBSD. SHMMAX
is merely calculated out of SHMMAXPGS
and
PGSIZE
. Therefore define
SHMMAXPGS
. All other options can be used as
described in the guide. For example:
Set these options to suit your intended use of Oracle®.
Also, make sure you have the following options in your kernel configuration file:
Create an oracle
account just as you would create any other
account. The oracle
account is special only that you need to give
it a Linux shell. Add /compat/linux/bin/bash
to
/etc/shells
and set the shell for the oracle
account to /compat/linux/bin/bash
.
Besides the normal Oracle® variables, such as
ORACLE_HOME
and ORACLE_SID
you must
set the following environment variables:
Variable | Value |
---|---|
LD_LIBRARY_PATH | $ORACLE_HOME/lib |
CLASSPATH | $ORACLE_HOME/jdbc/lib/classes111.zip |
PATH | /compat/linux/bin
/compat/linux/sbin
/compat/linux/usr/bin
/compat/linux/usr/sbin
/bin
/sbin
/usr/bin
/usr/sbin
/usr/local/bin
$ORACLE_HOME/bin |
It is advised to set all the environment variables in
.profile
. A complete example is:
Due to a slight inconsistency in the Linux emulator, you need to
create a directory named .oracle
in
/var/tmp
before you start the installer.
Let it be owned by the oracle
user. You
should be able to install Oracle® without any problems. If you have
problems, check your Oracle® distribution and/or configuration first!
After you have installed Oracle®, apply the patches described in the
next two subsections.
A frequent problem is that the TCP protocol adapter is not installed right. As a consequence, you cannot start any TCP listeners. The following actions help solve this problem:
#
cd $ORACLE_HOME/network/lib
#
make -f ins_network.mk ntcontab.o
#
cd $ORACLE_HOME/lib
#
ar r libnetwork.a ntcontab.o
#
cd $ORACLE_HOME/network/lib
#
make -f ins_network.mk install
Do not forget to run root.sh
again!
When installing Oracle®, some actions, which need to be performed
as root
, are recorded in a shell script called
root.sh
. This script is
written in the orainst
directory. Apply the
following patch to root.sh
, to have it use to proper location of
chown
or alternatively run the script under a
Linux native shell.
When you do not install Oracle® from CD, you can patch the source
for root.sh
. It is called
rthd.sh
and is located in the
orainst
directory in the source tree.
The script genclntsh
is used to create
a single shared client
library. It is used when building the demos. Apply the following
patch to comment out the definition of PATH
:
本文及其他文件,可由此下載: ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/。
若有 FreeBSD 方面疑問,請先閱讀
FreeBSD 相關文件,如不能解決的話,再洽詢
<questions@FreeBSD.org>。
關於本文件的問題,請洽詢
<doc@FreeBSD.org>。