redhat5下安装Oracle 11gR2单实例+ASM

一、环境:

主机:redhat5

数据库:Oracle 11gR2

硬盘:一个100G+八个2G

内存:4g

二、搭建yum仓库

[[email protected] ~]# mkdir /mnt/cdrom
[[email protected] ~]# mount /dev/hdc /mnt/cdrom
#查看挂载
[[email protected] ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
...省略输出
/dev/hdc              2.8G  2.8G     0 100% /mnt/cdrom
#添加repo配置
[[email protected] ~]# vi /etc/yum.repos.d/server.repo
[server]
name=Red Hat Enterprise Linux
baseurl=file:///mnt/cdrom/Server
enabled=1
gpgcheck=0

三、安装依赖包

yum install binutils* -y
yum install compat* -y
yum install elfutils* -y
yum install gcc* -y
yum install glibc* -y
yum install kernel* -y
yum install ksh* -y
yum install libaio* -y
yum install libgcc* -y
yum install libgomp* -y
yum install libstdc* -y
yum install make* -y
yum install sysstat* -y

四、创建分区

[[email protected] ~]# 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): n
Command action
   e   extended
   p   primary partition (1-4)
p

Partition number (1-4): 1
First cylinder (1-261, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-261, default 261):
Using default value 261

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

查看分区后的信息

[[email protected] ~]# fdisk -l

Disk /dev/sda: 107.3 GB, 107374182400 bytes
255 heads, 63 sectors/track, 13054 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14       13054   104751832+  8e  Linux LVM

Disk /dev/sdb: 2147 MB, 2147483648 bytes
255 heads, 63 sectors/track, 261 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1         261     2096451   83  Linux

Disk /dev/sdc: 2147 MB, 2147483648 bytes
255 heads, 63 sectors/track, 261 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1         261     2096451   83  Linux

Disk /dev/sdd: 2147 MB, 2147483648 bytes
255 heads, 63 sectors/track, 261 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1               1         261     2096451   83  Linux

Disk /dev/sde: 2147 MB, 2147483648 bytes
255 heads, 63 sectors/track, 261 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sde1               1         261     2096451   83  Linux

Disk /dev/sdf: 2147 MB, 2147483648 bytes
255 heads, 63 sectors/track, 261 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdf1               1         261     2096451   83  Linux

Disk /dev/sdg: 2147 MB, 2147483648 bytes
255 heads, 63 sectors/track, 261 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdg1               1         261     2096451   83  Linux

Disk /dev/sdh: 2147 MB, 2147483648 bytes
255 heads, 63 sectors/track, 261 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdh1               1         261     2096451   83  Linux

Disk /dev/sdi: 2147 MB, 2147483648 bytes
255 heads, 63 sectors/track, 261 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdi1               1         261     2096451   83  Linux

五、创建Oracle、grid用户和组

groupadd -g 500 dba
groupadd -g 501 oinstall
groupadd -g 1002 oper
groupadd -g 1003 backupdba
groupadd -g 1004 dgdba
groupadd -g 1005 kmdba
groupadd -g 1006 asmdba
groupadd -g 1007 asmoper
groupadd -g 1008 asmadmin
useradd -u 1101 -g oinstall -G dba,asmadmin,asmdba,asmoper grid
useradd -u 1100 -g oinstall -G dba,oper,backupdba,dgdba,kmdba,asmdba,asmadmin oracle

设置密码

echo 123456|passwd oracle --stdin
echo 123456|passwd grid --stdin

六、创建目录以及设置权限

mkdir -p /u01/app/grid/11.2.0/
mkdir -p /u01/app/grid
mkdir -p /u01/app/oracle/product/11.2.0/db_1
chown -R grid:oinstall /u01
chmod -R 775 /u01/
chown -R oracle:oinstall /u01/app/oracle 

七、设置内核参数

[[email protected] Software]# vi /etc/sysctl.conf
#把已存在的内容删除(用dd命令)后添加以下内容:
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 4294967295
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 = 1048576
#修改后让内核参数生效
[[email protected] ~]# sysctl -p

八、修改操作系统对oracle、grid用户资源的限制

[[email protected] Software]# vi /etc/security/limits.conf
#在末尾添加以下内容(G后按o)
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240

grid soft nproc 16384
grid hard nproc 16384
grid soft nofile 65536
grid hard nofile 65536
grid soft stack 10240
grid hard stack 10240

九、设置Oracle、grid用户的环境变量

su - oracle
vi ~/.bash_profile
#Oracle用户增加以下内容

export ORACLE_SID=orcl
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
export ORACLE_TERM=xterm
export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
ulimit -u 16384 -n 65536
umask 022

su - grid
vi ~/.bash_profile
#grid用户的profile内容如下

export ORACLE_SID=+ASM
export ORACLE_BASE=/u01/app/grid
export ORACLE_HOME=/u01/app/grid/11.2.0
PATH=$PATH:$HOME/bin
export PATH=/usr/sbin:$PATH:$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export TEMP=/tmp
export TMP=/tmp
export TMPDIR=/tmp
umask 022

十、绑定裸设备

[[email protected] ~]# 

raw /dev/raw/raw1  /dev/sdb1
raw /dev/raw/raw2  /dev/sdc1
raw /dev/raw/raw3  /dev/sdd1
raw /dev/raw/raw4  /dev/sde1
raw /dev/raw/raw5  /dev/sdf1
raw /dev/raw/raw6  /dev/sdg1
raw /dev/raw/raw7  /dev/sdh1
raw /dev/raw/raw8  /dev/sdi1

chown grid:asmadmin /dev/raw/raw1
chown grid:asmadmin /dev/raw/raw2
chown grid:asmadmin /dev/raw/raw3
chown grid:asmadmin /dev/raw/raw4
chown grid:asmadmin /dev/raw/raw5
chown grid:asmadmin /dev/raw/raw6
chown grid:asmadmin /dev/raw/raw7
chown grid:asmadmin /dev/raw/raw8

chmod 660 /dev/raw/raw1
chmod 660 /dev/raw/raw2
chmod 660 /dev/raw/raw3
chmod 660 /dev/raw/raw4
chmod 660 /dev/raw/raw5
chmod 660 /dev/raw/raw6
chmod 660 /dev/raw/raw7
chmod 660 /dev/raw/raw8

#命令方式绑定裸设备在系统重启后会失效,在/etc/rc.local添加以上内容,开机时会自动执行

十一、解压安装文件

su - grid
unzip  p10404530_112030_LINUX_3of7.zip 

su - oracle
unzip p10404530_112030_LINUX_1of7.zip
unzip  p10404530_112030_LINUX_2of7.zip 

su -
cd /tmp/grid/rpm
[[email protected] rpm]# rpm -ivh cvuqdisk-1.0.9-1.rpm

十二、使用VNC图形安装ASM软件

su – grid
vncserver

到解压的grid目录下执行./runInstaller

用root执行上图的两个脚本,执行后点OK

十三、使用VNC图形安装Oracle软件

su - oracle
vncserver

到解压的database目录下执行./runInstaller

十四、使用VNC图形安装数据库

su - oracle
vncserver

到解压的database目录下运行dbca

所有部署已经完成。

原文地址:https://www.cnblogs.com/shaozi/p/8158004.html

时间: 2024-10-10 08:46:06

redhat5下安装Oracle 11gR2单实例+ASM的相关文章

[oracle部署实施] 基于centos7静默安装oracle 11gr2单实例数据库

基于centos7静默安装oracle 11gr2单实例数据库 1.vmware最小化安装centos7 分配20G硬盘+2G内存+nat网络 400mboot+4Gswap 去除kdump 最小化安装 并配置网络cat /etc/sysconfig/network-scripts/ifcfg-ens32BOOTPROTO="static"DEVICE="ens32"ONBOOT="yes"IPADDR=192.168.188.11NETMASK

VM虚拟机下在LINUX上安装ORACLE 11G单实例数据库

VM虚拟机下在LINUX上安装ORACLE 11G单实例数据库 1.环境及安装前规划:虚拟机及OS如下 环境:VMware Wordstation ACE版 6.0.2 操作系统:OracleLinux-R5-U8-Server-i386-dvd    3.2G 安装操作系统,这里需要注意的是磁盘空间要预留足够. 我的规划是: 虚拟机分配1024M内存,当然如果主机内存足够,安装时内存设置2048M可以更快. 虚拟机分配一块磁盘,30G磁盘空间. /boot 100M ext3 /    20G

Centos 6下安装Oracle 11gR2

一.安装环境 CentOS release 6.7 (Final) Oracle Database 11g Release 2 二.安装前准备 #修改主机名 修改/etc/sysconfig/network配置文件中的HOSTNAME变量 [[email protected] ~]# hostname oracledb ####永久性修改 [[email protected] ~]#vi /etc/sysconfig/network NETWORKING=yes HOSTNAME= oracle

CentOS 6.4下安装Oracle 11gR2

安装前须知: 内存(RAM)的最小要求是 1GB,建议 2GB 及以上. 虚拟内存 swap 建议:内存为 1GB~2GB 时建议swap大小为内存大小的 1.5 倍:内存为 2GB~16GB 时建议swap大小为内存的大小:内存超过 16GB 时swap保持16GB. 要求临时文件目录,如 /tmp 的磁盘空间至少 1GB. 磁盘空间要求:企业版为4.35GB的安装空间和1.7GB以上的数据文件空间:标准版为4.22GB的安装空间和1.5GB以上的数据文件空间. 需要 X window 图形界

在 Oracle Linux 6.5 上安装 Oracle 11g 单实例数据库

Oracle数据库预安装任务 检查硬件要求 系统必须满足下面最小的硬件要求 内存要求 Minimum: 1 GB of RAMRecommended: 2 GB of RAM or more To determine the RAM size, enter the following command: # grep MemTotal /proc/meminfo The following table describes the relationship between the installed

Oracle Linux 6.3下安装Oracle 11g R2(11.2.0.3)

本文主要描述了在Oracle Linux 6.3下安装Oracle 11gR2(11.2.0.3).从Oracle 11g开始,Oracle官方网站不再提供其Patch的下载链接,需要使用Meatlink账户才可以进行下载.童鞋们不要着急,没有Metalink账户的也可以自己百度一下,网上有很多下载链接,迅雷就可以搞定了.Oracle 11.2.0.3整合为7个zip压缩包,如果仅仅是安装Oracle Database,下载1至2.zip包即可.下面是其安装步骤. 一.准备安装环境1.安装rpm

Linux 下安装oracle数据库

原文出处       http://www.linuxidc.com/Linux/2015-02/113222.html 需要安装Oracle DataGuard,所以先要安装单台Oracle11g,下面是Linux下单台Oracle11g的详细安装过程. 1,安装环境 硬件环境:2台linux虚拟机,CentOS6.4 ,4G ,4核,磁盘50G Oracle软件版本: linux.x64_11gR2_database_1of2.zip linux.x64_11gR2_database_2of

Oracle 11g RAC到单实例ASM的物理Standby搭建

一.DG环境配置 此次搭建Standby的主库为:" RedHat 6.5+11G+RAC+ASM安装与配置(三节点)",11g单实例ASM安装使用ASMLib的方式,不在使用UDEV方式,磁盘为本机磁盘,非远程挂载的磁盘.本次搭建包含了11g单实例ASM的详细安装过程. 1. 基本环境 主库: 实例名:racdb1,racdb2,racdb3        DB_NAME:racdb              DB_UNIQUE_NAME:racdb 备库: 实例名:racdg  

Linux平台oracle 11g单实例 安装部署配置 快速参考

1.重建主机的Oracle用户 组 统一规范 uid gid 以保证共享存储挂接或其他需求的权限规范 userdel -r oracle groupadd -g 500 oinstall groupadd -g 501 dba useradd -g oinstall -G dba -u 500 oracle #id oracle uid=500(oracle) gid=500(oinstall) 组=500(oinstall),501(dba) 2.安装好Oracle 需要的rpm包.安装rpm