| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Successful Oracle install under Linux - My recipe
The following is a procedure I put together for installing the SCO
version of
Oracle on Linux. The version of Oracle CD I installed was:
SCO Unix
Release 7.3.2.1.0
Open Server 5.0
The version of Linux I installed it on was:
Slackware 3.3
Linux kernel 2.0.30
The machine I'm using is:
HP Pavilion 7330Z
166 Mhz Pentium
32MB Ram
2.5G Hard drive
This procedure resulted in a fully functional (as far as I can tell)
Oracle
installation including all utilities and SQL*Net for IPC and TCP/IP
protocols.
I have not been able to develop applications for Oracle because the
Linux version of ld does not understand the SCO coff format object files
in the Oracle libraries. If anyone could help with this I would be most
appreciative.
Please feel free to contact me with comments and/or questions. If you
can't
get this procedure to work for you I will do my best to help out but,
basically this information is worth exactly what you paid for it, and I
can't
promise it will work for you.
Good luck,
Bob Withers
bwit_at_pobox.com
Install the Database
groupadd dba
adduser
3) Create a home directory for user oracle. This will also be the value
assigned to ORACLE_HOME.
mkdir /usr/oracle
mkdir /usr/oracle/7.3.2.1.0
chown -R oracle:dba /usr/oracle
4) Edit /etc/profile and add/modify the following:
Add:
export ORACLE_HOME=/usr/oracle/7.3.2.1.0
export ORACLE_SID=orcl
export ORACLE_TERM=vt100
Modify export PATH to add $ORACLE_HOME/bin
5) Login as user oracle.
6) Copy all install CD files to the oracle home directory.
cp -r /cdrom/* .
7) Uncompress all CD files just copied.
find . -name *_ -exec ~/orainst/oiuncomp {} \;
8) Mark the oracle shadow process to run setuid 'oracle'
chmod u+s $ORACLE_HOME/bin/oracle
9) Make a copy of init.ora for the orcl SID and modify it:
cd $ORACLE_HOME/dbs
cp init.ora initorcl.ora
Add the following line:
db_name = orcl
Find the line "ifile = ora_system:initps.ora" and comment it out
by placing a # at the beginning.
connect internal
set echo on
spool makedb.log
create database orcl
maxinstances 1
maxlogfiles 8
datafile '/usr/oracle/7.3.2.1.0/dbs/sysorcl.dbf' size 20M
reuse
logfile
'/usr/oracle/7.3.2.1.0/dbs/redo01orcl.dbf' size 4M reuse,
'/usr/oracle/7.3.2.1.0/dbs/redo02orcl.dbf' size 4M reuse,
'/usr/oracle/7.3.2.1.0/dbs/redo03orcl.dbf' size 4M reuse;
@rdbms/admin/catalog.sql
create rollback segment r0 tablespace system
storage (initial 16k next 16k minextents 2 maxextents 20);
alter rollback segment r0 online;
create tablespace users
datafile
'/usr/oracle/7.3.2.1.0/dbs/usersorcl.dbf' size 40M reuse
default storage
(
initial 1M
next 1M
pctincrease 0
minextents 9
maxextents 50
);
create rollback segment r1 tablespace users
storage (optimal 9M);
alter rollback segment r1 online;
connect system/manager
@rdbms/admin/catdbsyn.sql
connect internal
@rdbms/admin.catproc.sql
connect system/manager
@sqlplus/admin/pupbld.sql
spool off
cd
svrmgrl
connect internal
startup nomount
@makedb
exit
A log of all activity will be placed in $ORACLE_HOME/makedb.log
sqlplus system/manager
create user <user> identified by <psw> default tablespace
users;
exit
Supply your own <user> and <psw>.
chown root:root $ORACLE_HOME/bin/osh
chmod u+s $ORACLE_HOME/bin/osh
$ORACLE_HOME/guicommon2
$ORACLE_HOME/md
$ORACLE_HOME/orainst
$ORACLE_HOME/ows
rm $ORACLE_HOME/bin/pro*
Configuring SQL*Net for TCP/IP
LISTENER =
(ADDRESS_LIST =
(ADDRESS =
(PROTOCOL=tcp)
(HOST=rebel) #<-- Use YOUR machines HOST NAME
(PORT=1521)
(COMMUNITY=UK_SUP_TCPIP)
)
(ADDRESS=
(PROTOCOL=ipc)
(KEY=700)
(COMMUNITY=UK_SUP_IPC)
)
# This tells the listener of DEDICATED services it can connect you to
#
SID_LIST_LISTENER=
(SID_LIST=
(SID_DESC=
(SID_NAME=orcl)
(ORACLE_HOME=/usr/oracle/7.3.2.1.0) #<-- Put YOUR $ORACLE_HOME
)
# These parameters control TRACE and LOG output - Set them to suit you
#
TRACE_LEVEL_LISTENER = OFF #<-- Set to ADMIN for tracing
#TRACE_DIRECTORY_LISTENER = /tns_admin/log #<-- Trace output goes here
TRACE_FILE_LISTENER = "listener"
#LOG_DIRECTORY_LISTENER = /tns_admin/log #<-- Log output goes here
LOG_FILE_LISTENER = "listener"
# Miscellaneous parameters
#
CONNECT_TIMEOUT_LISTENER = 10 #<-- Allow 10 seconds new
connects
STOP_LISTENER = YES DBA_GROUP = dba #<-- Put your DBA group here # PASSWORDS_LISTENER = manager #<-- Uncomment for a password # ------------------------------------------------------------------------
2) Create a tnsnames.ora file in $ORACLE_HOME/network/admin. Following
is an example:
orcl =
(
DESCRIPTION =
(ADDRESS=(PROTOCOL=IPC) (KEY=700))
(CONNECT_DATA=(SID=orcl) (SERVER=DEDICATED)) )
# Sample TCP/IP Aliases
#
orcl =
(
DESCRIPTION =
(ADDRESS=(PROTOCOL=TCP) (HOST=rebel) (PORT=1521)) #<-- Put your
HOST
(CONNECT_DATA=(SID=orcl) (SERVER=DEDICATED))
)
3) Start the Oracle TNS listener:
lsnrctl start
4) Configure your client machine tnsnames.ora file to have an entry for your
Linux box. The entry for my Win95 box looks like this:
rebel.world =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS =
(COMMUNITY = tcp.world)
(PROTOCOL = TCP)
(Host = rebel)
(Port = 1521)
)
5) You can start and stop the Oracle listener with the commands:
lsnrctl start
lsnrctl stop
For some reason the listener takes a few minutes to start, I'm
not sure why. You can find out about other lsnrctl commands by
entering:
lsnrctl help
Starting and Stopping the Database
There are utilities to start ans stop the database in the
$ORACLE_HOME/bin
directory called dbstart and dbshut. I have not been able to get them to
work. These utilities require a file, /etc/oratab, that looks like this:
orcl:/usr/oracle/7.3.2.1.0:Y
As shipped these files don't work properly because they rely on the
presence
of sqldba to determine the version of Oracle installed. You can fix them
as
follows:
vi $ORACLE_HOME/bin/dbstart
Find: "VERSION="5" and change it to "VERSION="7"
Find: "sqldba <<EOF" and change it to "svrmgrl <<EOF"
vi $ORACLE_HOME/bin/dbshut
Find: "sqldba <<EOF" and change it to "svrmgrl <<EOF"
These scripts will not work to start and stop the database. Even with
these
scripts working I chose to create my own which I called startora and
stopora.
startora:
svrmgrl <<EOF
connect internal
startup
exit
EOF
lsnrctl start
stopora:
lsnrctl stop
svrmgrl <<EOF
connect internal
shutdown
exit
EOF
Don't forget to chmod +x startora stopora.
-- Bob Withers Do or do not, there is no try. bwit_at_pobox.com YodaReceived on Sat Nov 15 1997 - 00:00:00 CST
![]() |
![]() |