ASM的安裝配置
一、首先建立需要的使用者和使用者組,以及配置環境變數
使用root使用者執行:
/usr/sbin/groupadd -g 501 oinstall
/usr/sbin/groupadd -g 502 dba
/usr/sbin/groupadd -g 503 oper
/usr/sbin/groupadd -g 504 asmadmin
/usr/sbin/groupadd -g 505 asmoper
/usr/sbin/groupadd -g 506 asmdba
/usr/sbin/useradd -g oinstall -G dba,asmdba,oper oracle
/usr/sbin/useradd -g oinstall -G asmadmin,asmdba,asmoper,oper,dba grid
mkdir -p /opt/app/oracle/product/11.2.0/dbhome_1/
mkdir -p /opt/app/oracle/grid/product/11.2.0/grid
chown -R oracle:oinstall /opt/app
chown -R grid.oinstall /opt/app/oracle/grid
chomod -R 775 /opt
[grid@oracle ~]$ vi .bash_profile 新增以下內容
#ORACLE_11G
ORACLE_BASE=/opt/app/grid
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/grid
ORACLE_SID=+ASM
PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH
#end
二、檢查一下linux作業系統的版本
[root@oracle ~]# lsb_release -a
LSB Version: :core-3.1-amd64:core-3.1-ia32:core-3.1-noarch:graphics-3.1-amd64:graphics-3.1-ia32:graphics-3.1-noarch
Distributor ID: RedHatEnterpriseServer
Description: Red Hat Enterprise Linux Server release 5.4 (Tikanga)
Release: 5.4
Codename: Tikanga
[root@oracle ~]# uname -rm
2.6.18-194.el5 x86_64
然後到oracle官網去下載相應的asm rpm包,連結地址:http://www.oracle.com/technetwork/server-storage/linux/downloads/rhel5-084877.html
根據本機的配置,需要下載並安裝如下3個rpm包:
[root@oracle tmp]# ls -l *.rpm
-rwxrw-rw- 1 root root 137637 Dec 1 01:19 oracleasm-2.6.18-194.11.4.el5-2.0.5-1.el5.x86_64.rpm
-rwxrw-rw- 1 root root 14176 Dec 1 01:17 oracleasmlib-2.0.4-1.el5.x86_64.rpm
-rwxrw-rw- 1 root root 90225 Dec 1 01:17 oracleasm-support-2.1.8-1.el5.x86_64.rpm
[root@oracle tmp]#rpm -ivh oracleasm*
warning: oracleasm-2.6.18-164.el5-2.0.5-1.el5.i686.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing... ########################################### [100%]
1:oracleasm-support ########################################### [ 33%]
2:oracleasm-2.6.18-194.el####################################### [ 67%]
3:oracleasmlib ###############################################[100%]
三、配置ASMlib,再使用ASMlib之前,必須執行配置指令碼準備驅動程式:
[root@oracle tmp]# /etc/init.d/oracleasm configure
Configuring the Oracle ASM library driver.
This will configure the on-boot properties of the Oracle ASM library
driver. The following questions will determine whether the driver is
loaded on boot and what permissions it will have. The current values
will be shown in brackets ('[]'). Hitting <ENTER> without typing an
answer will keep that current value. Ctrl-C will abort.
Default user to own the driver interface []: oracle
Default group to own the driver interface []: dba
Start Oracle ASM library driver on boot (y/n) [n]: y
Scan for Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: done
Initializing the Oracle ASMLib driver: [ OK ]
Scanning the system for Oracle ASMLib disks: [ OK ]
[root@oracle tmp]# /etc/init.d/oracleasm enable
Writing Oracle ASM library driver configuration: done
Initializing the Oracle ASMLib driver: [ OK ]
Scanning the system for Oracle ASMLib disks: [ OK ]
root@oracle tmp]#/fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Command (m for help): p
Disk /dev/sdb: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-522, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-522, default 522):
Using default value 522
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
然後再對sdc分割槽
[root@oracle tmp]# partprobe
[root@oracle tmp]# /etc/init.d/oracleasm createdisk vol1 /dev/sdb
Marking disk "vol1" as an ASM disk: [ OK ]
[root@oracle tmp]# /etc/init.d/oracleasm createdisk vol2 /dev/sdc
五、安裝grid
grid地址http://www.oracle.com/technetwork/database/enterprise-edition/downloads/112010-linx8664soft-100572.html





檢查依賴關係,有些可以通過grid自帶指令碼修復,點下面的fix&Check Again,他會提示你跑某個指令碼去修復。
例如 CVU_11.2.0.1.0_grid/runfixup.sh這個指令碼修復
[root@oracle CVU_11.2.0.1.0_grid]# ./CVU_11.2.0.1.0_grid/runfixup.sh

安裝

安裝到76%時 ,需要root跑指令碼,成功後,基本上過一會就安裝完成了

[root@oracle CVU_11.2.0.1.0_grid]# sh /opt/app/oracle/grid/product/11.2.0/grid/root.sh
Running Oracle 11g root.sh script...
The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME= /opt/app/oracle/grid/product/11.2.0/grid
Enter the full pathname of the local bin directory: [/usr/local/bin]:
The file "dbhome" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]:
The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]:
The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]:
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
2015-12-01 22:32:13: Checking for super user privileges
2015-12-01 22:32:13: User has super user privileges
2015-12-01 22:32:13: Parsing the host name
Using configuration parameter file: /opt/app/oracle/grid/product/11.2.0/grid/crs/install/crsconfig_params
Creating trace directory
LOCAL ADD MODE
Creating OCR keys for user 'grid', privgrp 'oinstall'..
Operation successful.
CRS-4664: Node oracle successfully pinned.
Adding daemon to inittab
CRS-4123: Oracle High Availability Services has been started.
ohasd is starting
oracle 2015/12/01 22:32:54 /opt/app/oracle/grid/product/11.2.0/grid/cdata/oracle/backup_20151201_223254.olr
Successfully configured Oracle Grid Infrastructure for a Standalone Server
Updating inventory properties for clusterware
Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB. Actual 3039 MB Passed
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /opt/app/oracle/oraInventory
'UpdateNodeList' was successful.
使用root使用者執行:
/usr/sbin/groupadd -g 501 oinstall
/usr/sbin/groupadd -g 502 dba
/usr/sbin/groupadd -g 503 oper
/usr/sbin/groupadd -g 504 asmadmin
/usr/sbin/groupadd -g 505 asmoper
/usr/sbin/groupadd -g 506 asmdba
/usr/sbin/useradd -g oinstall -G dba,asmdba,oper oracle
/usr/sbin/useradd -g oinstall -G asmadmin,asmdba,asmoper,oper,dba grid
mkdir -p /opt/app/oracle/product/11.2.0/dbhome_1/
mkdir -p /opt/app/oracle/grid/product/11.2.0/grid
chown -R oracle:oinstall /opt/app
chown -R grid.oinstall /opt/app/oracle/grid
chomod -R 775 /opt
[grid@oracle ~]$ vi .bash_profile 新增以下內容
#ORACLE_11G
ORACLE_BASE=/opt/app/grid
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/grid
ORACLE_SID=+ASM
PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH
#end
二、檢查一下linux作業系統的版本
[root@oracle ~]# lsb_release -a
LSB Version: :core-3.1-amd64:core-3.1-ia32:core-3.1-noarch:graphics-3.1-amd64:graphics-3.1-ia32:graphics-3.1-noarch
Distributor ID: RedHatEnterpriseServer
Description: Red Hat Enterprise Linux Server release 5.4 (Tikanga)
Release: 5.4
Codename: Tikanga
[root@oracle ~]# uname -rm
2.6.18-194.el5 x86_64
然後到oracle官網去下載相應的asm rpm包,連結地址:http://www.oracle.com/technetwork/server-storage/linux/downloads/rhel5-084877.html
根據本機的配置,需要下載並安裝如下3個rpm包:
[root@oracle tmp]# ls -l *.rpm
-rwxrw-rw- 1 root root 137637 Dec 1 01:19 oracleasm-2.6.18-194.11.4.el5-2.0.5-1.el5.x86_64.rpm
-rwxrw-rw- 1 root root 14176 Dec 1 01:17 oracleasmlib-2.0.4-1.el5.x86_64.rpm
-rwxrw-rw- 1 root root 90225 Dec 1 01:17 oracleasm-support-2.1.8-1.el5.x86_64.rpm
[root@oracle tmp]#rpm -ivh oracleasm*
warning: oracleasm-2.6.18-164.el5-2.0.5-1.el5.i686.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing... ########################################### [100%]
1:oracleasm-support ########################################### [ 33%]
2:oracleasm-2.6.18-194.el####################################### [ 67%]
3:oracleasmlib ###############################################[100%]
三、配置ASMlib,再使用ASMlib之前,必須執行配置指令碼準備驅動程式:
[root@oracle tmp]# /etc/init.d/oracleasm configure
Configuring the Oracle ASM library driver.
This will configure the on-boot properties of the Oracle ASM library
driver. The following questions will determine whether the driver is
loaded on boot and what permissions it will have. The current values
will be shown in brackets ('[]'). Hitting <ENTER> without typing an
answer will keep that current value. Ctrl-C will abort.
Default user to own the driver interface []: oracle
Default group to own the driver interface []: dba
Start Oracle ASM library driver on boot (y/n) [n]: y
Scan for Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: done
Initializing the Oracle ASMLib driver: [ OK ]
Scanning the system for Oracle ASMLib disks: [ OK ]
[root@oracle tmp]# /etc/init.d/oracleasm enable
Writing Oracle ASM library driver configuration: done
Initializing the Oracle ASMLib driver: [ OK ]
Scanning the system for Oracle ASMLib disks: [ OK ]
root@oracle tmp]#/fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Command (m for help): p
Disk /dev/sdb: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-522, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-522, default 522):
Using default value 522
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
然後再對sdc分割槽
[root@oracle tmp]# partprobe
[root@oracle tmp]# /etc/init.d/oracleasm createdisk vol1 /dev/sdb
Marking disk "vol1" as an ASM disk: [ OK ]
[root@oracle tmp]# /etc/init.d/oracleasm createdisk vol2 /dev/sdc
五、安裝grid
grid地址http://www.oracle.com/technetwork/database/enterprise-edition/downloads/112010-linx8664soft-100572.html





檢查依賴關係,有些可以通過grid自帶指令碼修復,點下面的fix&Check Again,他會提示你跑某個指令碼去修復。
例如 CVU_11.2.0.1.0_grid/runfixup.sh這個指令碼修復
[root@oracle CVU_11.2.0.1.0_grid]# ./CVU_11.2.0.1.0_grid/runfixup.sh

安裝

安裝到76%時 ,需要root跑指令碼,成功後,基本上過一會就安裝完成了

[root@oracle CVU_11.2.0.1.0_grid]# sh /opt/app/oracle/grid/product/11.2.0/grid/root.sh
Running Oracle 11g root.sh script...
The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME= /opt/app/oracle/grid/product/11.2.0/grid
Enter the full pathname of the local bin directory: [/usr/local/bin]:
The file "dbhome" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]:
The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]:
The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]:
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
2015-12-01 22:32:13: Checking for super user privileges
2015-12-01 22:32:13: User has super user privileges
2015-12-01 22:32:13: Parsing the host name
Using configuration parameter file: /opt/app/oracle/grid/product/11.2.0/grid/crs/install/crsconfig_params
Creating trace directory
LOCAL ADD MODE
Creating OCR keys for user 'grid', privgrp 'oinstall'..
Operation successful.
CRS-4664: Node oracle successfully pinned.
Adding daemon to inittab
CRS-4123: Oracle High Availability Services has been started.
ohasd is starting
oracle 2015/12/01 22:32:54 /opt/app/oracle/grid/product/11.2.0/grid/cdata/oracle/backup_20151201_223254.olr
Successfully configured Oracle Grid Infrastructure for a Standalone Server
Updating inventory properties for clusterware
Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB. Actual 3039 MB Passed
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /opt/app/oracle/oraInventory
'UpdateNodeList' was successful.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/27500440/viewspace-1852592/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- RAC安裝【AIX 7 + 11.2.0.4 + ASM】AIASM
- 【Oracle】ASM例項安裝入門OracleASM
- ASM入網小助手解除安裝ASM
- ASM單例項安裝後,需要手動設定ASM的引數檔案ASM單例
- zabbix的安裝配置
- JDK的安裝配置JDK
- rsync的安裝配置
- centos7 (阿里雲、linux) 單機spark的安裝與配置詳解(jdk安裝與配置,scala安裝與配置,hadoop安裝與配置,spark安裝與配置)CentOS阿里LinuxSparkJDKHadoop
- 本地windows搭建spark環境,安裝與詳細配置(jdk安裝與配置,scala安裝與配置,hadoop安裝與配置,spark安裝與配置)WindowsSparkJDKHadoop
- RAC之grid叢集安裝及ASM磁碟組配置ASM
- Anaconda的安裝配置及Python配置Python
- OSWatcher的安裝、配置、使用
- Nginx的安裝配置使用Nginx
- Redis的安裝與配置Redis
- Flutter的安裝和配置Flutter
- conda安裝後的配置
- Vue的安裝與配置Vue
- Barrier 的安裝和配置
- MariaDB的安裝與配置
- leanote安裝配置
- JENKINS安裝配置Jenkins
- oracle安裝配置Oracle
- ceph安裝配置
- 【mongodb安裝配置】MongoDB
- ELK 安裝配置
- 安裝配置ETCD
- SwitchOmega 安裝配置
- MySQL安裝配置MySql
- JWT安裝配置JWT
- Prometheus安裝配置Prometheus
- MariaDB 安裝配置
- ccache安裝配置
- alertmanager安裝配置
- VNC安裝配置VNC
- Hive安裝配置Hive
- Zookeeper 安裝配置
- PotPlayer 配置安裝
- Manjaro Liunx 安裝到使用 2 安裝後的配置JAR
- SSH免密登入+JDK安裝配置+Hadoop安裝配置JDKHadoop