The Open Source Swiss Army Knife

/sql_servers/oracle/
/sql_servers/oracle/ + sub-categories
http://www.sirfsup.com/
web directory content
    
      

Not logged in
Chat Register Login
return to:  http:/www.sirfsup.com      /sql_servers   /oracle 
Permalink: linux_db_install.htm
Title: add
article options : please login   |  print view

9i for linux

downloading the 3 *.cpio.gz files, unzipping them in /tmp. from there, following instructions in the documentation. RH 8.0

the 3 *.cpio.gz files consumed about 1.8G of space; the installation took 3.5G out of my home directory. I have /home on a 5G partition and /tmp on another 5G partition, with 20G to the disk.

apparently selecting the defaults in dbca will create a database over 1.75 Gb in size. how I know is that when trying to create a second one it said I didn't have enough space, and I had 1.3GB.

also, there are shared memory problems on a 1GB mem machine trying to simultaneously run 2 databases.

  1. links (references)
  2. preinstalltion steps
  3. installation steps
  4. post-install steps

links

link to install site.
link to suse-oracle list
oracle.com
when download 9i, follow links to documentation. There's important docs not shipped with 9i datbase download

pre-installation steps

  1. users
  2. jre: problem solved by selecting 'custom' at selecting install type stage
  3. shared memory

users

installed as joe, wouldn't let me install as root. also, do not run Disk1/runInstaller run instead Disk1/install/linux/runInstaller. Since previous to install had not made joe a member of OSPR and other group, had to make oracle a member of wheel group. Installation will fail if go ahead like this; still fail. Need follow documentation, adding groups dba,oper, and oinstall and users oracle and dba to perform install as requested:

users and their groups and purposes
oracle
groups: oinstall wheel users dba oper
purpose:execute runInstaller
dba
groups: dba wheel users oper
purpose: run database, but not do the install -- that's the job of oracle user
root
groups: (the usual!!)
purpose:set groups and users up (i.e. oracle)

there are in the final analysis the following users on my system:

the following sample .bash_profile is from http://oracle9i.freeshell.org/:

export BASH_ENV=$HOME/.bashrc
PATH=/usr/local/jdk118_v3/bin:$PATH:
ORACLE_HOME=$ORACLE_BASE/product/9.0.1.0.0
ORACLE_SID=o9i
DISPLAY=:0.0
LANG=en_US
export ORACLE_BASE ORACLE_HOME ORACLE_SID LANG
PATH=$PATH:$ORACLE_HOME/bin:
export PATH
CDPATH=:.:$ORACLE_BASE:
export CDPATH

it's easier than sourcing oraenv and coraenv

jre

recommended for linux is Blackdown JRE 1.1.8 v3 port. That was used to load installer. oracle depends thereafter, meaning the dbca and management server, at least, on its own jre. selecting the custom option allows to choose another directory besides ORACLE_HOME/oracle.swd.jre/ for these files.

select custom, do the detailed steps. It then could load jre under ORACLE_HOME. Otherwise, the jre was a tangle of bash scripts.

the jre is not an executable, but an environment of *.so files and scripts to resolve paths for the linker (canonical or not).

shared memory configuration

quote from docuemntation:

Oracle9i uses UNIX resources such as shared memory, swap memory, and semaphore extensively for interprocess communication. If your parameter settings are insufficient for Oracle9i, then you will experience problems during installation and instance startup.
.. which is what happened. Please understand that it's not an underestimation! without setting this gobbledy-gook it WILL NOT RUN!

see the documentation, and the script in this directory: oracle.sh.txt.

also:

image=/vmlinuz
append="mem=63m"
root=/dev/hda2
label=linux

remember need to reboot to reclaim the shared memory

    other references:
  1. http://linuxperf.nl.linux.org/general/kerneltuning.html: how to set them in sem.h; must then follow with a kernel recompile
  2. http://ps-ax.com/shared-mem.html

kernel memory parameters can be seen with ipcs -l and ipcs.

installation steps

  1. runInstaller
  2. dbca
  3. oracle management server

runInstaller

oracle home = /home/u01 (this is the default)

"An oracle 9i database is uniquely identified by a Global Database Name, typically of the form "name.domain" . Enter the Global Database Name for this database." (will be used when after copying of files to ORACLE_HOME, dbca is run to create that database)

do not forget global database name and SID need them to run . oraenv to be able to run sql*plus and SRVMGR so they are very important! ---> Global Database Name: db.sirfsup.com

"A database is referenced by at least one Oracle9i instance which is uniquely identified from any other instance on this computer by an Oracle System Identifier (SID). A suggested SID has been entered which you can accept or change to a value you prefer."

---> SID: db

Database File Location

"For best database organization and performance, Oracle recommends installing database files and Oracle software on separate disks. The database software should be installed in Oracle Home on one disk, and the database content including datafiles, control files, and redo logs should reside on a different disk.

---> Directory for Database files: /home/u01/oradata

Database Character Set

"Use unicode (al32utf8) as the character set"

Summary

Oracle9i Database 9.2.0.1.0

  • global settings :
    • oracle home: as above
    • source: /f/Disk1/stage/products.jar
    • installation type: standard edition
  • product languages : english,german,japanese,korean
  • space requirements
    • required 1.78 GB: available 7.23 GB
    • / required 91MB (as temporary space) : available 2.10 GB
  • New INstallations (187 products)
---> all 187 newly installed products listed
---> Install ..........
---> you can find a log of this install session at /f/oraInventory/logs/installActions2002-08-04_07-19-06PM.log

nonSSL mode: http://www:777
SSL mode:www:7788
https://www:4443

dbca

just won't fly. got ora error 27123, there are problems starting up the instance; dbca must start an instance to create the database.

spent time adjusting kernel shared memory parameters; see above, pre-installation

dbca default file placement
datafiles
ORACLE_HOME/oradata/DB_NAME
controlfile
ORACLE_HOME/oradata/DB_NAME
redo log files
ORACLE_HOME/oradata/DB_NAME
other values from dbca time
global database name
db.sirfsup.com
SID
db
server parameters file name
ORACLE_HOME/dbs/spfiledb.ora
passwords
sys
sys
system
system

after setting sys and system passwords it exits, with: "note all database accounts except scott,sys,system and dbsnmp are locked"

dba       1512  0.0  0.1  4592 1444 pts/1    S    03:00   0:00 -bash
dba       1796  0.1  0.2  8232 2864 pts/1    S    03:03   0:01 vim linux_install.htm
oracle    2336  0.0  0.7 333960 7776 ?       S    03:09   0:00 ora_pmon_db
oracle    2338  0.0  0.7 335236 8112 ?       S    03:09   0:00 ora_dbw0_db
oracle    2340  0.0  0.7 338372 7896 ?       S    03:09   0:00 ora_lgwr_db
oracle    2342  0.0  0.7 333368 7220 ?       S    03:09   0:00 ora_ckpt_db
oracle    2344  0.0  2.0 333340 20812 ?      S    03:09   0:00 ora_smon_db
oracle    2346  0.0  0.9 333320 9816 ?       S    03:09   0:00 ora_reco_db
oracle    2348  0.0  0.9 333320 10120 ?      S    03:09   0:00 ora_cjq0_db
oracle    2350  0.2  1.6 333416 17316 ?      S    03:09   0:02 ora_qmn0_db
oracle    2352  0.0  0.6 333900 6236 ?       S    03:09   0:00 ora_s000_db
oracle    2354  0.0  0.6 333780 6620 ?       S    03:09   0:00 ora_d000_db
oracle    3481  0.0  0.1  3192 1208 pts/2    R    03:22   0:00 ps -aux

and here's another take on it:

oracle    5175  0.0  1.2 25296 12788 ?       S    01:01   0:01 kdeinit: konsole -icon konsole -miniicon konsole
oracle    5177  0.0  0.1  4816 1512 pts/1    S    01:01   0:00 /bin/bash
oracle   14691  0.0  0.0  1388  496 pts/1    S    01:15   0:00 ./runInstaller
oracle   14692  7.4  7.8 221344 80876 pts/1  S    01:15   3:07 /home/joe/jre/1.3.1/bin/i386/native_threads/java -Doracle.ins
oracle   26383  0.0  0.3 13452 3428 pts/1    S    01:37   0:00 /home/u01/bin/tnslsnr LISTENER -inherit
oracle   26387  0.0  0.1  4308 1072 pts/1    S    01:37   0:00 /bin/sh /home/u01/bin/dbca -createDatabase -templateName New_
oracle   26391  4.9  2.6 106060 27472 pts/1  S    01:37   0:50 /home/u01/oracle.swd.jre/bin/../bin/i686/green_threads/jre -D
oracle   27219  0.0  0.4 12620 5068 pts/1    S    01:46   0:00 /home/u01/bin/sqlplus -S
oracle   27223  0.0  0.7 321668 7724 ?       S    01:46   0:00 ora_pmon_orcl
oracle   27229  0.0  0.7 322020 7556 ?       S    01:46   0:00 ora_dbw0_orcl
oracle   27231  0.0  0.7 325164 7328 ?       S    01:46   0:00 ora_lgwr_orcl
oracle   27233  0.0  0.6 321044 7080 ?       S    01:46   0:00 ora_ckpt_orcl
oracle   27235  0.0  0.6 321000 6280 ?       S    01:46   0:00 ora_smon_orcl
oracle   27237  0.0  0.6 321000 6248 ?       S    01:46   0:00 ora_reco_orcl
oracle   27239  0.0  0.6 321000 6256 ?       S    01:46   0:00 ora_cjq0_orcl
oracle   27241  0.0  0.6 321000 6244 ?       S    01:46   0:00 ora_qmn0_orcl
oracle   27243  0.0  0.6 321612 6236 ?       S    01:46   0:00 ora_s000_orcl
oracle   27245  0.0  0.6 321492 6620 ?       S    01:46   0:00 ora_d000_orcl
oracle   27246 77.8  1.5 326280 15824 ?      R    01:46   6:09 oracleorcl (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
oracle   27862  1.0  1.2 25408 13056 ?       S    01:53   0:00 kdeinit: konsole -icon konsole -miniicon konsole
oracle   27864  0.0  0.1  4804 1484 pts/2    S    01:53   0:00 /bin/bash
oracle   28001  0.0  0.1  3196 1212 pts/2    R    01:54   0:00 ps -aux
[oracle@www oracle]$

oracle management server

username:dba
pass: dba
service: no database created yet so no SID; aborted

note at this stage still hadn't changed kernel shared memory parameters; didn't bother to return to this tool as I'm not sure what it does.

post-install

  1. port numbers
  2. miscellaneious
  3. /etc/oratab
  4. tnsnames.ora
  5. automation of startup/shutdown

port numbers

ftp and webdav:8080
changed to 8081
http: 8082

miscellaneous

  • Edit /home/u01/dbs/init.ora to suit needs
  • lsnrctl start listener
  • lsnrctl status
  • Edit /home/u01/hxs/admin/tnsnames.ora

/etc/oratab

this file is one of the most-important for starting the instance, as mentioned in startup.htm.

this file is updated by dbca, and is described in its header

after changing shared memory parameters, instance started and dbca creates a database, it looks like this:

# This file is used by ORACLE utilities.  It is created by root.sh
# and updated by the Database Configuration Assistant when creating
# a database.

# A colon, ':', is used as the field terminator.  A new line terminates
# the entry.  Lines beginning with a pound sign, '#', are comments.
#
# Entries are of the form:
#   $ORACLE_SID:$ORACLE_HOME::
#
# The first and second fields are the system identifier and home
# directory of the database respectively.  The third filed indicates
# to the dbstart utility that the database should , "Y", or should not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
#
#
# *:/home/u01:N
#*:/home/u01:N
# *:/home/u01:Y
# *:/home/u01:N
*:/home/u01:Y
db:/home/u01:N
the multiple entries are from dbca failing to start instance.

the successful entry is the last one

tnsnames.ora

ORACLE_HOME/bin/dbstart
error generated:
ORA-12162: TNS:service name is incorrectly specified
/home/u01/network/admin/samples/tnsnames.ora
/home/u01/hs/admin/tnsnames.ora.sample
# This is a sample tnsnames.ora that contains the NET8 parameters that are
# needed to connect to an HS Agent
hsagent =
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))
(CONNECT_DATA=(SID=hsagent))
(HS=)
)
quote
On Sun, Jul 16, 2000 at 08:10:49PM +0200, Toens Bueker wrote:
> Jetzt habe ich mir mal eine der Oracle-Versionen
> installiert
Hast Du dabei das Oracle Linux Installation FAQ beachtet? Man kann nicht
einfach so 'ne Oracle Version ziehen und auspacken sondern muss gleich ein
paar Patches draufpatschen, sonst wird das nix.
P.S. http://platforms.oracle.com/linux/ und dort dann FAQ's...

as if to reemphasize the points about the importance of setting kernel memory parameters, after fixing those, this cryptic error message "12162" disappeared; which is to say "no problems here after fixing shared memory kernel parameters".


Leave a Reply
Your Name:     anonymous
Your Email:
Website:  
Comments:

The author will be notified of your reply.
return to top