From owner-freebsd-database Mon Jan 18 10:19:16 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA14699 for freebsd-database-outgoing; Mon, 18 Jan 1999 10:19:16 -0800 (PST) (envelope-from owner-freebsd-database@FreeBSD.ORG) Received: from gaia.euronet.nl (gaia.euronet.nl [194.134.0.10]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id KAA14694 for ; Mon, 18 Jan 1999 10:19:12 -0800 (PST) (envelope-from marcel@scc.nl) Received: from scones.sup.scc.nl (i042.ztm.euronet.nl [194.134.112.43]) by gaia.euronet.nl (8.8.8/8.8.8) with ESMTP id TAA01006; Mon, 18 Jan 1999 19:10:58 +0100 (MET) Received: from scc.nl (scones.sup.scc.nl [192.168.2.4]) by scones.sup.scc.nl (8.9.2/8.9.1) with ESMTP id TAA46065; Mon, 18 Jan 1999 19:10:17 +0100 (CET) (envelope-from marcel@scc.nl) Message-ID: <36A37909.9A2B15FE@scc.nl> Date: Mon, 18 Jan 1999 19:10:17 +0100 From: Marcel Moolenaar Organization: SCC vof X-Mailer: Mozilla 4.5 [en] (X11; I; FreeBSD 3.0-CURRENT i386) X-Accept-Language: en MIME-Version: 1.0 To: database@FreeBSD.ORG CC: sos@freebsd.dk, marcel@scc.nl Subject: HOWTO: Oracle for Linux on FreeBSD Content-Type: multipart/mixed; boundary="------------42C7DFD21072F24AE43E0C67" Sender: owner-freebsd-database@FreeBSD.ORG Precedence: bulk This is a multi-part message in MIME format. --------------42C7DFD21072F24AE43E0C67 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi all, It's been awhile, but I've promised to write a HOWTO on installing and running Oracle for Linux on FreeBSD. After a couple of weeks and numerous tests, I'm convinced the HOWTO is complete and sound, but more importantly, that Oracle for Linux runs without any problems on FreeBSD -current! The HOWTO should apply on both the developer release (downloadable from the Oracle TechNet site) and the CD release, although I have not experimented with the CD release. Well... That's it, actually; except that I want to thank Soren Schmidt for his feedback, support and confidence! Marcel Moolenaar SCC vof --------------42C7DFD21072F24AE43E0C67 Content-Type: text/plain; charset=us-ascii; name="RunningOracleOnFreeBSD.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="RunningOracleOnFreeBSD.txt" How to run Oracle for Linux on FreeBSD 1. Installing a Linux environment The Linux libraries and Linux development tools in the ports collection are not suitable to run Oracle. Instead, the appropriate Red hat packages are being installed. Before you install the Red hat packages, you are advised to deinstall the linux_lib and linux_devel ports. Make sure nothing is left behind in the /compat/linux directory. To install the Red hat packages, you need the Red hat Package Manager. You can find it in the misc category (/usr/ports/misc/rpm). Make sure you have initialized the RPM database. Initialize the RPM database as follows: mkdir -p /compat/linux/var/local/lib/rpm rpm --initdb --dbpath /compat/linux/var/local/lib/rpm The following packages are needed for Oracle to run. Note that the version numbers are important. Minor version differences can result in failure to install the packages. Worse, the contents of a packages can differ even if it has the same version number. I've included the md5 checksum for the packages I've been using, but that's all I can do :-( Install the packages in the order shown (or any order that respects dependencies [which is not guaranteed to be non-cyclic]): package md5 checksum -------------------------------- -------------------------------- setup-1.9.1-2.noarch.rpm 6d79ec35042e9b4b43a2f640c8c8d1e5 filesystem-1.3.1-3.noarch.rpm 9ae78dcceb23f80c41fba5ed96f0aa4e ld.so-1.9.5-7.i386.rpm 240b50efe2606407283979087938d03a ldconfig-1.9.5-3.i386.rpm 4ec6e36ad260702db7fcce6fb7d32e18 glib-1.0.1-3.i386.rpm 0211ac35d93ebc7b1b1f52400f81a587 glibc-2.0.7-17.i386.rpm de94c58d261f588ddcb3b1f709588c6d termcap-9.12.6-11.noarch.rpm 040274564e5b0c609c4c9ae6d768383d libtermcap-2.0.8-9.i386.rpm be9c0449b84c22102f65e1237e2d4e79 grep-2.2-2.i386.rpm 6369a42a9cacdb273b143688db076c7b fileutils-3.16-9.i386.rpm cdb521c066dfcb54d784dc68f997da4c bash-2.02-1.i386.rpm fe7f8a1254554083fe5090f856ecb977 libc-5.3.12-27.i386.rpm 152dc8e473d06b078cd195d33c0859b3 zlib-1.1.2-2.i386.rpm f5a2ad4ecbbb7780ec89ce07ae2997f7 ncurses-4.2-6.i386.rpm bb9366bf387a1732325bba58000e0b63 info-3.12-6.i386.rpm 4e7fe70af59c8a4f35e3f01dec9eb576 make-3.76.1-3.i386.rpm 4b001425cd44489bda51fe1c6f384982 binutils-2.9.1.0.7-1.i386.rpm e2d11591fd3de8110215d6685ba9c9ac gcc-2.7.2.3-11.i386.rpm 8f17ca42c17192b757b9586770180cbb kernel-headers-2.0.34-3.i386.rpm 11910a1b787f669eb4092082a122566e glibc-devel-2.0.7-17.i386.rpm ef341e3c8a68c36691bf249b386256fb tcl-8.0.2-17.i386.rpm 45b1391af27d06f6ed3128c87d33558a The general command for installing packages is: rpm -i --ignoreos --root /compat/linux Some packages may generate errors when you install them. We only suggest to brandelf ldconfig directly after installing the ldconfig package. Use the following command to do that: brandelf -t Linux /compat/linux/sbin/ldconfig Note that you only need the tcl package when you want to use the intelligent agent. After you have installed the above mentioned packages, you need to brandelf everything, to make sure the emulator knows they are Linux binaries: brandelf -t Linux /compat/linux/bin/* brandelf -t Linux /compat/linux/sbin/* brandelf -t Linux /compat/linux/usr/bin/* brandelf -t Linux /compat/linux/usr/sbin/* Furthermore, make some links: ln -s /compat/linux/usr/src/linux-2.0.34 /compat/linux/usr/src/linux rmdir /compat/linux/tmp; ln -s /tmp /compat/linux/tmp rmdir /compat/linux/var/tmp; ln -s /var/tmp /compat/linux/var/tmp And, last but not least, remove conflicting files: rm /compat/linux/etc/exports rm /compat/linux/etc/group rm /compat/linux/etc/passwd rm /compat/linux/etc/hosts.allow rm /compat/linux/etc/hosts.deny rm /compat/linux/etc/motd rm /compat/linux/etc/printcap rm /compat/linux/etc/protocols rm /compat/linux/etc/services rm /compat/linux/bin/df 2. Creating the Oracle environment 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. 2.1 Kernel tuning As described in the Oracle installation guide, you need to set the maximum size of shared memory. Don't use SHMMAX under FreeBSD. SHMMAX is merely calculated out of SHMMAXPGS and PGSIZE. Therefor define SHMMAXPGS. All other options can be used as described in the guide. For example: options SHMMAXPGS=10000 options SHMMNI=100 options SHMSEG=10 options SEMMNS=200 options SEMMNI=70 options SEMMSL=61 Set these options to suit your intended use of Oracle. 2.2 Oracle account 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. 2.3 Environment Besides the normal Oracle variables, such as ORACLE_HOME and ORACLE_SID you must set the following environment variables: LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/jdbc/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: ORACLE_BASE=/oracle; export ORACLE_BASE ORACLE_HOME=/oracle; export ORACLE_HOME LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/jdbc/lib; export LD_LIBRARY_PATH ORACLE_SID=ORCL; export ORACLE_SID ORACLE_TERM=386x; export ORACLE_TERM CLASSPATH=$ORACLE_HOME/jdbc/lib/classes111.zip; export CLASSPATH 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; export PATH 3. Installing Oracle When you have met all requirements as described in the installation guide and followed the instructions in this document, you should be able to install Oracle without any problems. After you have installed Oracle, apply the patches described in the next two subsections. 3.1. Patching root.sh When installing Oracle, some actions, which need to be performed as root, are recorded in a shell script called root.sh. root.sh is written in the orainst directory. Apply the following patch to root.sh, to have it use to proper location of chown: *** orainst/root.sh.orig Tue Oct 6 21:57:33 1998 --- orainst/root.sh Mon Dec 28 15:58:53 1998 *************** *** 31,37 **** # This is the default value for CHOWN # It will redefined later in this script for those ports # which have it conditionally defined in ss_install.h ! CHOWN=/bin/chown # # Define variables to be used in this script --- 31,37 ---- # This is the default value for CHOWN # It will redefined later in this script for those ports # which have it conditionally defined in ss_install.h ! CHOWN=/usr/sbin/chown # # Define variables to be used in this script When you don't install Oracle from CD, you can path the source for root.sh. It is called rthd.sh and is located in the orainst directory in the source tree. 3.2 Patching genclntsh 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: *** bin/genclntsh.orig Wed Sep 30 07:37:19 1998 --- bin/genclntsh Tue Dec 22 15:36:49 1998 *************** *** 32,38 **** # # Explicit path to ensure that we're using the correct commands #PATH=/usr/bin:/usr/ccs/bin export PATH ! PATH=/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin export PATH # # each product MUST provide a $PRODUCT/admin/shrept.lst --- 32,38 ---- # # Explicit path to ensure that we're using the correct commands #PATH=/usr/bin:/usr/ccs/bin export PATH ! #PATH=/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin export PATH # # each product MUST provide a $PRODUCT/admin/shrept.lst 4. Running Oracle When you have followed the instructions, you should be able to run Oracle as if it was run on Linux itself. Wether that is good or bad, depends on how you value Linux :-) Until we have a native FreeBSD version of Oracle supported by Oracle, I think Oracle for Linux is a good alternative. --------------42C7DFD21072F24AE43E0C67-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-database" in the body of the message From owner-freebsd-database Mon Jan 18 11:03:14 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA20611 for freebsd-database-outgoing; Mon, 18 Jan 1999 11:03:14 -0800 (PST) (envelope-from owner-freebsd-database@FreeBSD.ORG) Received: from misery.sdf.com (misery.sdf.com [204.244.213.49]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id LAA20593 for ; Mon, 18 Jan 1999 11:03:11 -0800 (PST) (envelope-from tom@sdf.com) Received: from tom by misery.sdf.com with esmtp (Exim 1.82 #3) id 102IyC-0000Xx-00; Mon, 18 Jan 1999 10:00:12 -0800 Date: Mon, 18 Jan 1999 10:00:10 -0800 (PST) From: Tom To: Marcel Moolenaar cc: database@FreeBSD.ORG, sos@freebsd.dk Subject: Re: HOWTO: Oracle for Linux on FreeBSD In-Reply-To: <36A37909.9A2B15FE@scc.nl> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Content-ID: Sender: owner-freebsd-database@FreeBSD.ORG Precedence: bulk On Mon, 18 Jan 1999, Marcel Moolenaar wrote: ... > Well... That's it, actually; except that I want to thank Soren Schmidt for > his feedback, support and confidence! Well, "LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/jdbc/lib" is rather odd. You should probably leave out $ORACLE_HOME/jdbc/lib as it only contains JDBC drivers. > Marcel Moolenaar > SCC vof Tom To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-database" in the body of the message From owner-freebsd-database Mon Jan 18 11:44:34 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA27251 for freebsd-database-outgoing; Mon, 18 Jan 1999 11:44:34 -0800 (PST) (envelope-from owner-freebsd-database@FreeBSD.ORG) Received: from gaia.euronet.nl (gaia.euronet.nl [194.134.0.10]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id LAA27222 for ; Mon, 18 Jan 1999 11:44:26 -0800 (PST) (envelope-from marcel@scc.nl) Received: from scones.sup.scc.nl (i036.ztm.euronet.nl [194.134.112.37]) by gaia.euronet.nl (8.8.8/8.8.8) with ESMTP id UAA20493; Mon, 18 Jan 1999 20:44:19 +0100 (MET) Received: from scc.nl (scones.sup.scc.nl [192.168.2.4]) by scones.sup.scc.nl (8.9.2/8.9.1) with ESMTP id UAA49127; Mon, 18 Jan 1999 20:43:45 +0100 (CET) (envelope-from marcel@scc.nl) Message-ID: <36A38EF1.FB6985C1@scc.nl> Date: Mon, 18 Jan 1999 20:43:45 +0100 From: Marcel Moolenaar Organization: SCC vof X-Mailer: Mozilla 4.5 [en] (X11; I; FreeBSD 3.0-CURRENT i386) X-Accept-Language: en MIME-Version: 1.0 To: Tom CC: database@FreeBSD.ORG Subject: Re: HOWTO: Oracle for Linux on FreeBSD References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-database@FreeBSD.ORG Precedence: bulk Tom wrote: > > On Mon, 18 Jan 1999, Marcel Moolenaar wrote: > > ... > > Well... That's it, actually; except that I want to thank Soren Schmidt for > > his feedback, support and confidence! > > Well, "LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/jdbc/lib" is rather > odd. You should probably leave out $ORACLE_HOME/jdbc/lib as it only > contains JDBC drivers. That's correct, but it is mentioned in the installation guide as necessary for JDBC. If I had left it out, someone would probably have posted a comment that I had forgotten something :-) Thanks for your feedback! marcel To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-database" in the body of the message From owner-freebsd-database Mon Jan 18 11:52:10 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA28483 for freebsd-database-outgoing; Mon, 18 Jan 1999 11:52:10 -0800 (PST) (envelope-from owner-freebsd-database@FreeBSD.ORG) Received: from misery.sdf.com (misery.sdf.com [204.244.213.49]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id LAA28390 for ; Mon, 18 Jan 1999 11:51:57 -0800 (PST) (envelope-from tom@sdf.com) Received: from tom by misery.sdf.com with esmtp (Exim 1.82 #3) id 102JjR-0000ba-00; Mon, 18 Jan 1999 10:49:01 -0800 Date: Mon, 18 Jan 1999 10:49:01 -0800 (PST) From: Tom To: Marcel Moolenaar cc: database@FreeBSD.ORG Subject: Re: HOWTO: Oracle for Linux on FreeBSD In-Reply-To: <36A38EF1.FB6985C1@scc.nl> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-database@FreeBSD.ORG Precedence: bulk On Mon, 18 Jan 1999, Marcel Moolenaar wrote: > Tom wrote: > > > > On Mon, 18 Jan 1999, Marcel Moolenaar wrote: > > > > ... > > > Well... That's it, actually; except that I want to thank Soren Schmidt for > > > his feedback, support and confidence! > > > > Well, "LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/jdbc/lib" is rather > > odd. You should probably leave out $ORACLE_HOME/jdbc/lib as it only > > contains JDBC drivers. > > That's correct, but it is mentioned in the installation guide as necessary > for JDBC. If I had left it out, someone would probably have posted a comment > that I had forgotten something :-) Well, it is wrong then. It contains no *.so files that the loader could load, only Java. It does belong in the CLASSPATH though, but you should probably do: CLASSPATH=$CLASSPATH:$ORACLE_HOME/jdbc/lib So you don't wipe it out. > Thanks for your feedback! > > marcel > > Tom To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-database" in the body of the message