在 VMWare ESX4.1 中以 Oracle Linux5.5(x64) 安装 3 节点 Oracle 11gr2
21. 安装 Oracle 软件用典型,选服务器类,选 RAC在 典型安装配置 页:软件位置 /u01/app/oracle/product/11.2.0/db_1gobal data
1. 规划 IP :
RAC1 IP 10.1.1.151
RAC1 VIP 10.1.1.161
RAC1 Priv-IP 10.1.0.1
RAC2 IP 10.1.1.152
RAC2 VIP 10.1.1.162
RAC2 Priv-IP 10.1.0.2
RAC3 IP 10.1.1.153
RAC3 VIP 10.1.1.163
RAC3 Priv-IP 10.1.0.3
SCAN IP 10.1.1.170
2. 设置一个新的虚拟机,设置内存为 3G (虚拟机最好不要少于 2G 内存,不然可能会出些意想不到的问题),硬盘为 25G ,增加一个网卡后安装 Oracle Linux5.5 ,全部默认安装。关闭 SELinux ,关闭防火墙。
3. 增加组及用户
groupadd -g 1000 oinstall
groupadd -g 1200 dba
useradd -u 1100 -g oinstall -G dba oracle
passwd oracle
4. 检查 rpm 包
# rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n"|\
egrep "binutils|compat-libstdc++|elfutils-libelf|gcc|glibc|kernel-headers|ksh|libaio|libgcc|libgomp|libstdc|make|sysstat|unixODBC|pdksh"|sort
安装 rpm 包,在 VM 中连接上 Linux 的安装 DVD
执行以下命令(注,如所缺的不止这些包,请另行再安装,所要的包可以参考 Oracle 的标准安装文档)
mount -r -t iso9660 /dev/cdrom /media
cd /media/Server
rpm -Uvh binutils-2.*
rpm -Uvh compat-libstdc++-33*
rpm -Uvh elfutils-libelf-0.*
rpm -Uvh elfutils-libelf-devel-*
rpm -Uvh gcc-4.*
rpm -Uvh gcc-c++-4.*
rpm -Uvh glibc-2.*
rpm -Uvh glibc-common-2.*
rpm -Uvh glibc-devel-2.*
rpm -Uvh glibc-headers-2.*
rpm -Uvh ksh-2*
rpm -Uvh libaio-0.*
rpm -Uvh libaio-devel-0.*
rpm -Uvh libgcc-4.*
rpm -Uvh libstdc++-4.*
rpm -Uvh libstdc++-devel-4.*
rpm -Uvh make-3.*
rpm -Uvh sysstat-7.*
rpm -Uvh unixODBC-2.*
rpm -Uvh unixODBC-devel-2.*
rpm -Uvh gcc-4* --nodeps
rpm -Uvh elfutils-libelf-devel-0.137-3.el5.x86_64.rpm --nodeps
rpm -Uvh glibc-devel-2.5* --nodeps
rpm -Uvh glibc-headers-2.5* --nodeps
rpm -Uvh gcc-c++-4.* --nodeps
# For OEL, use relevant versions of the following packages from your media.
rpm -Uvh oracleasm-2.6.18-194.el5-2.0.5-1.el5.x86_64.rpm \
oracleasm-support-2.1.3-1.el5.x86_64.rpm \
oracleasmlib-2.0.4-1.el5.x86_64.rpm # 必须注意,这个文件在 DVD 中没有,如果没有安装这个文件,会在图形界面上找不到 ASM 盘的。
可以到这个网站上下载:
进入 grid (在 Oracle 网站上下载)的安装目录,进行 rpm 目录
rpm -Uvh cvuqdisk*
5. 编辑 /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
# Public Network -(eth0)
10.1.1 .151 rac1.localdomain rac1
10.1.1 .152 rac2.localdomain rac2
10.1.1 .153 rac3.localdomain rac3
#Private Network -(eht1)
10.1.0 .1 rac1-priv.localdomain rac1-priv
10.1.0 .2 rac2-priv.localdomain rac2-priv
10.1.0 .3 rac3-priv.localdomain rac3-priv
#Public Virtual IP -(eth0:1)
10.1.1 .161 rac1-vip.localdomain rac1-vip
10.1.1 .162 rac2-vip.localdomain rac2-vip
10.1.1 .163 rac3-vip.localdomain rac3-vip
#Note. The SCAN address should not really be defined in the hosts file.
#Instead is should be defined on the DNS to round-robin
#between 3 addresses on the same subnet as the public IPs.
#For this installation, we will compromise and use the hosts file.
#Single Client Access Name(SCAN)
10.1.1 .170 rac-scan.localdomain rac-scan
修改网络设置中的 DNS - > HostName 改为 rac1.localdomain
增加 ip , priv-ip 地址
6. 编辑 /etc/sysctl.conf ,,在文件最后加上(下同)
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 1054504960
kernel.shmmni = 4096
# semaphores: semmsl, semmns, semopm, semmni
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default=262144
net.core.rmem_max=4194304
net.core.wmem_default=262144
net.core.wmem_max=1048586
加载上述设置
#/sbin/sysctl -p

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











Full table scanning may be faster in MySQL than using indexes. Specific cases include: 1) the data volume is small; 2) when the query returns a large amount of data; 3) when the index column is not highly selective; 4) when the complex query. By analyzing query plans, optimizing indexes, avoiding over-index and regularly maintaining tables, you can make the best choices in practical applications.

MySQL is an open source relational database management system. 1) Create database and tables: Use the CREATEDATABASE and CREATETABLE commands. 2) Basic operations: INSERT, UPDATE, DELETE and SELECT. 3) Advanced operations: JOIN, subquery and transaction processing. 4) Debugging skills: Check syntax, data type and permissions. 5) Optimization suggestions: Use indexes, avoid SELECT* and use transactions.

MySQL is suitable for beginners because it is simple to install, powerful and easy to manage data. 1. Simple installation and configuration, suitable for a variety of operating systems. 2. Support basic operations such as creating databases and tables, inserting, querying, updating and deleting data. 3. Provide advanced functions such as JOIN operations and subqueries. 4. Performance can be improved through indexing, query optimization and table partitioning. 5. Support backup, recovery and security measures to ensure data security and consistency.

The main role of MySQL in web applications is to store and manage data. 1.MySQL efficiently processes user information, product catalogs, transaction records and other data. 2. Through SQL query, developers can extract information from the database to generate dynamic content. 3.MySQL works based on the client-server model to ensure acceptable query speed.

MySQL is an open source relational database management system, mainly used to store and retrieve data quickly and reliably. Its working principle includes client requests, query resolution, execution of queries and return results. Examples of usage include creating tables, inserting and querying data, and advanced features such as JOIN operations. Common errors involve SQL syntax, data types, and permissions, and optimization suggestions include the use of indexes, optimized queries, and partitioning of tables.

InnoDB uses redologs and undologs to ensure data consistency and reliability. 1.redologs record data page modification to ensure crash recovery and transaction persistence. 2.undologs records the original data value and supports transaction rollback and MVCC.

MySQL's position in databases and programming is very important. It is an open source relational database management system that is widely used in various application scenarios. 1) MySQL provides efficient data storage, organization and retrieval functions, supporting Web, mobile and enterprise-level systems. 2) It uses a client-server architecture, supports multiple storage engines and index optimization. 3) Basic usages include creating tables and inserting data, and advanced usages involve multi-table JOINs and complex queries. 4) Frequently asked questions such as SQL syntax errors and performance issues can be debugged through the EXPLAIN command and slow query log. 5) Performance optimization methods include rational use of indexes, optimized query and use of caches. Best practices include using transactions and PreparedStatemen

MySQL is chosen for its performance, reliability, ease of use, and community support. 1.MySQL provides efficient data storage and retrieval functions, supporting multiple data types and advanced query operations. 2. Adopt client-server architecture and multiple storage engines to support transaction and query optimization. 3. Easy to use, supports a variety of operating systems and programming languages. 4. Have strong community support and provide rich resources and solutions.
