HomePage » Database » Oracle » OracleInstall » OraInst10gCOS5


Oracle 10g on CentOS 5.0 x86

Ref: http://www.dizwell.com/prod/node/681?page=0%2C3

Hardware platform:
CentOS 5.0 x86 /w compiled kernel 2.6.21.1
Centrino 1.7G / 1G mem

groupadd oinstall
groupadd dba
useradd -g oinstall -G dba -d /oracle oracle
mkdir /opt/oradata
chown oracle.oinstall /oracle
chown oracle.dba /opt/oradata


Add to /etc/profile:
export ORACLE_BASE=/oracle
export ORACLE_HOME=/oracle/10g
export ORACLE_SID=sierra
export PATH=$PATH:$ORACLE_HOME/bin:.
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
export LD_LIBRARY_PATH


Add to sysctl.conf
# Oracle
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_default = 262144
net.core.wmem_max = 262144
kernel.sem = 250        32000   100     128


Prior to running the installer, install libXp if not already.
yum install libXp

Login to X as oracle (su - oracle will not work)
cd $ORACLE_INSTALLER
./runInstaller -ignoreSysPrereqs

When performing Prerequisite checks, installer may complain about platform not supported. Just check the checkbox to the left of status column.

In the select configuration option screen, select "Install database Software only"

Afterwards, run the speficied scripts in root, and that's it. For referemce, iSQL*Plus can be accessed at:
iSQL*Plus URL:
http://myhost.corp:5560/isqlplus

iSQL*Plus DBA URL:
http://myhost.corp:5560/isqlplus/dba

iSQL*Plus login information
http://www.stanford.edu/dept/itss/docs/oracle/10g/server.101/b12170/ch3.htm#BCEIHEJF


Prepare an init file for your new database
My oracle SID is sierra.

cd $ORACLE_HOME/dbs
cp init.ora initsierra.ora


Then customize it a little bit. Here's mine:
initsierra.ora
db_name=sierra
db_files = 100                                                         # SMALL  
db_file_multiblock_read_count = 8                                     # SMALL  
db_block_buffers = 100                                                 # SMALL  
shared_pool_size = 256M                                               # SMALL
log_checkpoint_interval = 10000
processes = 50                                                        # SMALL  
parallel_max_servers = 5                                              # SMALL
log_buffer = 32768                                                    # SMALL
max_dump_file_size = 10240      # limit trace file size to 5 Meg each
global_names = TRUE
control_files = (ora_control1, ora_control2)
undo_management=AUTO
undo_tablespace=UNDO


Starting oracle and create a system database
sqlplus /nolog
SQL>connect / as sysdba
SQL>startup nomount
ORACLE instance started.

Total System Global Area  301989888 bytes
Fixed Size                  1219064 bytes
Variable Size             293602824 bytes
Database Buffers            4194304 bytes
Redo Buffers                2973696 bytes


Now run the create database SQL. Mine:
CREATE DATABASE sierra
  logfile GROUP 1('/opt/oradata/redo1.log') size 10M,
  GROUP 2('/opt/oradata/redo2.log') size 10M
  CHARACTER SET AL32UTF8
  NATIONAL CHARACTER SET AL16UTF16    
  datafile '/opt/oradata/system.dbf'
    size 50M autoextend ON next 10M maxsize unlimited
    extent management LOCAL
  sysaux datafile '/opt/oradata/sysaux.dbf'
        size 10M autoextend ON
        next 10M maxsize unlimited
  undo tablespace undo
      datafile '/opt/oradata/undo.dbf' size 10M
      DEFAULT TEMPORARY tablespace temp
  tempfile '/opt/oradata/temp.dbf' size 200M reuse;
@?/rdbms/admin/catalog.sql
@?/rdbms/admin/catproc.sql    


Starting isqlplus
$ORACLE_HOME/bin/isqlplusctl start


Changing passwords
shell> orapwd file=orapwsierra password=ora1234 entries=20
SQL> password system;
SQL> alter user sys identified by my_pass;

Configuring listener
LISTENER =
 (ADDRESS_LIST=
		(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521))
		(ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY)))

SID_LIST_LISTENER=
   (SID_LIST=
		(SID_DESC=
		  (SID_NAME=sierra)
		  (ORACLE_HOME=/oracle/10g)
		 )
		)


Create init script for Oracle
Create the following file in /etc/init.d/oracle, then issue chkconfig --level 35 oracle to enable Oracle in runlevel 3 and 5
oracle
#!/bin/sh
# oracle        This shell script takes care of starting and stopping
#                Oracle database server
#
# chkconfig: - 13 99
# description: Oracle database server 10g
#

case "$1" in
start)
su - oracle -c sqlplus /nolog<<EOF
connect / as sysdba
startup
exit
EOF
su - oracle -c "lsnrctl start"
;;

stop)
su - oracle -c sqlplus /nolog<<EOF
connect / as sysdba
shutdown immediate
exit
EOF
su - oracle -c "lsnrctl stop"
;;

esac

There is one comment on this page. [Display comment]

Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki