MandrakeUser.Org - Your Mandrake-Linux Knowledge Base!


 
 

*DocIndex - Utils & Apps

Installing Oracle 9i on Mandrake 8.1

* As described by Ben Gidley
* As described by Joseph J. Flynn

Revision / Modified: May 14, 2002
Author: Ben Gidley, John J. Flynn (remove numbers to send mail)

 

* As described by Ben Gidley

Installing Oracle 9i on Mandrake Linux is a little more complex than on other distributions due to the version on binutils that comes with Mandrake Linux, however this is easily got round.

To install you'll need

You should be able to follow the Oracle quick install guide for Linux except for the following issues.

Binutils

Mandrake comes with binutils 2.11 which is incompatible with Oracles installer. To fix this simply extract, compile and install Binutils using

  • tar -xzvf binutils-2.10.1.tar.gz
  • cd binutils-2.10.1
  • ./configure
  • make
  • as root: make install

This will install 'binutils' in '/usr/local/bin' (this is deliberate).

If any of these steps fail you are probably missing some development libraries. The error message should give you a clue.

Next issue these commands as 'root':

  • cd /usr/bin
  • mv ld ld.new
  • cp /usr/local/bin/ld ./

This temporarily replaces ld 2.11 with ld 2.10.

Java

If you do not have the sun JVM simply get the RPM version from java.sun.com and run the binary.

  • ./j2sdk-1_3_1_01-linux-i386-rpm.bin

This will extract the JVM RPM. To install, use

  • rpm -ivh j2sdk-1_3_1_01-linux-i386.rpm

You may want to add Java to the path.

Install it

Once this is done, run the Oracle installer as the Oracle user (see the Oracle install guide). You can put Oracle anywhere you like, I suggest '/opt/oracle/'.

* section index * top

Post Installation Issues

Java Support

The Oracle installer does not set up a listener for JVM in the database. To do so, edit your '$ORACLE_HOME/network/admin/listener.ora'. You need to add the section about GIOP (be careful about brakets)

:
# LISTENER.ORA Network Configuration File:
# /opt/oracle/product/9.0.1/network/admin/listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = YOUR_HOSTNAME)(PORT = 1521))
)
)
(DESCRIPTION =
(PROTOCOL_STACK=
(PRESENTATION = GIOP)
(SESSION = RAW)
)
(ADDRESS = (PROTOCOL = TCP) (HOST = YOUR_HOSTNAME )(PORT = 2481))
)
)

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /opt/oracle/product/9.0.1)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = YOURDB.WORLD)
(ORACLE_HOME = /opt/oracle/product/9.0.1)
(SID_NAME = YOURDB)
)
)

Test this by running lsnrctl stop, then lsnrctl start.

Setting up a service

You need to copy 'dbora' from '$ORACLE_HOME/bin' to '/etc/rc.d/init.d'.

To have it started automatically at boot, run this command as root:

  • chkconfig dbora on

Edit the '/etc/oratab' and put Y next to any DB instances you want to start on boot.

Restoring Binutils

If you want your system to work as intended by Mandrake, you need to restore 'ld' from binutils 2.11. So, as root:

  • cd /usr/bin
  • mv ld.new ld

Any questions etc you can contact me (remove numbers, no spam please). If you have problems I suggest looking at the Oracle 9i on Unix manual as this has tons of information in it.

* section index * top

* As described by Joseph J. Flynn

Load Mandrake 8.1 out of the box and perform an update of all packages except the kernel using the Mandrake Software Update tool.
After doing this I have the following versions of packages:

  • kernel 2.4.8-26 (don't update using software manager)
  • glibc 2.2.4-9.1
  • glibc-devel 2.2.4-9.1
  • gcc 2.96-0.62
  • gcc-cpp 2.96-0.62
  • binutils 2.11.90.0.8-5
  • libbinutils2

Manually install the egcs compatability libs. These are needed if you want to compile programs using the Pro*C precompiler. This step may not be needed for all distributions but is needed for Mandrake 8.1.

I have the following partitions and sizes

  • / 500 M 22% used
  • /usr 3.1 G 56% used
  • /home 1.4 G 4% used
  • /opt 4.4 G 85% used <--- this is where I installed oracle
  • /data 10 G 49% used <--- I made an XFS filesystem to get greater than 2 gig files
  • /db_data 30G x% used <--- this is where I plan on putting all of my oracle tables
  • swap 1.5 gig <--- dont skimp on this I think this is a minimum
  • real memory = 384 Meg

Download Blackdown's JDK 118_v3 and just untar it somewhere convenient. We will need this just for the Oracle install.

Check kernel parameters according to the install guide. I needed to change shmmax and sem. See attached file set_shmmax. Put this file in the /etc/init.d directory and then activate the file by using the 'Mandrake Control Center -> System -> Services' application, finding 'set_shmmax' and clicking the 'boot' box. If you don't reboot before the oracle install, also hit the 'start' button for this.

Create a temporary temp directory (does that sound redundant) with at least 400 M of free space. Set the TEMP, TMP and TMPDIR env vars according to instructions. I put this in Oracle's .bash_profile since I kept forgetting about them. See later section on the env vars.

Make a mount point for oracle software ('/opt/oracle') that has at least 3.8 Gig free.

Create 'dba', 'oper' and 'oinstall' user groups.

Create an 'oracle' user with 'oinstall' primary group and 'dba' secondary group.

Change 'apache' to have a primary group of 'oinstall' and an 'apache' secondary group.

Set necessary environment variable for the Oracle install. See .bash_profile. Note that I could not set the NLS_LANG env var as stated in the documentation. This caused problems with sqlplus.

Mount the install CD to a new mount point. Dont use the '/mnt/cdrom' mount point that is in the fstab since this gives permission problems in the install. Manually mount it as root (mkdir /mnt/newcd; chmod 777 /mnt/newcd; mnt /dev/hdc /mnt/newcd). Keep this shell around since we'll need to manually umount/mount for each disk.

Run the installer under GNOME and make sure the Num Lock key is not on. It is not an understood problem, but the issue with the 'next' key not working is corrected by making sure the num-lock key is not on. I cannot even begin to understand why this is true.

Specifics for the Oracle install:

The first time you install any Oracle product it will ask you for the place for the ora-inventory as well as to run a script as root. The path should already be set according to the env vars in /bash_profile. I will use 'sbsfev' for 'should be set from env vars' in the rest of this document.

Pick the user group to own the products: oinstall.

Source and destination sbsfev.

Choose to install the Enterprise Edition. This takes about 3.6 Gig of disk space.

I used the Transaction Processing template for my initial database. I first used general and had a hanging problem on disk 2. I am not sure if it was due to general or not but the TP template was more suited to my needs anyway so I switched.

Pick a SID sbsfev and a global database name. The global database name is usually just the SID.your.domain.com.

I used the default character set. I had a problem with the NLS_LANG env var. This may be related.

Point to the jdk118_v3 that we downloaded earlier (ie /opt/jkd118_v3)

Hit the 'install' button and wait around a while. If you don't have enough swap this will hang forever somewhere on the three disks. The progress bar does not give much info. If you want to know what is happening do a tail -f $ORACLE_BASE/oraInventory/logs/installActions.log.

You will need to manually umount and mount each disk.

You will get a link error after all of the copying and unpacking has been done somewhere in disk 3. Leave the error message up on the screen and go edit the '$ORACLE_HOME/bin/genclntsh' script. Blank out the LD_SELF_CONTAINED env var. Save and execute the script. Hit the retry button on the installer. The alternative approach to this involves downgrading the binutils but that seemed to get awfully messy to me. (thanks to a post from Helmut Seruega for this fix)

After the install is done and the sample database has been installed you will have consumed about 3.7 Gig in '/opt/oracle'.

Install the client. This only consumed an additional couple of hundred k not the 400 Meg it says.

To get the Pro*C compiler to work I needed to add the path to the include directory from egcs in the '$ORACLE_HOME/precomp/admin/pcscfg.cfg' (I forget the exact path/file now). Go to '/usr/lib' and do a find . -name stddef.h -print . This will show the include path that you must add to the 'pcdsfds.cfg' (I need to get the exact file name) file. Use the egcs version.

Put the start script in your '/etc/init.d' and use the Mandrake Control Center to activate dbora (like the setshmmax file). I heard that there was a copy of dbora in '$ORACLE_HOME/bin' but I haven't looked at it. You might want to compare/contrast.

Set the 'start database' flag to "Y" in the /etc/oratab file for each SID you want to start with dbora.

(clean ups and corrections to come. e-mail me with any comments, problems or corrections please9the_flynns_pa9@hotmail.com, remove numbers )

 
Legal: All texts on this site are covered by the GNU Free Documentation License. Standard disclaimers of warranty apply. Copyright LSTB (Tom Berger) and Mandrakesoft 1999-2002.