Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Agenda
Linux OS Installation Linux OS Configuration Oracle Grid Infrastructure Oracle Database Software RAC Database Creation Manage RAC database
Linux OS installation
Version RedHat Enterprise Linux 5.8 x86_64 Hardware Memory: 6G at least Hard Disk: 500G Network device: two network device each server
Linux OS installation
Skip Entering Installation Number
Linux OS installation
Customize Hard Disk partitions Root partition 200G Swap partition 32G /u01: software installation directory 200G
Linux OS installation
The default Installation of Red Hat Enterprise Linux Server
Linux OS installation
Disable firewall
Linux OS installation
Disable SELinux Since Oracle Database 11g, it can be installed when enabling SELinux
Linux OS Configuration
Set up yum Set shell resource limits Verify Kernel parameters Install required packages Install asmlib packages Customize Linux services
10
Set up YUM
Create yum configuration file
#vi /etc/yum.repos.d/rhel-dvd.repo [rhel-dvd] name=Red Hat Enterprise Linux DVD media baseurl=file:///rhel5/Server enabled=1 gpgcheck=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
Mount redhat Enterprise ISO # mount -o loop rhel-server-5.8-x86_64-dvd.iso /rhel5/ Install packages via yum # yum install <package_name>
11
Check OS resource
Physical memory #grep MemTotal /proc/meminfo #free Swap space # grep SwapTotal /proc/meminfo #swapon a Storage space #df h #fdisk -l OS architecture #uname a
12
13
# yum install gcc-c++ # rpm -qa --qf "%{name}-%{version}-%{release}.%{arch}\n" |grep '^gcc' gcc-c++-4.1.2-52.el5.x86_64 gcc-4.1.2-52.el5.x86_64
14
16
When installing grid infrastructure, the installer will modify the attributes of /u01/app/11.2.0/grid.
17
grid grid grid grid grid grid grid grid grid grid
soft hard soft hard soft hard soft hard soft hard
nofile 131072 -- the maximum number of open file descriptors nofile 131072 nproc 131072 -- the maximum number of user processes nproc 131072 core unlimited core unlimited memlock 3500000 -- the maximum size a process may lock into memory memlock 3500000 stack 32768 stack 32768
18
# pam_selinux.so open should only be followed by sessions to be executed in the user context session required pam_selinux.so open session required pam_limits.so
19
Install ASMlib
Download ASMlib packages ASMlib packages can be downloaded from oracle official website.http://www.oracle.com/technetwork/topics/ linux/asmlib/index-101839.html
Install asmlib package
# rpm -ivh oracleasm* warning: oracleasm-2.6.18-308.el5-2.0.5-1.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159 Preparing... ########################################### [100%] 1:oracleasm-support ########################################### [ 33%] 2:oracleasm-2.6.18-308.el########################################### [ 67%] 3:oracleasmlib
20
21
Install cvuqdisk
Cvuqdisk is necessary for shared disk check during installation
# CVUQDISK_GRP=oinstall; export CVUQDISK_GRP # rpm -iv packag
22
23
24
25
Network Setting
Add the following to dns configuration file
192.168.20.101 192.168.20.102 racbox1.nom.com racbox1 racbox2.nom.com racbox2
172.16.20.101 172.16.20.102
racbox1-priv.nom.com racbox2-priv.nom.com
racbox1-priv racbox2-priv
192.168.20.121 racbox1-vip.nom.com racbox1-vip 192.168.20.122 racbox2-vip.nom.com racbox2-vip 192.168.20.201 racdb-scan.nom.com racdb-scan 192.168.20.202 racdb-scan.nom.com racdb-scan 192.168.20.203 racdb-scan.nom.com racdb-scan
In the above example, the sub network 192.168.20.xxx is used for public network, and 172.16.20.xxx is used for private network.
Solutions & Engineering of Defense and Security Information Systems
26
27
Configure Oracleasm
Create asmlib device
# service oracleasm createdisk 'RACOVD' /dev/sdb1 Marking disk "RACOVD" as an ASM disk: [ OK ] # service oracleasm createdisk 'RACDATA' /dev/sdc1 Marking disk "RACDATA" as an ASM disk: [ OK ] # service oracleasm createdisk 'RACDFRA' /dev/sdd1 Marking disk "RACDFRA" as an ASM disk: [ OK ]
28
Configure Oracleasm(conts)
Configure oracleasm
# /etc/init.d/oracleasm configure Configuring the Oracle ASM library driver. This will configure the on-boot properties of the Oracle ASM library driver. The following questions will determine whether the driver is loaded on boot and what permissions it will have. The current values will be shown in brackets ('[]'). Hitting <ENTER> without typing an answer will keep that current value. Ctrl-C will abort. Default user to own the driver interface []: grid Default group to own the driver interface []: asmadmin Start Oracle ASM library driver on boot (y/n) [n]: y Scan for Oracle ASM disks on boot (y/n) [y]: Writing Oracle ASM library driver configuration: done Initializing the Oracle ASMLib driver: [ OK ] Scanning the system for Oracle ASMLib disks: [ OK ]
Specify default user and group for asmlib devices: grid and asmadmin
Solutions & Engineering of Defense and Security Information Systems
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
Installing Database
Login as oracle user Run the script $./runInstaller
Uncheck I wish to receive security updates via My Oracle Support. Then click next
56
Installing Database
Click yes and dont provide email address.
57
Installing Database
Skip software updates
Then click next
58
Installing Database
Install database software only
59
Installing Database
Oracle Real Application Clusters database installation Select all cluster nodes. Then click next
60
Installing Database
Select the languages in which your software will run. Then click next
61
Installing Database
Select Database edition: Enterprise edition Then click next
62
Installing Database
Specify installation location
63
Installing Database
Specify privileged operating system groups dba: OSDBA Then click next
64
Installing Database
Perform prerequisite checks
If successful, then click next
65
Installing Database
Database configuration summary Then click install
66
Installing Database
Install database product
67
Installing Database
Execute configuration scripts Then clickOK and continue to install
68
Installing Database
Click close and complete installation
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
.
Solutions & Engineering of Defense and Security Information Systems
86
Database Control
Configure database control $emca deconfig dbcontrol db repos create -cluster Check the status $emctl status dbconsole Start db control $emctl start dbconsole Stop db control $emctl stop dbconsole
87
Database Control
Monitor the cluster
Eg: the cluster name is racdb
88
Database control
Moniter the performance of RAC database
89
Database Control
Monitor the schema of RAC database
90
Database Control
Monitor instances of the cluster
91
Database Control
Monitor the home page of database instance
92
Database Control
Monitor Memory usage of database instance
93
Gracias