Oracle 8i (8.1.7) Installation for SUN-Solaris

 Last update of this article: 15-Jul-01 / Diego Pafumi

The following, short Installation Guide shows how to install Oracle 8.1.7 for SUN Solaris 2.6 / 2.7. We suggest this way and NOT using DBASSIST. Use DBASSIST only to generate a template script, because some important INITSID.ora values are wrong and may lead to a poorly tuned database.

 For our installation, we used the following ORACLE_HOME and ORACLE_SID, please adjust these parameters for your own environment.

 ORACLE_HOME = /oracle/8.1.7
 ORACLE_SID = SOL3

Check Hardware Requirements

 To determine the amount of RAM memory installed on your system, enter the following command.
 $ /usr/sbin/prtconf | grep size
 

Operating System Software Requirements

Use the latest kernel patch from Sun Microsystems. Solaris 2.6 requires at least kernel jumbo patch revision #105181-15 for successful installation of Release 2 (8.1.7).

 - Download the Patch from: http://sunsolve.sun.com
 - Read the README File included in the Patch
 - Usually the only thing you have to do is:

 $ cd <patch cluster directory>
 $ ./install_custer
 $ cat /var/sadm/install_data/<luster name>_log
 $ showrev -p
 Reboot the system

 To determine the bytes of SWAP space, enter this command and multiply the block columns by 512:
 $ swap -l

 To determine your current operating system information:
 $ uname -a

 To determine which operating system patches are installed:
 $ showrev -p

 To determine which operating system packages are installed:
 $ pkginfo -i [package_name]

 To determine if your X-windows system is working properly on your local system, but you can redirect the X-windows output to another system.
 $ xclock

 To determine if you are using the correct system executables:
 $ /usr/bin/which make
 $ /usr/bin/which ar
 $ /usr/bin/which ld
 $ /usr/bin/which nm

 Each of the four commands above should point to the /usr/ccs/bin directory. If not, add /usr/ccs/bin to the beginning of the PATH environment variable in the current shell.

Java Runtime Environment (JRE)
The JRE shipped with Oracle8i is used by Oracle Java applications such as the Oracle Universal Installer is the only one supported. You should not modify this JRE, unless it is done through a patch provided by Oracle Support Services. The inventory can contain multiple versions of the JRE, each of which can be used by one or more products or releases. The Installer creates the oraInventory directory the first time it is run to keep an inventory of products that it installs on your system as well as other installation information. The location of oraInventory is defined in /var/opt/oracle/oraInst.loc. Products in an ORACLE_HOME access the JRE through a symbolic link in $ORACLE_HOME/JRE to the actual location of a JRE within the inventory. You should not modify the symbolic link.
The Solaris 2.6 following patches are required or recommended for JRE 1.1.8_10
 
 
Patch ID Description Required or Recommended?
106040-11 X Input and Output Method patch Required (OK)
105181-15 Kernel patch Required (OK)
105284-25 Motif Runtime Library Patch Recommended (OK)
105490-07 Dynamic linker patch Recommended (OK)
105633-21 OpenWindows 3.6: Xsun patch (1) Recommended (OK)
105568-13 Libthread patch Recommended (OK)
105210-19 LibC patch Recommended (OK)
105669-07 CDE 1.2: libDTSvc patch (dtmail) Recommended (OK)
107636-01 X Input and Output Method patch Required
106980-05 Libthread patch Recommended
107607-01 Motif fontlist, fontset, libxm Recommended
107078-10 Open Windows 3.6.1 Xsun patch (1) Recommended

Check Software Limits
 Oracle8i Release 3 (8.1.7) includes native support for files greater than 2 GB. Check your shell to determine whether it will impose a limit.
 To check current soft shell limits, enter the following command:
 $ ulimit -Sa

 To check maximum hard limits, enter the following command:
 $ ulimit -Ha

 The file (blocks) value should be multiplied by 512 to obtain the maximum file size imposed by the shell. A value of unlimited is the operating system default and is the maximum value of 1 TB.
 

Setup the Solaris Kernel
Notes:
1. Use the "sysdef" command to get the current values of configurable kernel parameters.
2. Issue "boot -r" command after editing the /etc/system for the new values to take effect.

Setting parameters too high for the operating system can prevent the machine from booting up. Refer to Sun Microsystems Sun SPARC Solaris system administration documentation for parameter limits.

 Use the ipcs command to get a list of the system's current shared memory and semaphore segments.

 Kernel Parameters on our SUN Enterprise with 640MB for Oracle 8.1.7
 
Value
Description
set shmsys:shminfo_shmmax=4,294,967,295 the maximum size in bytes of a single shared memory segment (0.5 * Physical Memory) Higher than the size of largest SGA on that machine 
Cantidad máxima de memoria compartida. Siempre mayor que el máximo tamaño de SGA de las instancias del sistema. En este caso se sugiere 1 Giga aunque suele ser común tener 4 Gigas.El valor dado a este parámetro NO significa que se reserve esta cantidad de memoria al arranque del sistema, es el máximo límite que se permite "pedir" a los procesos en concepto de memoria compartida
set shmsys:shminfo_shmmin=1 the minimum size in bytes of a single shared memory segment
Tamaño mínimo de un segmento compartido (normalmente 1).
set shmsys:shminfo_shmmni=100 the number of shared memory identifiers on system
Identificadores de memoria compartida por cada segmento ligado a un proceso.
set shmsys:shminfo_shmseg=20 the maximum number of shared memory segments that can be attached to a process
Número total de segmentos de memoria compartida por proceso
set semsys:seminfo_semmni=100 the number of semaphore set identifiers in the system. This parameter determines the number of semaphore sets that can be created at any one time
Número total de conjuntos de semáforos disponibles en el sistema y determina el número de semáforos que se pueden crear de una vez. Se necesita un identificador por cada conjunto de semáforos.
set semsys:seminfo_semmsl=200 the maximum number of semaphores that can be in one semaphore set. This parameter should be equal to the maximum number of Oracle processes (PROCESSES in initsid.ora)
Número total de semáforos en cada conjunto. Debe ser como el mayor valor de "processes" de las instancias. Oracle intenta reservar un sólo conjunto con los semáforos de los procesos
set semsys:seminfo_semmns=250 max number of semaphores in the system *
Número de identificadores por cada conjunto de semáforos. 
Se puede calcular sumando el valor del parámetro "processes" del init.ora, más los procesos propios de la instancia (DBWR, LGWR, SMON,PMON, etc...), más el número de semáforos usados por procesos "no-oracle" como el sistema, las diferentes aplicaciones, etc. Un ejemplo puede ser 100 + 5 + 50.
set semsys:seminfo_semopm=100 Max numberof operations per semop call
set semsys:seminfo_semvmx=32767 Semaphore Max Value

* Set to the sum of the PROCESSES parameter for each Oracle database, adding the largest one twice, then add an additional 10 for each database. For example, consider a system that has three Oracle instances with the PROCESSES parameter in their initsid.ora files set to the following values:

ORACLE_SID=SOL1, PROCESSES=100
ORACLE_SID=SOL2, PROCESSES=100
ORACLE_SID=SOL3, PROCESSES=200
The value of SEMMNS is calculated as follows:
            SEMMNS = [(A=100) + (B=100)] + [(C=200) * 2] + [(# of instances=3) * 10] = 630

Any changes to /etc/system require a reboot with -r option!
 

Create Unix Group «dba»
$ groupadd -g 400 dba
$ groupdel dba

Create Unix User «oracle»
$ useradd -u 400 -c "Oracle DBA" -d /export/home/oracle -g "dba" -m -s /bin/ksh oracle

Setup ORACLE environment ($HOME/.profile) as follows
# Setup ORACLE environment
ORACLE_HOME=/oracle/8.1.7; export ORACLE_HOME
ORACLE_BASE
ORACLE_SID=SOL3; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
TNS_ADMIN=/export/home/oracle/config/8.1.7; export TNS_ADMIN
NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1; export NLS_LANG
ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data; export ORA_NLS33
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/openwin/lib
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/dt/lib:/usr/ucblib:/usr/local/lib
export LD_LIBRARY_PATH

# Set up the search paths:
PATH=/bin:/usr/bin:/usr/sbin:/opt/bin:/usr/ccs/bin:/opt/local/GNU/bin
PATH=$PATH:/opt/local/bin:/opt/NSCPnav/bin:$ORACLE_HOME/bin
PATH=$PATH:/usr/local/samba/bin:/usr/ucb:.
export PATH

# CLASSPATH must include the following JRE location(s):
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib

 

Create mount points for Oracle and all the directories

Create mount points for the Oracle software and the Oracle database. Each mount point should correspond to a separate physical device or set of devices. You’ll need at least one mount point. Typically you use one mount point for the Oracle software and as many as you can afford for each database. (More physical devices allow better performance.) A nice convention is to call the mount points /u01, /u02, and so on. Because mount points are typically owned by root and the Oracle installer will run as the oracle user and not root, you should create some subdirectories now to avoid permissions problems later. Create an app subdirectory below the software mount point, and oradata subdirectories below the mount points to be used for databases. (You can put software and a database on the same mount point if you wish.) Make these subdirectories owned by the oracle user and dba group, and give them 755 permissions.

Choose a directory that the Oracle software will refer to as the “local bin” directory. A common choice is /usr/local/bin, and your installation will go more smoothly if you stick with this choice. Make sure this directory is on users’ path by default.

Create the /var/opt/oracle directory and make it owned by the oracle user. After installation, this directory will contain a few small text files that briefly describe the Oracle software installations and databases on the server. These commands will create the directory and give it appropriate permissions:
      mkdir /var/opt/oracle
      chown oracle:oinstall /var/opt/oracle
      chmod 755 /var/opt/oracle

Install from CD-ROM
Set your DISPLAY variable to the IP address of your X server plus the X server and screen numbers. If you are working from a workstation (and not the console of the database server where you are installing Oracle) do not accidentally set the DISPLAY variable to the IP address of your database server. I set my DISPLAY variable as follows:
      export DISPLAY=myworkstation:0.0

If you downloaded a trial version of Oracle off of the internet, then untar the distribution. If you have the software on CD ROM, then mount the CD ROM now. Most Solaris systems will automatically mount CDs, but alternatively you can use a command like:
      mount -r -F hsfs device_name /cdrom

Usually the CD-ROM will be mounted automatically by the Solaris Volume Manager, if not, do it as follows as user root.

$ su root
$ mkdir /cdrom
$ mount -r -F hsfs /dev/.... /cdrom
exit or CTRL-D

Setup Response File for Silent Install (Recommended)
Edit the Installer Response File, we used the file: svrtypical.rsp as a template. This File can be found on the CD-ROM: <cdrom_mount_point>/stage/Response. Please verify (customize) the file for your environment. You can find our Response File here.

Check oraInst.loc File
 If you used Oracle 8.1.5 before on your system, then you must edit the Oracle Inventory File, located in /var/opt/oracle.
 #Oracle Installer Location File Location (/var/opt/oracle/oraInst.loc)
 inventory_loc=/oracle/8.1.7/oraInventory

Install with Response File
Install Oracle 8i with customized Response File: svrtypical.rsp as User «oracle». We suggest to start runInstaller in the foreground, therefore remove the "&" from runInstaller at the end of the file.
$ cd /cdrom/oracle8i
$ DISPLAY=<Any X-Window Host>:0.0
$ export DISPLAY
$ ./runInstaller -silent -responseFile \
   /export/home/oracle/config/8.1.5/svrtypical.rsp

Watch the File $ORACLE_HOME/oraInventory/logs/installActions.log. At the end of the Installation, check the file: $ORACLE_HOME/oraInventory/logs/silentInstall.log
 silentInstall2000-01-17_04-23-52-PM.log

A configuration script needs to be run as root before installation can proceed. Please leave this window up, go run /oracle/8.1.6/root.sh as root from another window, then come back here and click OK to continue.The installation of Oracle8i Enterprise Edition was successful.
 

Start root.sh as «root»
 Start the script root.sh as User «root». Note that the File /var/opt/oracle/oratab is not used in the High Availabilty Environment.
$ su root
$ cd $ORACLE_HOME
$ ./root.sh

Setup Listener for Oracle 8i
Create the necessary log- and config directories. Set ORACLE_HOME to the new location. Setup the Net8 Files: listener.ora, tnsnames.ora and sqlnet.ora.
$ cd $ORACLE_HOME
$ mkdir sqlnet
$ cd sqlnet
$ mkdir config log
$ cd config

Start / Stop and check the listener
 It is very important that the listener works correctly.
$ lsnrctl
LSNRCTL> start LSNRSOL3
LSNRCTL> service LSNRSOL3

Check that listener starts without an error, check that listener is running.
$ ps -ef | grep tns

Create the Database
Edit and save the CREATE DATABASE File initSOL3.sql in $ORACLE_HOME/dbs, or create a symbolic-Link from $ORACLE_HOME/dbs to your Location.
 initSOL3.ora -> /export/home/oracle/config/8.1.5/initSOL3.ora
$ svrmgrl
SVRMGR> @initSOL3.sql

Check the Logfile, then stop and start the Database
$ svrmgrl
SVRMGR> @shutdown immediate
SVRMGR> startup

Create own DB-Create Script (optional)
You can generate your own DB-Create Script using the Tool: $ORACLE_HOME/bin/dbassist.
To start the Database automatically on Boot-Time, create or use our Startup Scripts dbora and lsnrora (included in ALL_FILES.tar.gz), which must be installed in /etc/init.d. Create symbolic Links from the Startup Directories in /etc (e.g. /etc/rc2.d).

lrwxrwxrwx 1 root root S99dbora -> ../init.d/dbora*
lrwxrwxrwx 1 root root S99lsnrora -> ../init.d/lsnrora*
 

Kernel and Init.ora Parameters
The following table documents Unix kernel parameters that should be monitored and possibly increased after changes are made to the related init.ora parameter.  Please check with your Operating System documentation for specific details on the parameter changes.
 
Init.ora Parameter Unix Kernel Parameter 
db_block_buffers shmmax
db_files (maxdatafiles) nfile, maxfiles 
large_pool_size shmmax
log_buffer shmmax
processes nproc, semmsl, semmns 
shared_pool_size shmmax

 

Complete the Server Configuration

These steps complete the configuration of your server for smooth Oracle operation. These steps could have been performed earlier, but are more straightforward if performed after a database has been created. In this section we will configure the server to start the database and Net8 listener automatically whenever the server is rebooted, change the oracle user’s login script to eliminate hardcoding, and create individual operating system accounts for each database user.

  1. Edit the /var/opt/oracle/oratab file to verify that the entry for your database is correct. Each non-comment line contains the name of one Oracle instance, its ORACLE_HOME, and a Y or N. A Y indicates that the database should be started automatically on server reboot, and an N indicates that it should not. The three fields should be separated by colons. A sample /var/opt/oracle/oratab file looks like this:
          #
          # /var/opt/oracle/oratab
          # ======================
          #
          DEMO:/u01/app/oracle/product/8.1.7:Y
  2. Edit the login file (.profile or .bashrc) for the oracle user to eliminate hardcodings and call the oraenv script to set the environment instead. The following will work with Bourne shell, Korn shell, or Bash:
          # Settings for Oracle environment
          ORACLE_SID=DEMO   # Put your instance name here
          ORAENV_ASK=NO
          export ORACLE_SID ORAENV_ASK
          . oraenv
    Note that this script assumes that the local bin directory (/usr/local/bin) is on your path. Also, if you use C shell then you should edit .cshrc and have it source coraenv.
  3. Create separate Unix accounts for DBAs and database users who will log onto the database server directly. You should only log in as oracle when installing or patching software. The Unix accounts for DBAs should be members of the dba group, and other users should not be members of the dba group. Give each of these accounts a login file like oracle’s so that their environment initializes correctly when they log in.
  4. To make the database and Net8 listener start up automatically when the server reboots and shut down automatically when the server shuts down, you’ll need to create a dbora file in /etc/init.d and link it to /etc/rc2.d and /etc/rc0.d. You’ll need to do this as the root user. First create a file called dbora in /etc/init.d as follows:
          #!/bin/sh
          ORA_HOME=/u01/app/oracle/product/8.1.7 
          ORA_OWNER=oracle
          if [ ! -f $ORA_HOME/bin/dbstart ]
          then
            echo "Oracle startup: cannot start"
            exit
          fi
          case "$1" in
             'start') # Start the Oracle databases and Net8 listener
                      su - $ORA_OWNER -c "$ORA_HOME/bin/dbstart" &
                      su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl start" &
                      # Next line for Oracle 8.1.7 only
                      su - $ORA_OWNER -c "$ORA_HOME/Apache/Apache/bin/apachectl start"
                      ;;
             'stop')  # Stop the Oracle databases and Net8 listener
                      su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl stop" &
                      su - $ORA_OWNER -c "$ORA_HOME/bin/dbshut" &
                      # Next line for Oracle 8.1.7 only
                      su - $ORA_OWNER -c "$ORA_HOME/Apache/Apache/bin/apachectl stop"
                      ;;
          esac
    
    After creating the dbora file, you need to link it to /etc/rc2.d and /etc/rc0.d:
          ln -s /etc/init.d/dbora /etc/rc2.d/S99dbora
          ln -s /etc/init.d/dbora /etc/rc0.d/K10dbora
    Note that this script starts the Apache HTTP server as the oracle user, which is not a good idea from the standpoint of security. Oracle recommends that you run the Apache HTTP server from a very restricted Unix user, such as the orapache user we created earlier. Unfortunately, you might find that doing so leads to file permission problems. Another option would be to start the Apache HTTP server as the root user and have it hand off ownership to the orapache user and orapache group by setting the User and Group parameters in the Apache configuration file $ORACLE_HOME/Apache/Apache/conf/httpd.conf.

References:
Note:1010913.6 - Unix Configuration Parameters: Where to set Semaphores and Shared Memory
Note:1008866.6 - How to determine SGA Size (7.x, 8.0, 8i)
Note:1012819.6 - Operation System Tuning issues on Unix
Note:1011658.6 - Shared Memory requirements on Unix