RHEL6 ASM方式安装Oracle 11g R2
RHEL6 ASM方式安装Oracle 11g R2教程目录: 一、安装前的准备二、安装网格基础架构三、安装数据库软件四、创建监听五、创建数据库
RHEL6 ASM方式安装Oracle 11g R2教程目录:
一、安装前的准备
二、安装网格基础架构
三、安装数据库软件
四、创建监听
五、创建数据库实例
一、安装前的准备
1.1 确定操作系统环境
# cat /etc/RedHat-release
Red Hat Enterprise Linux Server release 6.2 (Santiago)
Kernel \r on an \m
# free -m
total used free shared buffers cached
Mem: 2008 1309 699 0 62 875
-/+ buffers/cache: 371 1637
Swap: 509 0 509
# fdisk -l
Disk /dev/sda: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 5 40131 83 Linux
/dev/sda2 6 2172 17406427+ 8e Linux LVM
/dev/sda3 2173 2237 522112+ 82 Linux swap / Solaris
/dev/sda4 2238 3916 13486567+ 5 Extended
/dev/sda5 2238 2542 2449881 83 Linux
/dev/sda6 2543 2847 2449881 83 Linux
/dev/sda7 2848 3152 2449881 83 Linux
/dev/sda8 3153 3457 2449881 83 Linux
/dev/sda9 3458 3765 3077120 83 Linux
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/Vol0-root
7.6G 3.2G 4.1G 41% /
/dev/mapper/Vol0-oracle
8.6G 101M 747M 1% /u01
/dev/sda1 38M 16M 21M 42% /boot
tmpfs 1005M 0 1005M 0% /dev/shm
如果没有满足1G内存的要求,虽然对安装的影响也不是很大,但会在安装正式开始前收到一个先决条件检查不通过的“友情警告”信息。
Swap交换区大小与物理内存大小的比例关系的一般规律如下:
这边仅用于测试,故只分配了512M的swap空间,可以忽略警告信息。
因为Oracle 11gR2中,ASM必须单独安装Grid Infrastructure,再加上数据库软件的安装,所需要的磁盘大小一般不超过8G,所以应保证/u01目录所在的文件系统可用空间在8G以上即可。
数据库文件将采用ASM方式存储,这里用了4个2.5G的raw分区用于活动的数据库文件+DATA的ASM磁盘组,1个3G的raw分区用于闪回恢复区+FRA的ASM磁盘组
因为在安装过程中,有一部分数据会写入到“/tmp”目录下,建议该目录所在的文件系统空间大小不要小于1G
1.2 网络参数的配置
# cat /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=ora11g.vnimos.org
# service NetworkManager stop
# chkconfig NetworkManager off
# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=static
HWADDR=00:0C:29:32:C3:9C
IPADDR=192.168.0.90
NETMASK=255.255.255.0
ONBOOT=yes
# cat /etc/hosts
127.0.0.1 localhost.localdomain localhost
192.168.0.90 ora11g.vnimos.org ora11g
//必须至少包含以上两行、三列(IP 长名 短名),否则安装的时候将会出现”Oracle Net Configuration Assistant failed”的错误
1.3 oracle用户环境变量、系统参数的配置
# groupadd oinstall
# groupadd dba
# useradd -g oinstall -G dba,root oracle
# echo "oracle" | passwd --stdin oracle
# mkdir -p /u01/app/{oracle,oraInventory}
# chown oracle:oinstall /u01/app/oracle
# chown oracle:oinstall /u01/app/oraInventory
# vi /home/oracle/.bash_profile
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
export ORACLE_SID=orcl
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib:/usr/X11R6/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/rdbms/lib
export CLASS_PATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib
export CLASS_PATH=$CLASS_PATH:$ORACLE_HOME/rdbms/jlib
export CLASS_PATH=$CLASS_PATH:$ORACLE_HOME/network/jlib
export TNS_ADMIN=$ORACLE_HOME/network/admin
export NLS_LANG=american_america.AL32UTF8
export ORACLE_TERM=xterm
export EDITOR=vi
export PATH=$ORACLE_HOME/bin:$PATH
export LANG=en_US
# vi /etc/sysctl.conf
kernel.shmmax = 1073741824 //物理内存的一半(字节)
# sysctl -p
1.4 绑定裸设备(用于创建ASM磁盘组,,更详细的内容请参考:)

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











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.

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.

Compared with other programming languages, MySQL is mainly used to store and manage data, while other languages such as Python, Java, and C are used for logical processing and application development. MySQL is known for its high performance, scalability and cross-platform support, suitable for data management needs, while other languages have advantages in their respective fields such as data analytics, enterprise applications, and system programming.

MySQL index cardinality has a significant impact on query performance: 1. High cardinality index can more effectively narrow the data range and improve query efficiency; 2. Low cardinality index may lead to full table scanning and reduce query performance; 3. In joint index, high cardinality sequences should be placed in front to optimize query.

The basic operations of MySQL include creating databases, tables, and using SQL to perform CRUD operations on data. 1. Create a database: CREATEDATABASEmy_first_db; 2. Create a table: CREATETABLEbooks(idINTAUTO_INCREMENTPRIMARYKEY, titleVARCHAR(100)NOTNULL, authorVARCHAR(100)NOTNULL, published_yearINT); 3. Insert data: INSERTINTObooks(title, author, published_year)VA

MySQL is suitable for web applications and content management systems and is popular for its open source, high performance and ease of use. 1) Compared with PostgreSQL, MySQL performs better in simple queries and high concurrent read operations. 2) Compared with Oracle, MySQL is more popular among small and medium-sized enterprises because of its open source and low cost. 3) Compared with Microsoft SQL Server, MySQL is more suitable for cross-platform applications. 4) Unlike MongoDB, MySQL is more suitable for structured data and transaction processing.

InnoDBBufferPool reduces disk I/O by caching data and indexing pages, improving database performance. Its working principle includes: 1. Data reading: Read data from BufferPool; 2. Data writing: After modifying the data, write to BufferPool and refresh it to disk regularly; 3. Cache management: Use the LRU algorithm to manage cache pages; 4. Reading mechanism: Load adjacent data pages in advance. By sizing the BufferPool and using multiple instances, database performance can be optimized.

MySQL efficiently manages structured data through table structure and SQL query, and implements inter-table relationships through foreign keys. 1. Define the data format and type when creating a table. 2. Use foreign keys to establish relationships between tables. 3. Improve performance through indexing and query optimization. 4. Regularly backup and monitor databases to ensure data security and performance optimization.
