1 : Oracle9i JRE(Java Runtime Environment) OUI(Oracle Universal Installer) OS 25MB Memory 512 MB RAM # grep MemTotal /proc/meminfo Swap Space RAM 2 400 MB # /sbin/swapon s CD-ROM Drive Disk Space Temporary Disk Space LINUX CD-ROM Oracle 9i 25 GB 1 GB /tmp directory 400 MB Free 400 MB TEMP (Oracle) TMPDIR(OS program ) H/W Oracle 9010 for Linux 1
OS SuSE 72 (Kernel 244) System Libraries GNU C Library version 22 Operating System Patches JRE Sun JRE 131 JDK Oracle HTTP Server Powered by Apache uses Sun JDK 131 and Blackdown 118_v3 Oracle 9010 for Linux 2
2 SuSE 72 root Linux 9i SGA(System Global Area) Linux IPC(Interprocess Commuication) SGA 1 ipcs, 2 (SHMMAX) (SHMMNI) (SHMSEG) (SHMMNS) SHMMAX * SHMSEG init<sid>ora init<sid>ora Kernel Parameter root # cd /proc/sys/kernel # cat sem 250 32000 32 128 Oracle 9010 for Linux 3
# echo SEMMSL_value SEMMNS_value SEMOPM_value SEMMNI_value > sem # cat shared_memory_parameter # echo 2147483648 > shmmax oracle 9i SHMMAX 2147483648 (, 2 GB ) SHMMIN 1 ( ) SHMMNI 100 SHMSEG 4096 SEMMNS 256 SEMMNI 100 SEMMNI SEMMSL PROCESSES 10 SEMOPM 100 Semop call operations SEMVMX 32767, Linux Oracle 9010 for Linux 4
Oracle 9i RAC 2 3 Kernel Rebuild (FC HBA driver, Softdog Modules ) 4 5 - - - - < > LINUX Oracle 9010 for Linux 5
Database Administrator LINUX groupadd dba, [root /]# groupadd -g 5000 dba /etc/group dba LINUX useradd oracle ID oracle DBA ORACLE_HOME /bin/bash, /bin/sh, /bin/csh, /bin/ksh LINUX oracle, /home1/oracle Oracle 9010 for Linux 6
oracle oracle profile cshrc ORACLE_HOME LD_LIBRARY_PATH Shared Library LD_LIBARARY_PATH $ORACLE_HOME/lib ORACLE_SID Oracle Oracle System Identifier(SID) PATH $ORACLE_HOME/bin, /bin, /usr/bin NLS_LANG Oracle DISPLAY Oracle Universal Installer Servername name IP address,x Server, Screen ## Environment variables for Oracle export ORACLE_HOME=/home/oracle/ export NLS_LANG=AMERICAN_AMERICAKO16KSC5601 export PATH=$PATH:$ORACLE_HOME/bin export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib export ORACLE_SID=RAC1 ##CLASSPATH must include the following JRE locations: CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib Oracle 9010 for Linux 7
3 CD-ROM CD-ROM Oracle CD-ROM RockRidge CD-ROM CD-ROM root, /cdrom ( ) ) $ su root # mount t iso9660 /dev/cdrom /cdrom # exit $ oracle CD-ROM orainst orainst logout login $ cd /cdrom/oracle9i $ /runinstaller : root Oracle 9i RAC 1 Oracle 9i software install 2 RAC configuration setting 3 DBCA script 4 Database 5 Other nodes setting Oracle 9010 for Linux 8
Oracle 9i Software Install Welcome [ 3-1] Installer runinstaller Next DeInstall Products, Installed Products Oracle 9010 for Linux 9
Inventory Location [ 3-2] Inventory Location (OK) Oracle 9010 for Linux 10
Unix Group Name [ 3-3] Unix Group Name Unix Group Name DBA Next Oracle 9010 for Linux 11
OrainstRootsh [ 3-4 ] OrainstRootsh /tmp/orainstrootsh Continue Oracle 9010 for Linux 12
File Locations [ 3-5 ] File Location ORACLE_HOME Next ORACLE_BASE Path: ORACLE_BASE ( :/home/ora815) (OK) Oracle 9010 for Linux 13
Available Products [ 3-6 ] Available Products Oracle9i 90100 Client/Server Client OUI Oracle9i Client Product Language Oracle 9010 for Linux 14
Product Language [ 3-7 ] Product Language Korean > OK [ 3-6 ] Next Oracle 9010 for Linux 15
Installation Types [ 3-8 ] Installation Types Typical Minimal Custom ORACLE 9i RAC Custom Oracle 9010 for Linux 16
Available Product Components [ 3-9 ] Available Product Components 9i RAC Oracle 9i Real Application Clusters 90100 Enterprise Oracle Management Server repository Database Oracle 9010 for Linux 17
Component Locations [ 3-10 ] Component Locations Next Oracle 9010 for Linux 18
Shared Configuration File Name [ 3-11 ] Shared Configuration File Name Oracle 9i RAC quorum raw device Next Oracle 9010 for Linux 19
Cluster Nodes Selection [ 3-12 ] Cluster Nodes Selection Oracle 9i RAC node Primary node software node software node Next node rcp rsh Oracle 9010 for Linux 20
Privileged Operating System Groups [ 3-13 ] Privileged Operating System Groups OS GROUP DBA NEXT Oracle 9010 for Linux 21
JDK Home Directory [ 3-14 ] JDK Home Directory JDK Next Oracle 9010 for Linux 22
Summary [ 3-15 ] Summary Oracle 9010 for Linux 23
DBA Group [ 3-16 ] Install Oracle 9010 for Linux 24
CDROM Change [ 3-17 ] Cdrom change CD (/mnt mount ) #umount /mnt or eject (Auto mount ) #mount /dev/cdrom /mnt OK Oracle 9010 for Linux 25
Setup Privileges [ 3-18 ] Setup Privileges rootsh script root /var/opt/oracle direcory chown owner group rootsh script OK # mkdir /var/opt/oracle # chown oracle9i:dba /var/opt/oracle # cd $ORACLE_HOME #/rootsh Oracle 9010 for Linux 26
End of Installation [ 3-20 ] End of Installation Oracle Software install Install Next Install Exit Oracle 9010 for Linux 27
RAC Configuration Setting Cluster Software platform Linux Oracle nmcfgora, ocmargsora file root Cluster Software node node $ cd $ORACLE_HOME/oracm/admin (node1 ) DefinedNodes : RAC node (/etc/hosts file machine name ) CmDiskFile : Shared Configuration File Name CmHostName : hostname ClusterName : Cluster name PollInterval : node Cluster Manager Server Member (milliseconds) $ vi ocmargsora # Sample Configuration file $ORACLE_HOME/oracm/admin/ocmargsora watchdogd -l 0 -g oinstall -e /opt/oracle/oracm/log/wdd-node1log oranm /e:/opt/oracle/oracm/log/nm-node1log oracm /e:/opt/oracle/oracm/log/cm-node1log /a:0 norestart 5 node log setting Clusert Server startup $ cd $ORACLE_HOME/oracm/bin $ su -- root #/ocmstartsh node nm-node2log NODE(0) IS ACTIVE MEMBER OF CLUSTER NODE(1) IS ACTIVE MEMBER OF CLUSTER Oracle 9010 for Linux 28
DBCA Scripts Database DBCA Welcome [ 4 1 ] DBCA Welcome Database Configuration Assitant Welcome Single Instance Oracle Database Next Oracle 9010 for Linux 29
Operations [ 4-2 ] Operations DBCA Wizard Database Create database Next Oracle 9010 for Linux 30
Database Templates [ 4 3 ] Database Templates New Database Next Oracle 9010 for Linux 31
Database Identification [ 4-4 ] Database Identification Oracle (SID) Next Oracle 9010 for Linux 32
Database Options [ 4 5 ] Database Options Database Next Oracle 9010 for Linux 33
Database Connection Options [ 4-6 ] Database Connection Options (Shared Service Mode), Multi-Threaded Server (Dedicated Server Mode) Dedicated Server Mode Next Oracle 9010 for Linux 34
Initialization Parameters [ 4 7 ] Initialization Parameters SGA SGA 1/2 All Initialization Parameters Oracle 9010 for Linux 35
Initialization Parameters (DB Sizing) [ 4 8 ] Database Sizing Database Archive tab Data block OLTP (2048), DSS 16K (Hybrid) Character Sets (National Character Set) AL16UTF16 Oracle 9010 for Linux 36
Initialization Parameters (File Locations) [ 4 9 ] File Locations Trace Directory Next Spfile uncheck Oracle 9010 for Linux 37
Database Storage [ 4 10 ] Database Storage Control file, Redolog file, Raw device control file options MAXDATAFILES, MAXINSTANCES, MAXLOGHISTORY, MAXLOGFILES Next Oracle 9010 for Linux 38
Creation Options [ 4 11 ] Create Options Database, Generate Database Creation Scripts Finish Oracle 9010 for Linux 39
Summary [ 4 12 ] Summary OK Oracle 9010 for Linux 40
Completed Scripts [ 4 13 ] Completed Scripts Scripts No Oracle 9010 for Linux 41
Create Database Scripts krcompaq:/home1/dbtech/home/admin/rac/scripts> ls -al -rw-r--r-- 1 dbtech dba 782 Sep 3 15:35 CreateDBsql -rw-r--r-- 1 dbtech dba 731 Sep 3 15:35 CreateDBCatalogsql -rw-r--r-- 1 dbtech dba 1387 Sep 3 15:35 CreateDBFilessql -rw-r--r-- 1 dbtech dba 969 Sep 3 15:35 JServersql -rw-r--r-- 1 dbtech dba 1165 Sep 3 15:35 RAC1sh -rw-r--r-- 1 dbtech dba 357 Sep 3 15:35 contextsql -rw-r--r-- 1 dbtech dba 1133 Sep 3 15:35 demoschemassql -rw-r--r-- 1 dbtech dba 2824 Sep 3 15:35 initora -rw-r--r-- 1 dbtech dba 174 Sep 3 15:35 intermediasql -rw-r--r-- 1 dbtech dba 169 Sep 3 15:35 ordinstsql -rw-r--r-- 1 dbtech dba 197 Sep 3 15:35 postdbcreationsql -rw-r--r-- 1 dbtech dba 150 Sep 3 15:35 spatialsql -rw-r--r-- 1 dbtech dba 245 Sep 3 15:35 ultrasearchsql CreateDBsql MAXDATAFILES, MAXINSTANCES, MAXLOGHISTORY, MAXLOGFILES Initora file cluster_database= true cluster_database_instances=2 thread=1 instance_name=rac1 instance_number=1 undo_tablespace = UNDOTBS1 RAC1sh RAC1sh Database node scrips $ sqlplus /nolog connect SYS/change_on_install as SYSDBA set echo on spool /opt/oracle/admin/rac/create/createclustdbviewslog @$ORACLE_HOME/rdbms/admin/catclustdbsql; spool off; rem Oracle9i: Redo log files for Second Instance (sample) alter database add logfile thread 2 group 4 '/dev/opsthr2grp4mem1rdo' size 5m; alter database add logfile thread 2 group 5 '/dev/opsthr2grp5mem1rdo' size 5m; alter database add logfile thread 2 group 6 '/dev/opsthr2grp6mem1rdo' size 5m; alter database enable thread 2; rem Oracle9i: Undo Tablespace for Second Instance (sample) create undo tablespace undotbs2 datafile '/dev/racundo02dbf' size 20m extent management local autoallocate; Oracle 9010 for Linux 42
Other Node Setting node Oracle node rcp ORACLE_SID = RAC2 node $ cd $ORACLE_HOME $ rcp R node1:/home/oracle/oracm $ cd $ORACLE_HOME/oracm/admin ocmargsora, nmcfgora file node2 ( Cluster Software setup ) $ cd $ORACLE_HOME $ rcp R node1:/home/oracle/admin $ cd $ORACLE_HOME/dbs $ ln s $ORACLE_HOME/admin/RAC/scripts/initora initrac2ora initrac2ora file cluster_database= true cluster_database_instances=2 thread=1 instance_name=rac2 instance_number=2 undo_tablespace = UNDOTBS2 Database startup Node1/Node2 restart Oracle Cluster software root (RAC Configuration Setting ) $ sqlplus /nolog SQL> startup SQL> select host_name, instance_name from gv$instance; HOST_NAME INSTANCE_NAME ---------- ---------------- node1 RAC1 node2 RAC2 Oracle 9010 for Linux 43