|
|
Installing Oracle 8i Solaris-Sparc
tested with Oracle 8.1.7 and Solaris 7
A. Tasks to be performed by the root user
Configure the unix kernel interprocess communication parameters to
accommodate the SGA structure of Oracle8. The database will not
start up if the system does not have adequate shared memory.
Use the ipcs command to get a list of the system's current shared
memory and semaphore segments.
1. Edit the /etc/system file to verify that the system has been
configured with enough shared memory.
# the maximum size in bytes of a single shared memory segment
set shmsys:shminfo_shmmax=4294967295
# the minimum size in bytes of a single shared memory segment
set shmsys:shminfo_shmmin=1
# the number of shared memory identifiers
set shmsys:shminfo_shmmni=100
# the maximum number of shared memory segments that can be
# attached by a process
set shmsys:shminfo_shmseg=10
# the number of semaphores in the system
set semsys:seminfo_semmns=2000
# 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
set semsys:seminfo_semmni=100
# 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)
set semsys:seminfo_semmsl=1000
# Maximum number of operations per semop call
set semsys:seminfo_semopm=100
# Maximum value of a semaphore
set semsys:seminfo_semvmx=32767
Any changes to /etc/system require a reboot.
2. Create at least 4 mount points; one for the software, and 3
for database files.
example: /usr/ora1, /usr/dbs1, /usr/dbs2, /usr/dbs3
The area where the software resides needs to be at least 600MB
in size. The areas where database files will reside will
depend on how large the database is. Several GB is probably
necessary.
3. Create unix groups for database administrators if there is
not already a group named dba, use the unix utility
groupadd to create a dba group
4. Create a unix account named oracle. The installer must be
run under this account. Use the utility useradd to create
an account named oracle; group dba; home directory can be
anything, and need not be the same as ORACLE_HOME; login
shell can be anything.
5. Create a local bin directory, such as /opt/bin or
/usr/local/bin and ensure that it is part of the user's PATH
variable. This creates a common environment for Oracle users,
and users must have execute permissions on this directory.
6. Create a temp dir where the oracle account has rwx
permisisons (i.e. /tmp)
7. Make sure root:other has ownership of /var/opt/oracle
B. Tasks to be performed as oracle user
1. Modify your .profile file in your oracle root directory
and add the following
# Base Dir for Oracle - /home/oracle is an example
ORACLE_BASE=/home/oracle
# Home Dir for Oracle - /home/oracle/8.1.7 is an example
ORACLE_HOME=/home/oracle/8.1.7
# Sets the vars to the global varspace
export ORACLE_BASE ORACLE_HOME
# The sid of the instance
ORACLE_SID=VENU
# Add the Oracle bin folder to the path
PATH=$PATH:$ORACLE_HOME/bin
# Set the Oracle Term
ORACLE_TERM=vt100
# Dir with at least 20MB free. Installer must have write
# permission.
TMPDIR=/var/tmp
# Include the Oracle lib to the path
LD_LIBRARY_PATH=$ORACLE_HOME/lib
# Unix Term
TERM=vt100
# Export vars
export ORACLE_SID PATH ORACLE_TERM TMPDIR TERM LD_LIBRARY_PATH
# Set umask
umask 022
2. Unzip the oracle archive.
$ cpio -idmv < filename
C. Installing Oracle
1. Run the oracle installer program (/runInstaller) off the
staging directory. Unfortunately, there is no text based installer
like Oracle 8. You must run the installer through X windows or a
remote X Emulator.
2. Click Next when the Welcome screen appears.
3. The source and destination paths should be populated with the
correct values. Click next
4. Enter dba for the UNIX group name. Click Next
5. The installer will now ask for you to run a scripts as root. Open a
new console (shell) and run the script in the root of where you
installed Oracle (i.e. /home/oracle/8.1.7/orainstRoot.sh) directory
as the root user (su - root). Once this is complete, click retry
on the installer.
6. Choose Oracle 8i Enterprise Edition (or Server) 8.1.7.0.0.
Click Next.
7. Click Custom when asked to choose the type of installation. Click Next.
8. Choose the components you want to install. See Oracle documents for a
description of each component. Click Next.
9. For component locations, Choose where you want the JRE to reside.
I usually accept the default, off of the ORACLE_HOME directory.
Click Next.
10. Choose the priveledged operating system groups. This should already
be set to dba and dba. Click Next.
11. Ignore the Authentication Methods options. Click Next.
12. Choose NO when asked to create a database. It most likely won't
be sufficient for your needs and may not work properly when being
created. Click Next.
13. Review the installation options you have chosen and click Install
to proceed.
14. Near the end of the installation process, a popup window will appear
telling you to run a script as root. Open a new console (shell) window
and set the ORACLE_SID variable by doing the following at the console
prompt
#ORACLE_SID=VENUS
#export ORACLE_SID
Run the root.sh script off the directory where you installed
Oracle (i.e. /home/oracle/8.1.7/root.sh). Make sure that
the ORACLE_OWNER, ORACLE_HOME, and ORACLE_SID are correct and
click enter to accept the default location. Once the script
as finished running, click OK on the oracle installer Setup
Privileges popup window.
15. The Net8 Configuration Assistant will pop up. Check the perform
typical install button. Click Next.
D. Starting the instance and creating the database
1. Log on as oracle
2. Copy the sample init.ora to init<*SID*>.ora
%cp $ORACLE_HOME/dbs/init.ora $ORACLE_HOME/dbs/init<*SID*>.ora
3. Modify the /dbs/init<*SID*>.ora to your specifications. Make
sure you change the db_name=DEFAULT to db_name=<*SID*>
and add db_block_size=4096 somewhere in the file. The CREATE DATABASE
datafile and logfile sizings are based on this block size.
4. Start servermanager and startup the instance without
mounting the database
%svrmgrl
Oracle Server Manager Release 3.1.7.0.0 - Production
Copyright (c) 1997, 1999, Oracle Corporation. All Rights Reserved.
Oracle8i Enterprise Edition Release 8.1.7.0.0 - Production
With the Partitioning option
JServer Release 8.1.7.0.0 - Production
SVRMGR> connect internal
Connected.
SVRMGR> startup nomount
ORACLE instance started.
Total System Global Area 4590000 bytes
Fixed Size 51632 bytes
Variable Size 4243456 bytes
Database Buffers 204800 bytes
Redo Buffers 90112 bytes
SVRMGR>
5. Create your database using the following template
# Calculated CREATE DATABASE statement
# By Tom Dyess
#
# Calculated for 4096 blocksize
# datafile is approx 1G and grows in 1G increments
# logfile is approx 250M
###########################################################
create database <*SID*>
controlfile reuse
maxinstances 4
maxlogfiles 8
archivelog
datafile '$ORACLE_HOME/dbs1/<*SID*>_syst_01.dbf'
SIZE 1024000K reuse AUTOEXTEND ON NEXT 1024000K MAXSIZE UNLIMITED
logfile
'$ORACLE_HOME/dbs2/<*SID*>_redo_01.dbf'
SIZE 266240K reuse,
'$ORACLE_HOME/dbs2/<*SID*>_redo_02.dbf'
SIZE 266240K reuse,
'$ORACLE_HOME/dbs2/<*SID*>_redo_03.dbf'
SIZE 266240K reuse;
6. Run the following command to create your system catalog
SVRMGR>@$ORACLE_HOME/rdbms/admin/catalog.sql
7. Run the following command to create your tablespaces
SVRMGR> create tablespace rollback
datafile '$ORACLE_HOME/dbs2/<*SID*>_roll_01.dbf'
size 256000K reuse autoextend on next 256000K maxsize unlimited;
SVRMGR> create tablespace temp
datafile '$ORACLE_HOME/dbs2/<*SID*>_temp_01.dbf'
size 128000K reuse autoextend on next 128000K maxsize unlimited;
SVRMGR> create tablespace users
datafile '$ORACLE_HOME/dbs3/<*SID*>_user_01.dbf'
size 640000K reuse autoextend on next 640000K maxsize unlimited;
SVRMGR> create public rollback segment rbs01 tablespace rollback
storage (initial 32000K next 32000K maxextents unlimited optimal 64000K);
SVRMGR> create public rollback segment rbs02 tablespace rollback
storage (initial 32000K next 32000K maxextents unlimited optimal 64000K);
SVRMGR> create public rollback segment rbs03 tablespace rollback
storage (initial 32000K next 32000K maxextents unlimited optimal 64000K);
SVRMGR> create public rollback segment rbs04 tablespace rollback
storage (initial 32000K next 32000K maxextents unlimited optimal 64000K);
SVRMGR> alter rollback segment rbs01 online;
SVRMGR> alter rollback segment rbs02 online;
SVRMGR> alter rollback segment rbs03 online;
SVRMGR> alter rollback segment rbs04 online;
7. Run the following commands to finish creating your instance
SVRMGR>connect system/manager
SVRMGR>@$ORACLE_HOME/rdbms/admin/catdbsyn.sql;
SVRMGR>connect internal
SVRMGR>@$ORACLE_HOME/rdbms/admin/catproc.sql;
SVRMGR>connect system/manager
SVRMGR>@$ORACLE_HOME/sqlplus/admin/pupbld.sql;
8. Replace tags with <* *> with your sid name, hostname, and
oracle home in the listener.ora file usually in
$ORACLE_HOME/network/admin
# Installation Generated Net8 Configuration
# Version Date: Jun-17-97
# Filename: Listener.ora
#
LISTENER =
(ADDRESS_LIST =
(ADDRESS= (PROTOCOL= IPC)(KEY= VENUS))
(ADDRESS= (PROTOCOL= IPC)(KEY= PNPKEY))
(ADDRESS= (PROTOCOL= TCP)(Host=<*HOSTNAME*>)(Port= 1521))
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME= <*SID*>world)
(ORACLE_HOME= <*ORACLE_HOME*>)
(SID_NAME = <*SID*>)
)
(SID_DESC =
(SID_NAME = extproc)
(ORACLE_HOME = <*ORACLE_HOME*>)
(PROGRAM = extproc)
)
)
STARTUP_WAIT_TIME_LISTENER = 0
CONNECT_TIMEOUT_LISTENER = 10
TRACE_LEVEL_LISTENER = OFF
8. Replace tags with <* *> with your sid name, hostname, and
oracle home in the tnsnames.ora file, also usually in
$ORACLE_HOME/network/admin
<*SID*>.world =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS =
(COMMUNITY = tcp.world)
(PROTOCOL = TCP)
(Host = <*HOSTNAME*>)
(Port = 1521)
)
(ADDRESS =
(COMMUNITY = tcp.world)
(PROTOCOL = TCP)
(Host = <*HOSTNAME*>)
(Port = 1526)
)
)
(CONNECT_DATA = (SID = <*SID*>)
)
)
*** You're done. To start the database do the following in
SVRMGRL
SVRMGR>connect internal
SVRMGR>shutdown
SVRMGR>startup
You can connect to the database like this
(with oracle account) from a terminal
$sqlplus system/manager
|
|
|
|
|
|
|
|
Page Views
|
|
338 today
|
|
2,750 yesterday
|
|
74,891 last month
|
|
13,238,863 total
|
|
|
|