search
HomeDatabaseMysql TutorialRedHat 5.5下安装Oracle 10g+RAC

成本的相对廉价,技术的成熟,功能的强大此方案将越来越受中小企业的青睐。 一.实验前准备 虚拟机版本:VMware server1.0.6 Linu

成本的相对廉价,技术的成熟,功能的强大此方案将越来越受中小企业的青睐。

一.实验前准备

虚拟机版本:VMware server1.0.6

Linux版本:RedHat 5.5 Enterprise服务器版

Oralce版本:Oracle 10g 10.2.1

Oracle集群软件:Clusterware

VMware Workstation版本在共享磁盘上没有很好的解决办法。VMware server在Windows7安装可能存在一定的驱动问题。本实验是在xp系统上完成,下图给出虚拟机的ip及主机名配置

Node1:主机名rac1

网卡1ip192.168.100.100

网卡2ip192.168.200.100

虚拟ip192.168.2.100

Node2主机名rac2

网卡1ip192.168.100.101

网卡2ip192.168.200.101

虚拟ip192.168.2.101

在CentOS 6.4下安装Oracle 11gR2(x64)

Oracle 11gR2 在VMWare虚拟机中安装步骤

Debian 下 安装 Oracle 11g XE R2

二.虚拟机配置及linux安装

实验利用vware配置虚拟机只需要配置一台即主节点,在虚拟机中的配置如:

硬盘配置:

该配置是一个重点配置,默认配置一个磁盘,大小为20G该磁盘为rac1的服务器磁盘,包括了linux系统的安装及oracle软件的安装都在该磁盘上。

还需要分配其他四块磁盘:2:ocr,3:vote4,5:asm

其大小分别为100M,100M,2G,2G

磁盘分部为:1,SCSI0:02,SCSI1:13,SCSI1:24,SCSI1:35,SCSI1:4且2-5都需要在高级中勾选independent-persisant选项

*硬盘分配的注意点:I/O适配器类型都选择"LSILogin"方式

*所有磁盘类型都选在"SCSI",如果选择IDE类型的磁盘的话,vware只能虚拟出4块,而rac环境是需要5块磁盘来实现。由于是在虚拟机中实现,建议将2-5磁盘配置到其他目录中。

两块在安装clusterware软件的时候要用到,也就是ORACLERAC所必须的ocr以及vote磁盘,表现出来是裸设备方式,还有两块磁盘我们要用来作为共享磁盘存放数据文件,即asm磁盘

网卡配置:

rac环境中需要两块网卡,,当然可以创建地三块网卡和pc交互。便于文件等内容的传输

网卡的类型选择的都为Bridged类型。该类型的网卡在虚拟机就等同一个独立的网卡。可以和主机通信也可以连通互联网。下给出一张配置后的截图:

虚拟机中安装linux

在虚拟机中安装linux,在磁盘分区时将除0:0外的其他磁盘不参与分区,即如下图,只勾选sda选项。在挂盘上随个人喜好。为方便这里只挂了/一个盘

        关于ip的配置,eth0:ip192.168.100.100

                Eth1:ip192.168.200.100

Eth2:选择自动获取

服务的话,建议都选择安装,目前还没有完全了解其中包的关联关系。

disk.locking="false"

diskLib.dataCacheMaxSize="0"

diskLib.dataCacheMaxReadAheadSize="0"

diskLib.DataCacheMinReadAheadSize="0"

diskLib.dataCachePageSize="4096"

diskLib.maxUnsyncedWrites="0"

scsi1:1.deviceType="disk"

scsi1:2.deviceType="disk"

scsi1:3.deviceType="disk"

scsi1:4.deviceType="disk"

三.Linux配置                       

文件配置


1,编辑/etc/hosts文件,添加如下内容:

192.168.100.100rac1

192.168.100.101rac2

192.168.100.200rac1-vip

192.168.100.201rac2-vip

192.168.2.100rac1-priv

192.168.2.101rac2-priv   

2,创建组oinstall,dba,用户oracle

groupaddoinstall

groupadddba

useradd-d/home/oracle-goinstall-Gdbaoracle

如果是非虚机安装,要注意记录下用户和组ID,在其它机器上创建同名组时,务必确认组ID和用户ID与此相同。

设置oracle用户密码(密码也设为oracle)

passwdoracle

3,配置oralce用户的bash_profile文件

exportTMP=/tmp

exportTMPDIR=$TMP

exportORACLE_BASE=/opt/ora10g

exportORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1

exportORACLE_SID=RACDB1

exportORACLE_TERM=xterm

exportPATH=/usr/sbin:$PATH

exportPATH=$ORACLE_HOME/bin:$PATH

exportLD_LIBRARY_PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin

exportCLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

ulimit-u16384-n65536

umask022

2,创建/opt/ora10g目录,要注意该目录所有者或oracle用户的权限

[root@rac1~]#mkdir/opt/ora10g

由于该目录主要由oracle用户操作,因此我们将其所有者改为oracle

[root@rac1~]#chownoracle.oinstall/opt/ora10g

3,配置内核参数

[root@rac1~]#vi/etc/sysctl.conf

增加或修改下列内容

kernel.shmmni=4096

kernel.sem=25032000100128

fs.file-max=65536

net.ipv4.ip_local_port_range=102465000

net.core.rmem_default=1048576

net.core.rmem_max=1048576

net.core.wmem_default=262144

net.core.wmem_max=262144

[root@rac1~]#sysctl-p

让设置生效

4,提高Oracle用户的shell限制

设置oracle使用的文件数权限

vi/etc/security/limits.conf

增加下列内容

oraclesoftnproc2047

oraclehardnproc16384

oraclesoftnofile1024

oraclehardnofile65536

修改安全限制

vi/etc/pam.d/login

增加:

sessionrequired/lib/security/pam_limits.so

配置Hangcheck计时器

vi/etc/rc.local

增加:

modprobehangcheck-timerhangcheck-tick=30hangcheck_margin=180

更多详情见请继续阅读下一页的精彩内容:

linux

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
How do you alter a table in MySQL using the ALTER TABLE statement?How do you alter a table in MySQL using the ALTER TABLE statement?Mar 19, 2025 pm 03:51 PM

The article discusses using MySQL's ALTER TABLE statement to modify tables, including adding/dropping columns, renaming tables/columns, and changing column data types.

How do I configure SSL/TLS encryption for MySQL connections?How do I configure SSL/TLS encryption for MySQL connections?Mar 18, 2025 pm 12:01 PM

Article discusses configuring SSL/TLS encryption for MySQL, including certificate generation and verification. Main issue is using self-signed certificates' security implications.[Character count: 159]

What are some popular MySQL GUI tools (e.g., MySQL Workbench, phpMyAdmin)?What are some popular MySQL GUI tools (e.g., MySQL Workbench, phpMyAdmin)?Mar 21, 2025 pm 06:28 PM

Article discusses popular MySQL GUI tools like MySQL Workbench and phpMyAdmin, comparing their features and suitability for beginners and advanced users.[159 characters]

How do you handle large datasets in MySQL?How do you handle large datasets in MySQL?Mar 21, 2025 pm 12:15 PM

Article discusses strategies for handling large datasets in MySQL, including partitioning, sharding, indexing, and query optimization.

How do you drop a table in MySQL using the DROP TABLE statement?How do you drop a table in MySQL using the DROP TABLE statement?Mar 19, 2025 pm 03:52 PM

The article discusses dropping tables in MySQL using the DROP TABLE statement, emphasizing precautions and risks. It highlights that the action is irreversible without backups, detailing recovery methods and potential production environment hazards.

How do you create indexes on JSON columns?How do you create indexes on JSON columns?Mar 21, 2025 pm 12:13 PM

The article discusses creating indexes on JSON columns in various databases like PostgreSQL, MySQL, and MongoDB to enhance query performance. It explains the syntax and benefits of indexing specific JSON paths, and lists supported database systems.

How do I secure MySQL against common vulnerabilities (SQL injection, brute-force attacks)?How do I secure MySQL against common vulnerabilities (SQL injection, brute-force attacks)?Mar 18, 2025 pm 12:00 PM

Article discusses securing MySQL against SQL injection and brute-force attacks using prepared statements, input validation, and strong password policies.(159 characters)

How do you represent relationships using foreign keys?How do you represent relationships using foreign keys?Mar 19, 2025 pm 03:48 PM

Article discusses using foreign keys to represent relationships in databases, focusing on best practices, data integrity, and common pitfalls to avoid.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

Hot Tools

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.