ORACLE 11.2.0.3配置ASM
【環境說明】本文件介紹在OEL6.3的環境下安裝基於ASM 11.2.0.3的ORACLE資料庫的安裝;
虛擬機器:VMware 10
OS:Oracle Linux Server release 6.3
DB:11.2.0.3
【一】作業系統的安裝:這邊省略
【二】準備工作
1、執行環境包的安裝,掛載系統盤
[root@idbtcsv1222 Packages]# cd /media/OL6.3 x86_64 Disc 1 20120626/Packages
rpm -ivh compat-libcap1-1.10-1.x86_64.rpm
rpm -ivh compat-libstdc++-33-3.2.3-69.el6.x86_64.rpm
rpm -ivh libgcc-4.4.6-4.el6.i686.rpm
rpm -ivh kernel-headers-2.6.32-279.el6.x86_64.rpm
rpm -ivh glibc-headers-2.12-1.80.el6.x86_64.rpm
rpm -ivh glibc-devel-2.12-1.80.el6.x86_64.rpm
rpm -ivh libgomp-4.4.6-4.el6.x86_64.rpm
rpm -ivh mpfr-2.4.1-6.el6.x86_64.rpm
rpm -ivh ppl-0.10.2-11.el6.x86_64.rpm
rpm -ivh cpp-4.4.6-4.el6.x86_64.rpm
rpm -ivh cloog-ppl-0.15.7-1.2.el6.x86_64.rpm
rpm -ivh gcc-4.4.6-4.el6.x86_64.rpm
rpm -ivh libstdc++-devel-4.4.6-4.el6.x86_64.rpm
rpm -ivh gcc-c++-4.4.6-4.el6.x86_64.rpm
rpm -ivh libaio-devel-0.3.107-10.el6.x86_64.rpm
rpm -ivh libaio-devel-0.3.107-10.el6.i686.rpm
rpm -ivh xinetd-2.3.14-34.el6.x86_64.rpm
rpm -ivh rsh-server-0.17-60.el6.x86_64.rpm
rpm -ivh ksh-20100621-16.el6.x86_64.rpm
rpm -ivh tigervnc-server-1.0.90-0.17.20110314svn4359.el6.x86_64.rpm
2、修改引數檔案
在/etc/sysctl.conf配置檔案中新增如下:
kernel.shmall = 4294967296
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
#kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586
net.ipv4.ip_local_port_range = 9000 65500
然後執行以下生效:
[root@db01 ~]# sysctl -p
在/etc/security/limits.conf配置檔案中新增如下:
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
grid soft nproc 2047
grid hard nproc 16384
grid soft nofile 1024
grid hard nofile 65536
在/etc/pam.d/login配置檔案中新增:
session required pam_limits.so
在/etc/profile配置檔案中新增:
if [ $USER = "oracle" ] || [ $USER = "grid" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
關閉防火牆:service iptables stop
3、建立目錄
[root@db01 ~]# mkdir -p /u01/app/oracle
[root@db01 ~]# chown -R oracle:oinstall /u01
[root@db01 ~]# chmod -R 775 /u01
4、建立使用者和角色
[root@db01 Packages]# groupadd oinstall
[root@db01 Packages]# groupadd dba
[root@db01 Packages]# groupadd asmadmin
[root@db01 Packages]# groupadd asmdba
[root@db01 Packages]# useradd -g oinstall -G asmdba,asmadmin,dba grid
[root@db01 Packages]# useradd -g oinstall -G dba,asmdba oracle
[root@db01 Packages]# passwd grid
oracle如下:
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
export ORACLE_BASE=/u01/app/oracle
export ORACLE_SID=rac
export PATH=/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/oracle/bin:/u01/app/oracle/product/11.2.0/dbhome_1/bin:/u01/app/oracle/product/11.2.0/dbhome_1/OPatch
4
grid如下
export ORACLE_BAS=/u01/app/grid
export ORACLE_HOME=/u01/app/grid/product/11.2.0/grid
export ORACLE_SID=+ASM
export PATH=/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/oracle/bin:/u01/app/grid/product/11.2.0/grid/bin:/u01/app/grid/product/11.2.0/grid/OPatch
5、建立硬碟,用於做ASM
虛擬機器新增三塊磁碟,不需要做其他操作
[root@db01 Packages]# fdisk -l
Disk /dev/sdb: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/sda: 42.9 GB, 42949672960 bytes
255 heads, 63 sectors/track, 5221 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0005e624
Device Boot Start End Blocks Id System
/dev/sda1 * 1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 64 5222 41430016 8e Linux LVM
Disk /dev/sdc: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/sdd: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
顯示系統已有三塊硬碟
[root@db01 Packages]# vi /etc/udev/rules.d/60-raw.rules
新增如下:
ACTION=="add", KERNEL=="sdb", RUN+="/bin/raw /dev/raw/raw1 %N"
ACTION=="add", KERNEL=="sdc", RUN+="/bin/raw /dev/raw/raw2 %N"
ACTION=="add", KERNEL=="sdd", RUN+="/bin/raw /dev/raw/raw3 %N"
KERNEL=="raw*", OWNER="grid" GROUP="dba", MODE="0660"
【三】安裝GRID,ORACLE從11G開始,當需要使用ASM、RAC功能的時候就需要安裝單獨的GRID,ORACLE Patchset有7個檔案
第一二個包表示database,升級和安裝資料庫,只需要這2個檔案即可。
第三個包表示grid,用來升級RAC 的CRS。安裝RAC和ASM需要這個檔案
第四個表示客戶端,
第五個表示gateways,
第六個表示 examples, 這個是我們的示例檔案安裝包。
第七個表示deinstall
安裝截圖:
[grid@db01 ~]$ sqlplus / as sysasm
SQL> select instance_name,status from v$instance;
INSTANCE_NAME STATUS
---------------- ------------
+ASM MOUNT
【四】安裝資料庫,安裝的步驟跟普通安裝的步驟是一樣的,主要是以下這個截圖需要注意
【五】ASM常用SQL語句
SQL> select file_name from dba_data_files;
FILE_NAME
--------------------------------------------------------------------------------
+DATA/rac/datafile/users.259.896831997
+DATA/rac/datafile/undotbs1.258.896831997
+DATA/rac/datafile/sysaux.257.896831997
+DATA/rac/datafile/system.256.896831997
SQL> select name,total_mb,state from v$asm_diskgroup;
NAME TOTAL_MB STATE
------------------------------ ---------- -----------
DATA 92160 CONNECTED
SQL> select instance_name,db_name,status from v$asm_client;
INSTANCE_NAME B_NAME STATUS
-------------------- ------------- -----------
+ASM rac CONNECTED
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/12679300/viewspace-2020712/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle 11.2.0.3 管理ASM例項OracleASM
- Oracle 11.2.0.3管理ASM例項OracleASM
- OEL5.6+oracle11.2.0.3+ASM安裝OracleASM
- 安裝ORACLE 11.2.0.3 ASM for AIX HA (Non-RAC)OracleASMAI
- Oracle ASM 配置錯誤OracleASM
- oracle 11.2.0.3 rac資料庫線上新增ASM儲存空間Oracle資料庫ASM
- oracle 11.2.0.3 單機 asm 儲存打psu 10補丁OracleASM
- RAC 11.2.0.3 ASM管理 (一) 引數ASM
- 配置Oracle 10g ASM磁碟Oracle 10gASM
- SUSE 11.1 安裝ORACLE 11.2.0.3 ASM非RAC雙機過程紀要OracleASM
- UDEV方式配置Oracle RAC ASM共享磁碟devOracleASM
- rhel5.4+oracle_10g+asm 手工配置OracleASM
- RAC 11.2.0.3 SACN與DNS配置DNS
- 坑爹的Oracle 11.2.0.3Oracle
- 11.2.0.3 RAC 全過程--6.Configure ASMASM
- 【BUILD_ORACLE】Oracle RAC配置ASM Filter Driver(ASMFD)(二)詳細配置步驟UIOracleASMFilter
- Oracle ASM (10) - ASM中優先讀failure group配置ASM_PREFERRED_READ_FAILURE_GROUPSOracleASMAI
- Oracle ASM (11) - ASM中優先讀failure group配置ASM_PREFERRED_READ_FAILURE_GROUPSOracleASMAI
- linux 配置oracle+asm自動啟動LinuxOracleASM
- oracle10g中的asm的配置(轉)OracleASM
- 【Oracle】RHEL6.4-64位 安裝oracle11.2.0.3(六) 建庫後相關配置Oracle
- Oracle 11.2.0.3 Download LinkOracle
- oracle asmOracleASM
- 【ASK_ORACLE】Oracle RAC配置ASM Filter Driver(ASMFD)(一)ASMFD簡介OracleASMFilter
- 簡單配置ASMASM
- asm重新配置ASM
- Solaris下配置ASMASM
- 配置並建立ASMASM
- Oracle 11.2.0.1 升級到11.2.0.3Oracle
- “神奇”的oracle 11.2.0.3 RMAN恢復Oracle
- ORACLE 11.2.0.1升級到11.2.0.3Oracle
- Oracle 11.2.0.1升級到11.2.0.3Oracle
- Oracle 10gR2 下配置簡單ASM例項Oracle 10gASM
- 【ORACLE ASM】ASM 支援工具簡介OracleASM
- oracle asm命令OracleASM
- Oracle ASM 管理OracleASM
- Oracle ASM 限制OracleASM
- oracle asm asmcmdOracleASM