阿里云-云小站(无限量代金券发放中)
【腾讯云】云服务器、云数据库、COS、CDN、短信等热卖云产品特惠抢购

RHEL6.5安装 Oracle 11g + udev + ASM安装部署详解

111次阅读
没有评论

共计 22979 个字符,预计需要花费 58 分钟才能阅读完成。

最近在学 Oracle 体系结构等理论知识,在这里总结 RHEL6.5 下安装 Oracle 11g + udev + ASM 安装部署流程。

实验环境

 RedHat Enterprise Linux 6.5 x86_64    IP 地址:192.168.60.100
 Oracle 11g release 11.2.0.4

系统安装在此略过,IP 地址已经更改完成,首先通过 ssh 协议登陆到 RHEL 系统,配置 YUM 本地源环境,安装 Oracle 所必须的软件依赖包;

[c:\~]$ ssh root@192.168.60.100
[root@rhel6 ~]# vi /etc/yum.conf
[local]                                             // 修改本地 YUM 源环境;
name=local
baseurl=file:///mnt
gpgcheck=0
enabled=1
[root@rhel6 ~]# mount /dev/sr0 /mnt/                // 挂载本地光盘作为 YUM 源;
mount: block device /dev/sr0 is write-protected, mounting read-only
[root@rhel6 ~]# yum repolist                        // 检测本地 YUM 源配置是否正确;
Loaded plugins: product-id, refresh-packagekit, security,
              : subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
local                                        | 3.9 kB     00:00 ... 
local/primary_db                             | 3.1 MB     00:00 ... 
repo id                         repo name                     status
local                           local                         3,690
repolist: 3,690
[root@rhel6 ~]#yum install binutils -y            // 通过 YUM 安装 Oracle 所必须的软件包;
[root@rhel6 ~]#yum install compat-libcap1 -y
[root@rhel6 ~]#yum install compat-libstdc++-33 -y
[root@rhel6 ~]#yum install gcc -y
[root@rhel6 ~]#yum install gcc-c++ -y
[root@rhel6 ~]#yum install glibc -y
[root@rhel6 ~]#yum install glibc-devel -y
[root@rhel6 ~]#yum install ksh -y
[root@rhel6 ~]#yum install libgcc -y
[root@rhel6 ~]#yum install libstdc++ -y
[root@rhel6 ~]#yum install libstdc++-devel -y
[root@rhel6 ~]#yum install libaio -y
[root@rhel6 ~]#yum install libaio-devel -y
[root@rhel6 ~]#yum install libXext -y
[root@rhel6 ~]#yum install libXtst -y
[root@rhel6 ~]#yum install libX11 -y
[root@rhel6 ~]#yum install libXau -y
[root@rhel6 ~]#yum install libxcb -y
[root@rhel6 ~]#yum install libXi -y
[root@rhel6 ~]#yum install make -y
[root@rhel6 ~]#yum install sysstat -y
[root@rhel6 ~]#yum install unixODBC -y
[root@rhel6 ~]#yum install unixODBC-devel -y

修改相应的系统主机名以及 IP 地址

[root@rhel6 ~]# vi /etc/hosts 
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
192.168.60.100  rhel6

添加相应的 grid 用户及用户组

[root@rhel6 ~]# groupadd -g 501 oinstall
[root@rhel6 ~]# groupadd -g 502 dba
[root@rhel6 ~]# groupadd -g 503 oper
[root@rhel6 ~]# groupadd -g 504 asmadmin
[root@rhel6 ~]# groupadd -g 505 asmoper
[root@rhel6 ~]# groupadd -g 506 asmdba
[root@rhel6 ~]# useradd -g oinstall -G dba,asmdba,oper oracle
[root@rhel6 ~]# useradd -g oinstall -G asmadmin,asmdba,asmoper,oper,dba grid
[root@rhel6 ~]# passwd oracle
[root@rhel6 ~]# passwd grid

创建 Grid Infrastructure 组件安装目录

[root@rhel6 ~]# mkdir -p /u01/app/grid
[root@rhel6 ~]# mkdir -p /u01/app/11.2.0/grid
[root@rhel6 ~]# chown -R grid:oinstall /u01
[root@rhel6 ~]# mkdir -p /u01/app/oraInventory
[root@rhel6 ~]# chown -R grid:oinstall /u01/app/oraInventory
[root@rhel6 ~]# mkdir -p /u01/app/oracle
[root@rhel6 ~]# chown -R oracle:oinstall /u01/app/oracle
[root@rhel6 ~]# chmod -R 775 /u01

修改操作系统参数

[root@rhel6 ~]# vi /etc/security/limits.conf
grid       soft   nproc   2047 
grid       hard   nproc   16384
grid       soft   nofile  1024
grid       hard   nofile  65536
grid       soft   stack   10240
grid       hard   stack   32768
oracle     soft   nproc   2047
oracle     hard   nproc   16384
oracle     soft   nofile  1024
oracle     hard   nofile  65536
oracle     soft   stack   10240
oracle     hard   stack   32768

修改 Linux 服务器 ulmits 限制

[root@rhel6 ~]# vi /etc/security/limits.d/90-nproc.conf
#*          soft    nproc     1024
* - nproc 16384

禁用 SELINUX 安全限制

[root@rhel6 ~]# vi /etc/selinux/config
SELINUX=disabled                                // 修改配置文件永久关闭 selinux;
[root@rhel6 ~]# setenforce 0

关闭 IPTABLES 防火墙

[root@rhel6 ~]# service iptables stop
iptables: Setting chains to policy ACCEPT: filter          [OK]
iptables: Flushing firewall rules:                         [OK]
iptables: Unloading modules:                               [OK] 
[root@rhel6 ~]# chkconfig --level 35 iptables off          //3、5 级别永久关闭 iptables;

修改 Linux 操作系统的登陆配置文件

[root@rhel6 ~]# vi /etc/pam.d/login
session    required     pam_limits.so

修改 Linux 系统内核 Kernel 配置

[root@rhel6 ~]# vi /etc/sysctl.conf
#kernel.shmmax = 68719476736                // 注释掉原先的系统的配置;
#kernel.shmall = 4294967296
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmmax = 858993459                   // 大于 SGA, 小于物理内存;
kernel.shmall = 1048576                     // 物理内存 %4K;
kernel.shmmni = 4096
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
[root@rhel6 ~]# sysctl -p

配置 grid 和 oracle 用户的环境变量

[root@rhel6 ~]# su - grid                        //grid 用户环境变量配置;
[grid@rhel6 ~]$ vi .bash_profile 
PS1="[`whoami`@`hostname`:"'$PWD]$'
export PS1
umask 022
export TMP=/tmp
export LANG=en_US
export TMPDIR=$TMP
export ORACLE_HOSTNAME=rhel6
ORACLE_SID=+ASM; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
ORACLE_BASE=/u01/app/gridexport ORACLE_BASE
ORACLE_HOME=/u01/app/11.2.0/gridexport ORACLE_HOME
NLS_DATE_FORMAT="yyyy-mm-dd HH24:MI:SS"export NLS_DATE_FORMAT
PATH=.:$PATH:$HOME/bin:$ORACLE_HOME/binexport PATH
THREADS_FLAG=native; export THREADS_FLAG
if [$USER = "oracle" ] || [$USER = "grid" ]; then
        if [$SHELL = "/bin/ksh" ]; then
            ulimit -p 16384
              ulimit -n 65536
  else
   ulimit -u 16384 -n 65536
      fi
    umask 022
fi
----------------------------------------------------------------------------
[root@rhel6 ~]# su - oracle
[oracle@rhel6 ~]$ vi .bash_profile 
TMP=/tmpexport TMP
TMPDIR=$TMP; export TMPDIR
export LANG=en_US
ORACLE_BASE=/u01/app/oracleexport ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0; export ORACLE_HOME
ORACLE_SID=itpuxdb; export ORACLE_SID
export ORACLE_UNQNAME=orcl
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/libexport LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlibexport CLASSPATH
NLS_DATE_FORMAT="yyyy-mm-dd HH24:MI:SS"export NLS_DATE_FORMAT
NLS_LANG=AMERICAN_AMERICA.ZHS16GBK;export NLS_LANG
if [$USER = "oracle" ] || [$USER = "grid" ]; then
        if [$SHELL = "/bin/ksh" ]; then
         ulimit -p 16384
              ulimit -n 65536
        else
              ulimit -u 16384 -n 65536
        fi
        umask 022
fi

配置 udev 配置 ASM(在此系统所用磁盘为 /dev/sda),

[root@rhel6 ~]# fdisk /dev/(sdb\sdc\sdd\sde\sdf)          // 对磁盘进行分区;
[root@rhel6 ~]# vi /etc/udev/rules.d/99-oracle-asmdevices.rules
KERNEL=="sdb1", NAME="asm_grid1", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sdc1", NAME="asm_system", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sdd1", NAME="asm_recovery", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sde1", NAME="asm_data01", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sdf1", NAME="asm_data02", OWNER="grid", GROUP="asmadmin", MODE="0660"
[root@rhel6 ~]# partprobe /dev/sdb1
[root@rhel6 ~]# partprobe /dev/sdc1
[root@rhel6 ~]# partprobe /dev/sdd1
[root@rhel6 ~]# partprobe /dev/sde1
[root@rhel6 ~]# partprobe /dev/sdf1
[root@rhel6 ~]# udevadm control --reload-rules
[root@rhel6 ~]# start_udev 
Starting udev:                                             [OK]
[root@rhel6 ~]# ls -lsa /dev/asm*
0 brw-rw----. 1 grid asmadmin 865 May 24 05:48 /dev/asm_data01
0 brw-rw----. 1 grid asmadmin 881 May 24 05:48 /dev/asm_data02
0 brw-rw----. 1 grid asmadmin 817 May 24 05:48 /dev/asm_grid1
0 brw-rw----. 1 grid asmadmin 849 May 24 05:48 /dev/asm_recovery
0 brw-rw----. 1 grid asmadmin 833 May 24 05:48 /dev/asm_system

上传 Oracle 安装包到服务器

[root@rhel6 ~]#yum -y install lrzsz            // 安装 xshell 所用的 FTP 软件;
[root@rhel6 ~]#unzip  p13390677_112040_Linux-x86-64_3of7.zip 
[root@rhel6 ~]# chown -R grid:oinstall  /opt/grid/

配置 VNC 远程桌面

[root@rhel6 ~]# yum -y install vnc-server
[root@rhel6 opt]# su - grid
[grid@rhel6:/home/grid]$vncserver 
You will require a password to access your desktops.
Password:
Verify:
xauth:  creating new authority file /home/grid/.Xauthority
New 'rhel6:1 (grid)' desktop is rhel6:1
Creating default startup script /home/grid/.vnc/xstartup
Starting applications specified in /home/grid/.vnc/xstartup
Log file is /home/grid/.vnc/rhel6:1.log

 VNC 远程桌面连接配置安装 Grid Infrastructure 组件

[grid@rhel6 ~]$ cd /opt/grid/
[grid@rhel6 grid]$ ./runInstaller

选择单节点安装配置 Grid Infrastructure

RHEL6.5 安装 Oracle 11g + udev + ASM 安装部署详解

选择语言环境

RHEL6.5 安装 Oracle 11g + udev + ASM 安装部署详解

扫描 ASM 磁盘

RHEL6.5 安装 Oracle 11g + udev + ASM 安装部署详解

更多详情见请继续阅读下一页的精彩内容 :http://www.linuxidc.com/Linux/2017-05/144271p2.htm

配置统一的账户密码

RHEL6.5 安装 Oracle 11g + udev + ASM 安装部署详解

环境变量配置正确的情况下会自动识别用户组

RHEL6.5 安装 Oracle 11g + udev + ASM 安装部署详解

配置安装目录(可手动调整)

RHEL6.5 安装 Oracle 11g + udev + ASM 安装部署详解

检测依赖包等信息后,出现警告(因测试虚拟机内存较少,未能达到 Oracle 推荐值这里可以忽略)

RHEL6.5 安装 Oracle 11g + udev + ASM 安装部署详解

执行所要求的脚本

RHEL6.5 安装 Oracle 11g + udev + ASM 安装部署详解

[root@rhel6 ~]# /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.
[root@rhel6 ~]# /u01/app/11.2.0/grid/root.sh
Performing root user operation for Oracle 11g
The following environment variables are set as:
    ORACLE_OWNER= grid
    ORACLE_HOME=  /u01/app/11.2.0/grid
Enter the full pathname of the local bin directory: [/usr/local/bin]: 
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...
Creating /etc/oratab file...
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 script.
Now product-specific root actions will be performed.
Using configuration parameter file/u01/app/11.2.0/grid/crs/install/crsconfig_params
Creating trace directory
LOCAL ADD MODE 
Creating OCR keys for user 'grid', privgrp 'oinstall'..
Operation successful.
LOCAL ONLY MODE 
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
CRS-4664: Node rhel6 successfully pinned.
Adding Clusterware entries to upstart
rhel6     2017/05/24 07:14:47     /u01/app/11.2.0/grid/cdata/rhel6/backup_20170524_071447.olr
Successfully configured Oracle Grid Infrastructure for a Standalone Server

最近在学 Oracle 体系结构等理论知识,在这里总结 RHEL6.5 下安装 Oracle 11g + udev + ASM 安装部署流程。

实验环境

 RedHat Enterprise Linux 6.5 x86_64    IP 地址:192.168.60.100
 Oracle 11g release 11.2.0.4

系统安装在此略过,IP 地址已经更改完成,首先通过 ssh 协议登陆到 RHEL 系统,配置 YUM 本地源环境,安装 Oracle 所必须的软件依赖包;

[c:\~]$ ssh root@192.168.60.100
[root@rhel6 ~]# vi /etc/yum.conf
[local]                                             // 修改本地 YUM 源环境;
name=local
baseurl=file:///mnt
gpgcheck=0
enabled=1
[root@rhel6 ~]# mount /dev/sr0 /mnt/                // 挂载本地光盘作为 YUM 源;
mount: block device /dev/sr0 is write-protected, mounting read-only
[root@rhel6 ~]# yum repolist                        // 检测本地 YUM 源配置是否正确;
Loaded plugins: product-id, refresh-packagekit, security,
              : subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
local                                        | 3.9 kB     00:00 ... 
local/primary_db                             | 3.1 MB     00:00 ... 
repo id                         repo name                     status
local                           local                         3,690
repolist: 3,690
[root@rhel6 ~]#yum install binutils -y            // 通过 YUM 安装 Oracle 所必须的软件包;
[root@rhel6 ~]#yum install compat-libcap1 -y
[root@rhel6 ~]#yum install compat-libstdc++-33 -y
[root@rhel6 ~]#yum install gcc -y
[root@rhel6 ~]#yum install gcc-c++ -y
[root@rhel6 ~]#yum install glibc -y
[root@rhel6 ~]#yum install glibc-devel -y
[root@rhel6 ~]#yum install ksh -y
[root@rhel6 ~]#yum install libgcc -y
[root@rhel6 ~]#yum install libstdc++ -y
[root@rhel6 ~]#yum install libstdc++-devel -y
[root@rhel6 ~]#yum install libaio -y
[root@rhel6 ~]#yum install libaio-devel -y
[root@rhel6 ~]#yum install libXext -y
[root@rhel6 ~]#yum install libXtst -y
[root@rhel6 ~]#yum install libX11 -y
[root@rhel6 ~]#yum install libXau -y
[root@rhel6 ~]#yum install libxcb -y
[root@rhel6 ~]#yum install libXi -y
[root@rhel6 ~]#yum install make -y
[root@rhel6 ~]#yum install sysstat -y
[root@rhel6 ~]#yum install unixODBC -y
[root@rhel6 ~]#yum install unixODBC-devel -y

修改相应的系统主机名以及 IP 地址

[root@rhel6 ~]# vi /etc/hosts 
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
192.168.60.100  rhel6

添加相应的 grid 用户及用户组

[root@rhel6 ~]# groupadd -g 501 oinstall
[root@rhel6 ~]# groupadd -g 502 dba
[root@rhel6 ~]# groupadd -g 503 oper
[root@rhel6 ~]# groupadd -g 504 asmadmin
[root@rhel6 ~]# groupadd -g 505 asmoper
[root@rhel6 ~]# groupadd -g 506 asmdba
[root@rhel6 ~]# useradd -g oinstall -G dba,asmdba,oper oracle
[root@rhel6 ~]# useradd -g oinstall -G asmadmin,asmdba,asmoper,oper,dba grid
[root@rhel6 ~]# passwd oracle
[root@rhel6 ~]# passwd grid

创建 Grid Infrastructure 组件安装目录

[root@rhel6 ~]# mkdir -p /u01/app/grid
[root@rhel6 ~]# mkdir -p /u01/app/11.2.0/grid
[root@rhel6 ~]# chown -R grid:oinstall /u01
[root@rhel6 ~]# mkdir -p /u01/app/oraInventory
[root@rhel6 ~]# chown -R grid:oinstall /u01/app/oraInventory
[root@rhel6 ~]# mkdir -p /u01/app/oracle
[root@rhel6 ~]# chown -R oracle:oinstall /u01/app/oracle
[root@rhel6 ~]# chmod -R 775 /u01

修改操作系统参数

[root@rhel6 ~]# vi /etc/security/limits.conf
grid       soft   nproc   2047 
grid       hard   nproc   16384
grid       soft   nofile  1024
grid       hard   nofile  65536
grid       soft   stack   10240
grid       hard   stack   32768
oracle     soft   nproc   2047
oracle     hard   nproc   16384
oracle     soft   nofile  1024
oracle     hard   nofile  65536
oracle     soft   stack   10240
oracle     hard   stack   32768

修改 Linux 服务器 ulmits 限制

[root@rhel6 ~]# vi /etc/security/limits.d/90-nproc.conf
#*          soft    nproc     1024
* - nproc 16384

禁用 SELINUX 安全限制

[root@rhel6 ~]# vi /etc/selinux/config
SELINUX=disabled                                // 修改配置文件永久关闭 selinux;
[root@rhel6 ~]# setenforce 0

关闭 IPTABLES 防火墙

[root@rhel6 ~]# service iptables stop
iptables: Setting chains to policy ACCEPT: filter          [OK]
iptables: Flushing firewall rules:                         [OK]
iptables: Unloading modules:                               [OK] 
[root@rhel6 ~]# chkconfig --level 35 iptables off          //3、5 级别永久关闭 iptables;

修改 Linux 操作系统的登陆配置文件

[root@rhel6 ~]# vi /etc/pam.d/login
session    required     pam_limits.so

修改 Linux 系统内核 Kernel 配置

[root@rhel6 ~]# vi /etc/sysctl.conf
#kernel.shmmax = 68719476736                // 注释掉原先的系统的配置;
#kernel.shmall = 4294967296
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmmax = 858993459                   // 大于 SGA, 小于物理内存;
kernel.shmall = 1048576                     // 物理内存 %4K;
kernel.shmmni = 4096
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
[root@rhel6 ~]# sysctl -p

配置 grid 和 oracle 用户的环境变量

[root@rhel6 ~]# su - grid                        //grid 用户环境变量配置;
[grid@rhel6 ~]$ vi .bash_profile 
PS1="[`whoami`@`hostname`:"'$PWD]$'
export PS1
umask 022
export TMP=/tmp
export LANG=en_US
export TMPDIR=$TMP
export ORACLE_HOSTNAME=rhel6
ORACLE_SID=+ASM; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
ORACLE_BASE=/u01/app/gridexport ORACLE_BASE
ORACLE_HOME=/u01/app/11.2.0/gridexport ORACLE_HOME
NLS_DATE_FORMAT="yyyy-mm-dd HH24:MI:SS"export NLS_DATE_FORMAT
PATH=.:$PATH:$HOME/bin:$ORACLE_HOME/binexport PATH
THREADS_FLAG=native; export THREADS_FLAG
if [$USER = "oracle" ] || [$USER = "grid" ]; then
        if [$SHELL = "/bin/ksh" ]; then
            ulimit -p 16384
              ulimit -n 65536
  else
   ulimit -u 16384 -n 65536
      fi
    umask 022
fi
----------------------------------------------------------------------------
[root@rhel6 ~]# su - oracle
[oracle@rhel6 ~]$ vi .bash_profile 
TMP=/tmpexport TMP
TMPDIR=$TMP; export TMPDIR
export LANG=en_US
ORACLE_BASE=/u01/app/oracleexport ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0; export ORACLE_HOME
ORACLE_SID=itpuxdb; export ORACLE_SID
export ORACLE_UNQNAME=orcl
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/libexport LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlibexport CLASSPATH
NLS_DATE_FORMAT="yyyy-mm-dd HH24:MI:SS"export NLS_DATE_FORMAT
NLS_LANG=AMERICAN_AMERICA.ZHS16GBK;export NLS_LANG
if [$USER = "oracle" ] || [$USER = "grid" ]; then
        if [$SHELL = "/bin/ksh" ]; then
         ulimit -p 16384
              ulimit -n 65536
        else
              ulimit -u 16384 -n 65536
        fi
        umask 022
fi

配置 udev 配置 ASM(在此系统所用磁盘为 /dev/sda),

[root@rhel6 ~]# fdisk /dev/(sdb\sdc\sdd\sde\sdf)          // 对磁盘进行分区;
[root@rhel6 ~]# vi /etc/udev/rules.d/99-oracle-asmdevices.rules
KERNEL=="sdb1", NAME="asm_grid1", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sdc1", NAME="asm_system", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sdd1", NAME="asm_recovery", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sde1", NAME="asm_data01", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sdf1", NAME="asm_data02", OWNER="grid", GROUP="asmadmin", MODE="0660"
[root@rhel6 ~]# partprobe /dev/sdb1
[root@rhel6 ~]# partprobe /dev/sdc1
[root@rhel6 ~]# partprobe /dev/sdd1
[root@rhel6 ~]# partprobe /dev/sde1
[root@rhel6 ~]# partprobe /dev/sdf1
[root@rhel6 ~]# udevadm control --reload-rules
[root@rhel6 ~]# start_udev 
Starting udev:                                             [OK]
[root@rhel6 ~]# ls -lsa /dev/asm*
0 brw-rw----. 1 grid asmadmin 865 May 24 05:48 /dev/asm_data01
0 brw-rw----. 1 grid asmadmin 881 May 24 05:48 /dev/asm_data02
0 brw-rw----. 1 grid asmadmin 817 May 24 05:48 /dev/asm_grid1
0 brw-rw----. 1 grid asmadmin 849 May 24 05:48 /dev/asm_recovery
0 brw-rw----. 1 grid asmadmin 833 May 24 05:48 /dev/asm_system

上传 Oracle 安装包到服务器

[root@rhel6 ~]#yum -y install lrzsz            // 安装 xshell 所用的 FTP 软件;
[root@rhel6 ~]#unzip  p13390677_112040_Linux-x86-64_3of7.zip 
[root@rhel6 ~]# chown -R grid:oinstall  /opt/grid/

配置 VNC 远程桌面

[root@rhel6 ~]# yum -y install vnc-server
[root@rhel6 opt]# su - grid
[grid@rhel6:/home/grid]$vncserver 
You will require a password to access your desktops.
Password:
Verify:
xauth:  creating new authority file /home/grid/.Xauthority
New 'rhel6:1 (grid)' desktop is rhel6:1
Creating default startup script /home/grid/.vnc/xstartup
Starting applications specified in /home/grid/.vnc/xstartup
Log file is /home/grid/.vnc/rhel6:1.log

 VNC 远程桌面连接配置安装 Grid Infrastructure 组件

[grid@rhel6 ~]$ cd /opt/grid/
[grid@rhel6 grid]$ ./runInstaller

选择单节点安装配置 Grid Infrastructure

RHEL6.5 安装 Oracle 11g + udev + ASM 安装部署详解

选择语言环境

RHEL6.5 安装 Oracle 11g + udev + ASM 安装部署详解

扫描 ASM 磁盘

RHEL6.5 安装 Oracle 11g + udev + ASM 安装部署详解

更多详情见请继续阅读下一页的精彩内容 :http://www.linuxidc.com/Linux/2017-05/144271p2.htm

配置安装成功

RHEL6.5 安装 Oracle 11g + udev + ASM 安装部署详解

RHEL6.5 安装 Oracle 11g + udev + ASM 安装部署详解

配置安装 Oracle 客户端

[root@rhel6 opt]# su - oracle
[oracle@rhel6 ~]$ vncserver
You will require a password to access your desktops.
Password:
Verify:
xauth:  creating new authority file /home/oracle/.Xauthority
New 'rhel6:2 (oracle)' desktop is rhel6:2
Creating default startup script /home/oracle/.vnc/xstartup
Starting applications specified in /home/oracle/.vnc/xstartup
Log file is /home/oracle/.vnc/rhel6:2.log 
[root@rhel6 opt]# unzip p13390677_112040_Linux-x86-64_1of7.zip 
[root@rhel6 opt]# unzip p13390677_112040_Linux-x86-64_2of7.zip 
[root@rhel6 opt]# chown -R oracle.oinstall database/

VNC 远程桌面安装 Oracle 软件

[oracle@rhel6 database]$ ./runInstaller

选择只安装 Oracle 软件(后续再建实例)

RHEL6.5 安装 Oracle 11g + udev + ASM 安装部署详解

选择单实例节点安装

RHEL6.5 安装 Oracle 11g + udev + ASM 安装部署详解

选择安装企业版

RHEL6.5 安装 Oracle 11g + udev + ASM 安装部署详解

Oracle 数据库软件安装位置(环境变量读取正确不需要修改)

RHEL6.5 安装 Oracle 11g + udev + ASM 安装部署详解

由于测试环境内存偏小,所以这里可以忽略警告继续安装

RHEL6.5 安装 Oracle 11g + udev + ASM 安装部署详解

以 root 用户执行所需的脚本

RHEL6.5 安装 Oracle 11g + udev + ASM 安装部署详解

[root@rhel6 tmp]# /u01/app/oracle/product/11.2.0/root.sh
Performing root user operation for Oracle 11g
The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/app/oracle/product/11.2.0
Enter the full pathname of the local bin directory: [/usr/local/bin]: 
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.
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 script.
Now product-specific root actions will be performed.
Finished product-specific root actions.

安装完成

RHEL6.5 安装 Oracle 11g + udev + ASM 安装部署详解

Oracle 和 ASM 配置安装完成接下来安装配置 ASM,建 instance

以 grid 用户远程桌面登陆,配置 ASM 磁盘

[grid@rhel6:/home/grid]$asmca

RHEL6.5 安装 Oracle 11g + udev + ASM 安装部署详解

以 oracle 用户远程桌面登陆,配置创建数据库

[oracle@rhel6 database]$ dbca

选择创建数据库

RHEL6.5 安装 Oracle 11g + udev + ASM 安装部署详解

由于这里是实验环境选择第一项

RHEL6.5 安装 Oracle 11g + udev + ASM 安装部署详解

配置 instance 名

RHEL6.5 安装 Oracle 11g + udev + ASM 安装部署详解

由于这里是实验环境,选择启用 OEM,不勾选快速闪回

RHEL6.5 安装 Oracle 11g + udev + ASM 安装部署详解

配置统一的密码

RHEL6.5 安装 Oracle 11g + udev + ASM 安装部署详解

在此选择 ASM 磁盘而非 file system,选择创建的 ASM 磁盘组

RHEL6.5 安装 Oracle 11g + udev + ASM 安装部署详解

实验环境勾选实例

RHEL6.5 安装 Oracle 11g + udev + ASM 安装部署详解

配置 SGA、PGA 空间大小,配置中文字符集 ZHFS16GBK,配置并发连接数,配置专用共享池

RHEL6.5 安装 Oracle 11g + udev + ASM 安装部署详解

在此可配置数据文件大小以及自动扩展、redo log 组配置,(实验环境在此不做过多配置)

 RHEL6.5 安装 Oracle 11g + udev + ASM 安装部署详解

在此可将数据配置文件等信息导出(方便后续文档撰写)

RHEL6.5 安装 Oracle 11g + udev + ASM 安装部署详解

创建数据库中 …

RHEL6.5 安装 Oracle 11g + udev + ASM 安装部署详解

数据库安装完成

RHEL6.5 安装 Oracle 11g + udev + ASM 安装部署详解

以 grid 用户查看集群状态及监听状态

[grid@rhel6:/home/grid]$crsctl status resource -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
               ONLINE  ONLINE       rhel6                                       
ora.DSG.dg
               ONLINE  ONLINE       rhel6                                       
ora.LISTENER.lsnr
               ONLINE  ONLINE       rhel6                                       
ora.asm
               ONLINE  ONLINE       rhel6                    Started             
ora.ons
               OFFLINE OFFLINE      rhel6                                       
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
      1        ONLINE  ONLINE       rhel6                                       
ora.diskmon
      1        OFFLINE OFFLINE                                                   
ora.evmd
      1        ONLINE  ONLINE       rhel6                                       
ora.orcl.db
      1        ONLINE  ONLINE       rhel6                    Open           
------------------------------------------------------------------------     
[grid@rhel6:/home/grid]$lsnrctl status
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 24-MAY-2017 08:28:36
Copyright (c) 1991, 2013, Oracle.  All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date                24-MAY-2017 07:15:42
Uptime                    0 days 1 hr. 12 min. 53 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/11.2.0/grid/network/admin/listener.ora
Listener Log File         /u01/app/grid/diag/tnslsnr/rhel6/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rhel6)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
  Instance "+ASM", status READY, has 1 handler(s) for this service...
Service "orcl" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
The command completed successfully

以 oracle 用户登录连接数据库,查询表空间

[oracle@rhel6 database]$ sqlplus / as sysdba 
  
SQL*Plus: Release 11.2.0.4.0 Production on Wed May 24 08:27:56 2017
Copyright (c) 1982, 2013, Oracle.  All rights reserved.
  
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options 
SQL> select * from V$TABLESPACE;
       TS# NAME      INC BIG FLA ENC
---------- ------------------------------ --- --- --- ---
  0 SYSTEM     YES NO  YES
  1 SYSAUX     YES NO  YES
  2 UNDOTBS1     YES NO  YES
  4 USERS     YES NO  YES
  3 TEMP      NO  NO  YES
  6 EXAMPLE     YES NO  YES
6 rows selected.

在此,Rhel Linux 环境下的 udev + ASM Oracle 11gR2 安装部署完成,状态正常。

完整 PDF 文档可以到 Linux 公社资源站下载:

—————————————— 分割线 ——————————————

免费下载地址在 http://linux.linuxidc.com/

用户名与密码都是 www.linuxidc.com

具体下载目录在 /2017 年资料 / 5 月 /26 日 /RHEL6.5 安装 Oracle 11g + udev + ASM 安装部署详解 /

下载方法见 http://www.linuxidc.com/Linux/2013-07/87684.htm

—————————————— 分割线 ——————————————

更多 Oracle 相关信息见 Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

本文永久更新链接地址 :http://www.linuxidc.com/Linux/2017-05/144271.htm

正文完
星哥说事-微信公众号
post-qrcode
 0
星锅
版权声明:本站原创文章,由 星锅 于2022-01-22发表,共计22979字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
【腾讯云】推广者专属福利,新客户无门槛领取总价值高达2860元代金券,每种代金券限量500张,先到先得。
阿里云-最新活动爆款每日限量供应
评论(没有评论)
验证码
【腾讯云】云服务器、云数据库、COS、CDN、短信等云产品特惠热卖中