From owner-freebsd-doc Wed Oct 2 1:30:15 2002 Delivered-To: freebsd-doc@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 135F137B401 for ; Wed, 2 Oct 2002 01:30:05 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 793F743E6E for ; Wed, 2 Oct 2002 01:30:04 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id g928U4Co000881 for ; Wed, 2 Oct 2002 01:30:04 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id g928U4br000880; Wed, 2 Oct 2002 01:30:04 -0700 (PDT) Date: Wed, 2 Oct 2002 01:30:04 -0700 (PDT) Message-Id: <200210020830.g928U4br000880@freefall.freebsd.org> To: freebsd-doc@FreeBSD.org Cc: From: Khorev Sergey Subject: RE: docs/42058: Documentation: Installing Oracle 8i onto FreeBSD Reply-To: Khorev Sergey Sender: owner-freebsd-doc@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR docs/42058; it has been noted by GNATS. From: Khorev Sergey To: 'Giorgos Keramidas' Cc: "'bug-followup@FreeBSD.org'" Subject: RE: docs/42058: Documentation: Installing Oracle 8i onto FreeBSD Date: Wed, 2 Oct 2002 12:40:04 +0400 In order to submit the right patch: Index: chapter.sgml =================================================================== RCS file: /home/ncvs/doc/en_US.ISO8859-1/books/handbook/linuxemu/chapter.sgml,v retrieving revision 1.76 diff -u -r1.76 chapter.sgml --- chapter.sgml Thu Aug 29 14:35:44 2002 +++ chapter.sgml Tue Sep 10 10:48:57 2002 @@ -925,6 +925,323 @@ + + + + + Sergey + Khorev + Contributed by + + + + + Installing Oracle 8i + + + applications + Oracle + + + + Preface + This document describes the process of installing Oracle 8iR3 (8.1.7) for + Linux onto a machine running FreeBSD 4.5-RELEASE + + + + Installing the Linux Environment + + Make sure you have both linux_base-6.1 and + linux_devtools-6.1 packages installed. Also the file + /compat/linux/etc/mtab must exist. Without it the installer fails. + + &prompt.root; cp /etc/fstab /compat/linux/etc/mtab + + You need to download and install Linux JDK-1.1.8 from + ftp.blackdown.org. + + &prompt.root; tar xjfC jdk118_v3-glibc-2.1.3.tar.bz2 /compat/linux/usr/ + &prompt.root; cd /compat/linux/usr/jdk118_v3/ + &prompt.root; ln -s . linux + &prompt.root; echo echo i686 > /compat/linux/bin/arch + &prompt.root; chmod +x /compat/linux/bin/arch + &prompt.root; cd /compat/linux/usr/ + &prompt.root; mkdir local + &prompt.root; mkdir local/bin + &prompt.root; cd local + &prompt.root; ln -s ../jdk118_v3/ java + + + + + Creating the Oracle Environment + + Before you can install Oracle, you need to set up a proper + environment. You should read and understand the Oracle installation guide. + + + Kernel Tuning + kernel tuning + + 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: + + # System V shared memory and tunable parameters +options SYSVSHM # include support for shared memory +options SHMMAXPGS=16384 # max amount of shared memory pages (4k on i386) +options SHMMAX="(SHMMAXPGS*PAGE_SIZE+1)" + # max shared memory segment size (bytes) +options SHMMIN=2 # min shared memory segment size (bytes) +options SHMMNI=100 # max number of shared memory identifiers +options SHMSEG=10 # max shared memory segments per process + +# System V semaphores and tunable parameters +options SYSVSEM # include support for semaphores +options SEMMNI=100 # number of semaphore identifiers in the system +options SEMMSL=61 # max number of semaphores per id +options SEMMNS=61 # number of semaphores in the system +options SEMOPM=101 # max number of operations per semop call + +# System V message queues and tunable parameters +options SYSVMSG # include support for message queues + + Set these options to suit your intended use of Oracle. + + + + + + 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. + &prompt.root; pw groupadd -n dba + &prompt.root; pw useradd oracle -g dba -m -s /compat/linux/bin/bash + + + + Environment + + According to Oracle's installation guide you are to + set some environment variables. Here Oracle is installed in /ora and + FORA is a name of the database. The LANG is unsetted to avoid problems + with the installer. The best place + to set them is /home/oracle/.profile: + ORACLE_BASE=/ora; export ORACLE_BASE +ORACLE_HOME=$ORACLE_BASE/app; export ORACLE_HOME +LD_LIBRARY_PATH=$ORACLE_HOME/lib; export LD_LIBRARY_PATH +ORACLE_SID=FORA; export ORACLE_SID +PATH=/compat/linux/bin:/compat/linux/sbin:/compat/linux/usr/bin +PATH=$PATH:/compat/linux/usr/sbin:/bin:/sbin:/usr/bin:/usr/sbin +PATH=$PATH:/usr/local/bin:$ORACLE_HOME/bin +export PATH +umask 022 +unset LANG + + + + + Installing Oracle + + First of all you need to patch the installation. It can be done in two ways: + + + Copying the entire Oracle distribution to writable media. + + + Copying some installation files: + &prompt.root; cp -r /cdrom/Disk1/runInstaller /cdrom/Disk1/install . + + + Either way a patch must be applied to runInstaller: + 34c34 +< THREADS_FLAG=native +--- +> THREADS_FLAG=green + The install/oraparam.ini may be patched in two various fashions + + + 5c5 +< JRE_LOCATION=../stage/Components/oracle.swd.jre/1.1.8/1/DataFiles/Expanded/l inux +--- +> JRE_LOCATION=/compat/linux/usr/jdk118_v3 + + + + 3c3 +< SOURCE=../stage/products.jar +--- +> SOURCE=/cdrom/Disk1/stage/products.jar +5,6c5,6 +< JRE_LOCATION=../stage/Components/oracle.swd.jre/1.1.8/1/DataFiles/Expanded/l inux +< OUI_LOCATION=../stage/Components/oracle.swd.oui/1.7.1.8.0/1/DataFiles/Expand ed +--- +> JRE_LOCATION=/compat/linux/usr/jdk118_v3 +> OUI_LOCATION=/cdrom/Disk1/stage/Components/oracle.swd.oui/1.7.1.8.0/1/DataFi les/Expanded + + + + + + To start the installation you need to be running X Windows. + Running as the oracle user, issue the following command: + + &prompt.user; ./runInstaller + The second way to correct source file location + On the next screen set UNIX group name to dba. + When prompted, run the script orainstRoot.sh under root account + + When selecting products to install, do not choose Enterprise Manager - + it's rather unstable even under Linux. You may also deselect + Oracle HTTP server, Product Options, and Java Products. + + Deselection of too many products may cause the installer to fail. + + Also choose to NOT use the database configuration assistant. + + + + Patching root.sh + + When installing Oracle, some actions, which need to be performed + as root, are recorded in a shell script called + root.sh. Apply the + following patch to root.sh, to have it use the proper command locations of + commands. Before running the script be sure the proper values + of ORACLE_HOME and ORACLE_SID were set. + + 7c7 +< CHOWN="/bin/chown" +--- +> CHOWN="/usr/sbin/chown" +9c9 +< TEST="/usr/bin/test" +--- +> TEST="/bin/test" +86c86 +< AWK=/bin/awk +--- +> AWK=/usr/bin/awk +88c88 +< CHOWN=/bin/chown +--- +> CHOWN=/usr/sbin/chown +92,93c92,93 +< GREP=/bin/grep +< LBIN=/usr/local/bin +--- +> GREP=/usr/bin/grep +> LBIN=/compat/linux/usr/local/bin +98c98 +< SED=/usr/local/bin/sed +--- +> SED=/usr/bin/sed +101c101 +< TEST=/usr/bin/test +--- +> TEST=/bin/test + + + + + Running Oracle + + When you have followed the instructions, you should be able to run + Oracle as if it were run on Linux + itself. Also, you can then patch Oracle to version 8.1.7.3. + + Quick Running Oracle + For those who are new to Oracle and want to + quickly test installation, perform those steps as the oracle user + + + &prompt.user; cd $ORACLE_HOME/dbs; cp init.ora initFORA.ora + Then edit initFORA.ora to set values: + db_name=FORA +control_files = (/ora/data/FORA/ctl1.dbf, /ora/data/FORA/ctl2.dbf) + + + &prompt.user; svrmgrl + SVRMGR> connect internal + SVRMGR> startup nomount + SVRMGR> CREATE DATABASE FORA +LOGFILE GROUP 1 ('/ora/data/FORA/log1.dbf') size 1M, +GROUP 2 ('/ora/data/FORA/log2.dbf') size 1M NOARCHIVELOG CHARACTER SET CL8KOI8R +DATAFILE '/ora/data/FORA/system1.dbf' size 50M autoextend on; + SVRMGR> @$ORACLE_HOME/rdbms/admin/catalog.sql + SVRMGR> @$ORACLE_HOME/rdbms/admin/catproc.sql + SVRMGR> CREATE TABLESPACE users DATAFILE '/ora/data/FORA/users1.dbf' +SIZE 20M AUTOEXTEND ON; + SVRMGR> CREATE TEMPORARY TABLESPACE temp TEMPFILE '/ora/data/FORA/temp1.dbf' +SIZE 10M AUTOEXTEND ON; + SVRMGR> CREATE USER scott IDENTIFIED BY tiger DEFAULT TABLESPACE users +TEMPORARY TABLESPACE temp; + SVRMGR> GRANT CONNECT, RESOURCE TO scott; + SVRMGR> CREATE TABLESPACE rbs DATAFILE '/ora/data/FORA/rbs1.dbf' +SIZE 5M AUTOEXTEND ON; + SVRMGR> CREATE ROLLBACK SEGMENT rbs01 TABLESPACE rbs; + SVRMGR> ALTER ROLLBACK SEGMENT rbs01 ONLINE; + SVRMGR> ALTER ROLLBACK SEGMENT rbs01 ONLINE; + SVRMGR> connect system/manager + SVRMGR> @$ORACLE_HOME/sqlplus/admin/pupbld.sql + SVRMGR> connect scott/tiger + SVRMGR> @$ORACLE_HOME/sqlplus/admin/demobld.sql + + + + Edit $ORACLE_HOME/dbs/initFORA.ora: + compatible = 8.1.0 +rollback_segments = (rbs01) + + + Now you should be able to connect to Oracle and select from + demonstration tables: + &prompt.user; sqlplus scott/tiger + SQL> SELECT DNAME, ENAME FROM EMP, DEPT +WHERE EMP.DEPTNO=DEPT.DEPTNO; + + + + Since starting Network Configuration Assistant fails, you need to + configure the network manually. You may start from these sample files + (place all of them in $ORACLE_HOME/network/admin/) + + # this is sqlnet.ora +NAMES.DIRECTORY_PATH=(TNSNAMES, ONAMES, HOSTNAME) +# listener.ora +LISTENER = + (ADDRESS_LIST= + (ADDRESS=(PROTOCOL=tcp)(HOST=freehome)(PORT=1521)) + (ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY))) + +SID_LIST_LISTENER= + (SID_LIST= + (SID_DESC= + (GLOBAL_DBNAME=FORA) + (SID_NAME=FORA) + (ORACLE_HOME=/ora/app) + ) + ) +# tnsnames.ora +FORA=(DESCRIPTION= + (ADDRESS=(PROTOCOL=TCP)(HOST=freehome)(PORT=1521)) + (CONNECT_DATA=(SID=FORA)) + ) + Now you should be able to start the listener: lsnrctl start + and connect through network: sqlplus scott/tiger@FORA. + + + + + + + + To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message