Führen Sie Oracle 11gR2 RAC + DG1 erneut aus

Unter https://www.roamway.com/1273.html,RAC-Datenbank wurde konfiguriert, Diesmal ist der DataGuard-Dienst auf Basis von RAC Dual Machine konfiguriert,

Kann schnelles Umschalten zwischen der Hauptbibliothek und der Standby-Bibliothek realisieren, Bereitstellung von Disaster Recovery- und Backup-Funktionen.

Dieser Teil,Wir müssen die Dataguard-Systemplattform bereitstellen, ASM-Dienst konfigurieren,Installieren Sie dann das Single-Node-Grid, Installieren Sie abschließend die Oracle-Software.

Die Einzelheiten sind wie folgt:

1. Installieren Sie das Betriebssystem, OEL5.5 x64 wird diesmal noch verwendet , Lokale Festplatte 20 GB, Hostname dg.localdomain ,

IP Adresse 192.168.137.159 ,Iptables und Selinux nicht aktivieren.

Wählen Sie beim Anpassen das folgende Installationspaket:

Desktop-Umgebungen:

GNOME Desktop Environment

Applications:

Editors

Development:

Development Libraries

Entwicklungswerkzeuge

GNOME Software Development

Legacy Software Development

X software Development

Base System :

Administration Tools

Base

Legacy Software Support

System Tools

X Window System

dann,执行真正安装,重启数次后安装完成.

下图是配置好的主机名和ip地址.

dg1

 

2. Benutzer erstellen,建目录赋权限 ,Passwort ändern,改用户配置文件,内核参数, 资源限制等

建立grid用户和oracle用户

groupadd -g 1000 oinstall

groupadd -g 1200 asmadmin

groupadd -g 1201 asmdba

groupadd -g 1202 asmoper

useradd -u 1100 -g oinstall -G asmadmin,asmdba,asmoper -d /home/grid -s /bin/bash -c

grid Infrastructure Owner” Gitter

Echo “Gitter” | passwdstdin grid

echo ‘export PS1=`/bin/hostname -s` -> “‘ >> /home/grid/.bash_profile

Echo “export ORACLE_SID=+ASM” >> /home/grid/.bash_profile

Echo “export ORACLE_BASE = / u01 / app / grid” >> /home/grid/.bash_profile

Echo “export ORACLE_HOME=/u01/app/11.2.0/grid” >> /home/grid/.bash_profile

Echo “export ORACLE_TERM = xterm” >> /home/grid/.bash_profile

Echo “export NLS_DATE_FORMAT=’yyyy/mm/dd hh24:mich:ss'” >> /home/grid/.bash_profile

echo ‘export TNS_ADMIN=$ORACLE_HOME/network/admin’ >> /home/grid/.bash_profile

echo ‘export PATH=/usr/sbin:$PFAD’ >> /home/grid/.bash_profile

echo ‘export PATH=$ORACLE_HOME/bin:$PFAD’ >> /home/grid/.bash_profile

echo ‘export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr / lib’ >> /home/grid/.bash_profile

echo ‘export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME / jlib:$ORACLE_HOME / rdbms / jlib’ >>

/home/grid/.bash_profile

Echo “export LANG = en_US” >> /home/grid/.bash_profile

Echo “export NLS_LANG=american_america.AL32UTF8” >> /home/grid/.bash_profile

Echo “umask 022” >> /home/grid/.bash_profile

groupadd -g 1300 dba

groupadd -g 1301 oper

useradd -u 1101 -g oinstall -G dba,oper,asmdba -d /home/oracle/ -s /bin/bash -c

Oracle Software Owner” Orakel

Echo “Orakel” | passwdstdin oracle

echo ‘export PS1=`/bin/hostname -s` -> “‘ >> /home/oracle/.bash_profile

Echo “exportiere TMP = / tmp” >> /home/oracle/.bash_profile

echo ‘export TMPDIR=$TMP’ >> /home/oracle/.bash_profile

Echo “export ORACLE_HOSTNAME=dg.localdomain” >> /home/oracle/.bash_profile

Echo “export ORACLE_SID=devdb” >> /home/oracle/.bash_profile

Echo “export ORACLE_BASE=/u01/app/oracle” >> /home/oracle/.bash_profile

echo ‘export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1’ >> /home/oracle/.bash_profile

Echo “export ORACLE_UNQNAME=devdb” >> /home/oracle/.bash_profile

echo ‘export TNS_ADMIN=$ORACLE_HOME/network/admin’ >> /home/oracle/.bash_profile

echo ‘export PATH=$ORACLE_HOME/bin:$PFAD’ >> /home/oracle/.bash_profile

echo ‘export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr / lib’ >> /home/oracle/.bash_profile

echo ‘export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME / jlib:$ORACLE_HOME / rdbms / jlib’ >>

/home/oracle/.bash_profile

Echo “export LANG = en_US” >> /home/oracle/.bash_profile

Echo “export NLS_LANG=american_america.AL32UTF8” >> /home/oracle/.bash_profile

Echo “export NLS_DATE_FORMAT=’yyyy/mm/dd hh24:mich:ss'” >> /home/oracle/.bash_profile

 

建立grid和oracle目录路径,修改权限

mkdir -p / u01 / app / grid

mkdir -p /u01/app/11.2.0/grid

mkdir -p / u01 / app / oracle

chown -R Orakel:oinstall / u01

chown -R Gitter:oinstall /u01/app/grid

chown -R Gitter:oinstall /u01/app/11.2.0

 

修改/etc/security/limits.conf

Echo “oracle soft nproc 2047” >> /etc/security/limits.conf

Echo “oracle hard nproc 16384” >> /etc/security/limits.conf

Echo “oracle soft nofile 1024” >> /etc/security/limits.conf

Echo “oracle hard nofile 65536” >> /etc/security/limits.conf

Echo “grid hard nproc 16384” >> /etc/security/limits.conf

Echo “grid soft nofile 1024” >> /etc/security/limits.conf

Echo “grid hard nofile 65536” >> /etc/security/limits.conf

 

修改/etc/profile文件

echo ‘if [ $USER = “Orakel” ] || [ $USER = “Gitter” ] ; dann’ >> /etc/profile

echo ‘if [ $SHELL = “/bin / ksh” ] ; dann’ >> /etc/profile

echo ‘ulimit -p 16384’ >> /etc/profile

echo ‘ulimit -n 65536’ >> /etc/profile

echo ‘else’ >> /etc/profile

echo ‘ulimit -u 16384 -n 65536’ >> /etc/profile

echo ‘fi’ >> /etc/profile

echo ‘fi’ >> /etc/profile

 

修改内核配置文件

Echo “fs.aio-max-nr = 1048576” >> /etc / sysctl.conf

Echo “fs.file-max = 6815744” >> /etc / sysctl.conf

Echo “kernel.shmall = 2097152” >> /etc / sysctl.conf

Echo “kernel.shmmax = 1054472192” >> /etc / sysctl.conf

Echo “kernel.shmmni = 4096” >> /etc / sysctl.conf

Echo “kernel.sem = 250 32000 100 128” >> /etc / sysctl.conf

Echo “net.ipv4.ip_local_port_range = 9000 65500” >> /etc / sysctl.conf

Echo “net.core.rmem_default = 262144” >> /etc / sysctl.conf

Echo “net.core.rmem_max = 4194304” >> /etc / sysctl.conf

Echo “net.core.wmem_default = 262144” >> /etc / sysctl.conf

Echo “net.core.wmem_max = 1048586” >> /etc / sysctl.conf

Echo “net.ipv4.tcp_wmem = 262144 262144 262144” >> /etc / sysctl.conf

Echo “net.ipv4.tcp_rmem = 4194304 4194304 4194304” >> /etc / sysctl.conf

 

3. 为ASM创建可用磁盘

关闭dg服务器添加4块磁盘大小分别是1GB,5GB,5GB,10GB,这4块盘分别作为

GRIDDG,DATEN,FLASH,RMAN备份盘使用

我们以创建1GB盘为例

dg3

dg4

dg5

dg6

 

这样GRIDDG盘就添加好了然后用同样的办法添加DATA,FLASH,RMAN备份盘即可

 

4.ASM-Dienst konfigurieren

准备好asm安装包

oracleasm-support-2.1.3-1.el5.x86_64.rpm

oracleasm-2.6.18-194.el5-2.0.5-1.el5.x86_64.rpm

oracleasmlib-2.0.4-1.el5.x86_64.rpm

用rpm -ivh安装这3个asm包即可

 

配置ASM驱动服务

/usr/sbin/oracleasm configure -i

/usr/sbin/oracleasm init

/usr/sbin/oracleasm configure

/usr/sbin/oracleasm status

这时发现asm服务已经运行

dg7

格式化新磁盘并创建ASM磁盘组

用fdisk命令查看一下刚才创建的磁盘分别为/dev/sdb/ ,dev/sdc 和/dev/sdd 大小分别是1GB,5GB,5GB

dg8

dg9

接着使用fdisk 命令格式化这些磁盘以/dev/sdb为例

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel

Building a new DOS disklabel with disk identifier 0x33318f33.

Changes will remain in memory only, until you decide to write them.

After that, of course, the previous content won’t be recoverable.

Warnung: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

WARNUNG: DOS-compatible mode is deprecated. It’s strongly recommended to

switch off the mode (command ‘c’) and change display units to

sectors (command ‘u’).

Command (m for help): n

Command action

e extended

p primary partition (1-4)

n

Partition number (1-4):

Value out of range.

Partition number (1-4): 1

First cylinder (1-130, default 1):

Using default value 1

Last cylinder, +cylinders or +size{K,M.,G} (1-130, default 130): 130

Command (m for help): w

The partition table has been altered!

Calling ioctl() to re-read partition table.

Syncing disks.

这样/dev/sdb就格式化好了,wie folgt:

dg10

 

用同样的方法格式化dev/sdc 和/dev/sdd,/dev/sde/,不再一一演示了

接着配置/dev/sdb , /dev/sdc , /dev/sdd 为ASM盘方法如下

/usr/sbin/oracleasm createdisk VOL1 /dev/sdb1

/usr/sbin/oracleasm createdisk VOL2 /dev/sdc1

/usr/sbin/oracleasm createdisk VOL3/dev/sdd1

对于/dev/sde不作为asm盘而是格式化成ext3分区然后挂载到/rman_backup目录下即可

Bisher,磁盘方面准备完成

将grid软件oracle软件分别上传到/home/grid和/home/oracle下

然后用unzip命令解压将会得到grid安装目录和database安装目录

5. grid安装

dg12

dg13

dg14

dg15

dg16

安装前检查没有报错. 点击Finish开始安装

dg17

然后等待安装即可

在最后阶段执行两个脚本orainstRoot.sh和root.sh

如果执行没有问题则grid宣布安装完成

dg18

 

看一下grid进程

切换到grid用户 , 执行crs_stat -t 发现grid进程出现了

dg19

 

7. 安装oracle软件

切换到oracle用户,执行runInstaller安装过程和RAC中大体相同不同部分如下

dg20

dg21

接着安装前检查正式安装执行脚本即可完成oracle安装

dg22

关于ASM磁盘组配置RAC主库DG备库会放到后面演示

Hinterlasse eine Antwort