Oracle Linux Howto
Oracle Linux Howto
1
by
M.B.G.Suranga De Silva
([email protected])
1) Install Redhat Advanced Server 2.1 with X and GNOME and KDE
3) Use disk druid to partition as follows (In this case 20GB Hard disk)
/ 5GB
/boot 128MB
/tmp 1GB
/usr 7GB
/home 4GB
swap 2*RAM
4) Under package group selection you must select "Software Development" along with
GNOME and KDE
5) Install binutils following version as follows (This rpm is given in your CD). The
binutils version of RH Advanced Server 2.1 is binutils-2.11.90.0.8-12 you must
upgrade it to binutils-2.11.90.0.8-13 to avoid relinking error while installation.
[root@suranga root]#mount /mnt/cdrom
[root@suranga root]#cd /mnt/cdrom
[root@suranga cdrom]#cp binutils-2.11.90.0.8-13.i386.rpm /root
[root@suranga root]#rpm -Uvh --force binutils-2.11.90.0.8-13.i386.rpm
First, you will need to create the Oracle installation and users and groups. Oracle
installation needs two Unix user groups and one runtime Oracle user.
1
Log in as root and issue the following commands in a terminal:
[root@suranga root]# groupadd dba
[root@suranga root]# groupadd oinstall
[root@suranga root]# useradd -g oinstall -G dba oracle
[root@suranga root]# passwd oracle
The last command will prompt you to enter the password for your oracle user. Make sure
you remember it, because you will
7) Creating Directories
Just make sure you have at least 3.5GB available for a full installation including one
database, and issue the following commands as root:
You have now created Oracle runtime directories and granted write privileges to user
oracle and execute privileges to group dba.
# oracle 9i
export ORACLE_BASE=/opt/ora9
export ORACLE_HOME=/opt/ora9/product/9.2
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/Apache/Apache/bin:$PATH
export ORACLE_OWNER=oracle
export ORACLE_SID=sura
export ORACLE_TERM=xterm
# Edit paths
export LD_LIBRARY_PATH=/opt/ora9/product/9.2/lib:$LD_LIBRARY_PATH
export PATH=/opt/ora9/product/9.2/bin:$PATH
2
note:=
To install 9iR2 on Linux, Oracle recommends at least 512MB of RAM and at least
400MB of swap space. If you have less then
512MB of RAM and upgrading is not an option, you can resize your swap partition or
create temporary swapping space.
Now that you have all the major obstacles out of the way, you can run the installer.
Please remember that the Oracle
installer must be run from X. You will need to allow the local oracle user to write to your
X display:
Do not change to your CD-ROM mount directory (e.g., /mnt/cdrom), because you will
not be able to unmount the first CD to
insert others when asked. Start the installer from your home directory using:
Under database configuration select software only and give "sura" as the name of the
database.
3
makesure to install the old binutils as follows ( this rpm is also given in the CD ). You
must install old binutils before creating database.
you can use dbca utility to create "sura" database which is located in
$ORACLE_HOME/bin as follows
[oracle@suranga root]#$ORACLE_HOME/bin/dbca
I created my database manually by copying the initsura.ora and dbca.sql in /suradb folder.
You can find my scripts in the
Important***
Now we are going to create the password file, for that open another prompt and type su -
oracle
4
[oracle@suranga oracle]#orapwd file=$ORACLE_HOME/dbs/orapwsura
password=suranga
SQL>@/suradb/dbca.sql
SQL>@/$ORACLE_HOME/rdbms/admin/catalog.sql
SQL>@/$ORACLE_HOME/rdbms/admin/catproc.sql
SQL>@/$ORACLE_HOME/rdbms/admin/catexp.sql
SQL>shutdown immediate
$ORACLE_HOME/network/admin/tnsnames.ora
$ORACLE_HOME/network/admin/listener.ora
#####################Here is my
$ORACLE_HOME/network/admin/tnsnames.ora######################
SURA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost.localdomain)(PORT =
1521))
)
(CONNECT_DATA =
5
(SERVER = DEDICATED)
(SERVICE_NAME = sura)
)
)
db18 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost.localdomain)(PORT =
1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = db18)
)
)
INST1_HTTP =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost.localdomain)(PORT =
1521))
)
(CONNECT_DATA =
(SERVER = SHARED)
(SERVICE_NAME = MODOSE)
(PRESENTATION = http://HRService)
)
)
####################Here is my
$ORACLE_HOME/network/admin/listener.ora#######################
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost.localdomain)(PORT =
1521))
)
)
6
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /opt/ora9/product/9.2)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = sura)
(ORACLE_HOME = /opt/ora9/product/9.2)
(SID_NAME = sura)
)
(SID_DESC =
(GLOBAL_DBNAME = db18)
(ORACLE_HOME = /opt/ora9/product/9.2)
(SID_NAME = db18)
)
)
########################################################################
##########
Connecting to
(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost.localdomain)(PO
RT=1521)))
7
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 9.2.0.1.0 - Production
Start Date 30-DEC-2004 10:27:40
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security OFF
SNMP OFF
Listener Parameter File /opt/ora9/product/9.2/network/admin/listener.ora
Listener Log File /opt/ora9/product/9.2/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=orasura.jic.com)(PORT=152
1)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "db18" has 1 instance(s).
Instance "db18", status UNKNOWN, has 1 handler(s) for this service...
Service "sura" has 1 instance(s).
Instance "sura", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
8
Variable Size 109051904 bytes
Database Buffers 25165824 bytes
Redo Buffers 667648 bytes
Database mounted.
Database opened.
SQL>
If the listener is successful means, you can connect from any PC in the network with
Enterprise Manager Console. I used my windows PC to connect to the oracle server as
follows.
The following parameters I have given in Add Database To Tree under Navigator of
OEM.
After this you can successfully connect your database as sys / sysdba with the password
you have given above.
/////HERE IS MY initsura.ora
9
########################################################################
###
###
# Copyright (c) 1991, 2001, 2002 by Oracle Corporation
########################################################################
###
###
###########################################
# Cache and I/O
###########################################
db_block_size=8192
db_cache_size=25165824
db_file_multiblock_read_count=16
###########################################
# Cursors and Library Cache
###########################################
open_cursors=300
###########################################
# Database Identification
###########################################
db_domain=""
db_name=sura
###########################################
# Diagnostics and Statistics
###########################################
background_dump_dest=/suradb/sura
core_dump_dest=/suradb/sura
timed_statistics=TRUE
user_dump_dest=/suradb/sura
###########################################
# File Configuration
###########################################
control_files=("/suradb/control01.ctl", "/suradb/CONTROL02.ctl",
"/suradb/CONTROL03.ctl")
###########################################
# Instance Identification
###########################################
instance_name=sura
###########################################
# Job Queues
###########################################
job_queue_processes=10
###########################################
# MTS
###########################################
10
dispatchers="(PROTOCOL=TCP) (SERVICE=orcl1XDB)"
###########################################
# Miscellaneous
###########################################
aq_tm_processes=1
compatible=9.2.0.0.0
###########################################
# Optimizer
###########################################
hash_join_enabled=TRUE
query_rewrite_enabled=FALSE
star_transformation_enabled=FALSE
###########################################
# Pools
###########################################
java_pool_size=33554432
large_pool_size=8388608
shared_pool_size=50331648
###########################################
# Processes and Sessions
###########################################
processes=150
###########################################
# Redo Log and Recovery
###########################################
fast_start_mttr_target=300
###########################################
# Security and Auditing
###########################################
remote_login_passwordfile=EXCLUSIVE
###########################################
# Sort, Hash Joins, Bitmap Indexes
###########################################
pga_aggregate_target=25165824
sort_area_size=524288
###########################################
# System Managed Undo and Rollback Segments
###########################################
undo_management=AUTO
undo_retention=1
undo_tablespace=UNDOTBS
/////HERE IS MY dbca.sql
11
LOGFILE GROUP 1('/suradb/sura/redo01.log') SIZE 100M,
GROUP 2('/suradb/sura/redo02.log') SIZE 100M,
GROUP 3('/suradb/sura/redo03.log') SIZE 100M
MAXLOGFILES 5
MAXLOGMEMBERS 5
MAXLOGHISTORY 1
MAXDATAFILES 100
MAXINSTANCES 1
CHARACTER SET US7ASCII
NATIONAL CHARACTER SET AL16UTF16
DATAFILE '/suradb/sura/system01.dbf' SIZE 325M
UNDO TABLESPACE UNDOTBS
DATAFILE '/suradb/sura/UNDOTBS.dbf'
SIZE 200M REUSE AUTOEXTEND ON NEXT 5120K MAXSIZE UNLIMITED;
12