Вы находитесь на странице: 1из 5

ORACLE INSTALLATION

Requried RPM's for oracle installation

binutils-2.15.90.0.1.1-32.10
gcc-3.3.3-43.34
gcc-c++-3.3.3-43.34
glibc-2.3.3-98.47
gnome-libs-1.4.1.7-671.1
libstdc++-3.3.3-43.34
libstdc++-devel-3.3.3-43.34
make-3.80-184.1
pdksh-5.2.14-780.7
sysstat-5.0.1-35.4
xscreensaver-4.16-2.6
libaio-0.3.102-1.2

To install RPM's(as root user only)

#rpm -ivh <RPM PACKAGE NAME>

To uninstall RPM'S

#rpm -e <RPM PACKAGE NAME>

To check Installed RPM'S

#rpm -q <RPM PACKAGE NAME>

To check the amount of RAM and swap space available.

# grep MemTotal /proc/meminfoMemTotal: 1034680 kB

# grep SwapTotal /proc/meminfoSwapTotal: 1534196 kB

Create the Oracle Groups and User Account

#/usr/sbin/groupadd oinstall ----Creating Oinstall Group

#/usr/sbin/groupadd dba -------------Creating DBA Group

#/usr/sbin/useradd -m -g oinstall -G dba oracleid oracle ---Creating user and assinging groups

# id oracle –Checking groups allocation

uid=501(oracle) gid=502(oinstall) groups=502(oinstall),503(dba)


Set the password on the oracle account:

# passwd oracle --Changing password for user oracle.

New password:

Retype new password:

Grant the permission for user oracle on mount points

# chown -R oracle:oinstall /disk1 ---Changing owner

# chmod -R 775 /disk1 --Changing permissions

Configuring the Linux Kernel Parameters

#vi /etc/sysctl.conf

kernel.shmall = 2097152

kernel.shmmax = 536870912

kernel.shmmni = 4096kernel.sem = 250 32000 100 128

fs.file-max = 65536

net.ipv4.ip_local_port_range = 1024 65000

net.core.rmem_default=262144

net.core.wmem_default=262144

net.core.rmem_max=262144

net.core.wmem_max=262144

esc :wq!

#/sbin/sysctl -p

Setting Shell Limits for the oracle User

Oracle recommends setting limits on the number of processes and open files each Linux account
may use. To make these changes, cut and paste the following commands as root:

#vi /etc/security/limits.conf
oracle soft nproc 2047

oracle hard nproc 16384

oracle soft nofile 1024

oracle hard nofile 65536

esc :wq!

Shared memory and semaphores are two important resources for an Oracle instance on Unix. An
instance cannot start if it is unable to allocate what it needs.

Shared memory is exactly that - a memory region that can shared between different processes.
Oracle uses shared memory for implementing the SGA, which needs to be visible to all database
sessions.

Semaphores can be thought of as flags (hence their name, semaphores). They are either on or off. A
process can turn on the flag or turn it off. If the flag is already on, processes who try to turn on the
flag will sleep until the flag is off. Upon awakening, the process will reattempt to turn the flag on,
possibly suceeding or possibly sleeping again. Such behaviour allows semaphores to be used in
implementing a post-wait driver - a system where processes can wait for events (i.e. wait on turning
on a semphore) and post events (i.e. turning of a semaphore). This mechanism is used by Oracle to
maintain concurrency control over the SGA, since it is writeable by all processes attached

SHMMAX= max value of shared memory segment = .5 * size of physical memory

SHMMIN= min size of shared memory segment=1

SHMMNI= max number of shared memory identifiers on system = 100

SHMSEG= max number of shared memory segments per process = 10

Note:Max Sga that can be created by the one segment model is SHMMAX*SHMSEG

Oracle just needs to allocate a number of semaphores equal to the processes parameter in
"init.ora".

SEMMSL= # of semaphores in a semaphore set

SEMMNI= the maximum # of semaphores sets in the system

SEMMNS= the number of semaphores in the system.

SEMOPM= max number of operations per semop call = 100

SEMVMX = semaphore max value = 32767


When an Oracle instance is started, all required semaphores will be allocated. Semaphores are
allocated in sets. Since each oracle process* requires a semaphore, the number that is allocated is
equal to the value of the init.ora parameter PROCESSES. The total # of semaphores required is the
sum of all your instance's PROCESSES. You can allocate all of your semaphores in one or more
semaphore sets. If SEMMSL=PROCESSES, then only one semaphore set is required. The
maximum # of semaphores that can be allocated will be the lesser of (SEMMSL*SEMMNI) or
SEMMNS.If SEMMSL is not equal to PROCESSES, be sure that the total # of semaphores required
(sum of PROCESSES) does not exceed the maximum (SEMMSL*SEMMNI, SEMMNS). For
example, if SEMMSL=25 and SEMMNI=10, total # of semaphores required (sum of PROCESSES)
must not exceed 250 (10 semaphore sets * 25 semaphores/set).

Logout as Root user login as oracle user

$vi /home/oracle/.bash_profile

export ORACLE_SID=devdb1
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:.

$cd /disk1/database/ --Oracle software directory.

$./runinstaller

Manual Database creation.


Set ORACLE_SID
$export ORACLE_SID=newdb10g
$cd $ORACLE_HOME/dbs
$cp init.ora init$ORACLE_SID.ora
$vi init$ORACLE_SID.ora
Note:-Add following parameters
db_name=newdb10g
control_files='PATH OF THE FILE WHERE YOU WANT CREATE'
user_dump_dest='path of udump'
background_dump_dest='path of bdump'
core_dump_dest='path of cdump'
Note:-Above dump parameters are not requried in 11g
undo_management=auto / manual
undo_retention=900 (seconds)
undo_tablespace=undotbs
Note:-Above undo parameters are not requried in 8i
$vi cr8db.sql
create database newdb10g
logfile group 1 ('/disk1/oradata/newdb10g/redo1.log') size 20M,
group 2 ('/disk1/oradata/newdb10g/redo2.log') size 20M,
group 3 ('/disk1/oradata/newdb10g/redo3.log') size 20M
datafile '/disk1/oradata\newdb10g\system.dbf' size 350M
autoextend on next 10M maxsize unlimited extent management local
sysaux datafile '/disk1/oradata/newdb10g/sysaux.dbf'
size 10M autoextend on next 10M maxsize unlimited
undo tablespace undotbs datafile
'/disk1/oradata/newdb10g/undo.dbf' size 10M
default tablespace users
'/disk1/oradata/newdb10g/user01.dbf' size 50m
default temporary tablespace temp tempfile
'/disk1/oradata/newdb10g/temp.dbf' size 10M;
:wq!

$sqlplus '/as sysdba'


Sql>startup nomount
Sql>@cr8db.sql
Database created
Sql>

Run the following script as sys user

Sql>@$ORACLE_HOME/rdbms/admin/catalog.sql
Sql>@$ORACLE_HOME/rdbms/admin/catproc.sql

Run the following script as system user

sql>@$ORACLE_HOME/sqlplus/admin/pupbld.sql

Done.

Вам также может понравиться