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

Oracle 11g Grid for Linux安装指南

214次阅读
没有评论

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

Oracle 11g Grid for Linux 安装指南

1、创建 oracle 用户及用户组

groupadd oinstall 

groupadd dba

useradd -g oinstall -G dba -m oracle

设置 oracle 用户的口令:

passwd oracle

我这里设置为 oracle

2、创建相关目录

mkdir -p /u01

chown -R oracle.oinstall /u01

3、修改 oracle 用户环境变量

su – oracle

vi .bash_profile

export PATH 

export ORACLE_SID=+ASM

export ORACLE_BASE=/u01/app/oracle

export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/grid

export PATH=$ORACLE_HOME/bin:$PATH

4、vi /etc/sysctl.conf

kernel.shmmax = 4046471168

kernel.shmmni = 4096

kernel.shmall = 2097152

kernel.sem = 250 32000 100 128

fs.file-max = 6815744

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

fs.aio-max-nr = 1048576

执行如下命令:使内核参数生效

sysctl -p

5、修改 linux shell 参数

vi /etc/security/limits.conf 

oracle soft nofile 65536

oracle hard nofile 65536

oracle soft nproc 16384

oracle hard nproc 16384

6、vim /etc/pam.d/login

sessionrequired pam_limits.so

7、共享目录 (/mnt/hgfs)

[root@oel ~]# mount

/dev/mapper/vg_oel-lv_root on / type ext4 (rw)

proc on /proc type proc (rw)

sysfs on /sys type sysfs (rw)

devpts on /dev/pts type devpts (rw,gid=5,mode=620)

tmpfs on /dev/shm type tmpfs (rw,rootcontext=”system_u:object_r:tmpfs_t:s0″)

/dev/sda1 on /boot type ext4 (rw)

none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)

.host:/ on /mnt/hgfs type vmhgfs (rw,ttl=1)

vmware-vmblock on /var/run/vmblock-fuse type fuse.vmware-vmblock (rw,nosuid,nodev,default_permissions,allow_other)

sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)

8、创建 8 快 2G asm 存储

挂载镜像文件

mount  

fdisk -l  

[root@oel hgfs]# ll

total 4

drwxrwxrwx. 1 root root 4096 May  5 19:37 soft

[root@oel hgfs]# fdisk -l

Disk /dev/sda: 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: 0x00037ab3

   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        3917    30944256   8e  Linux LVM

Disk /dev/sdc: 2147 MB, 2147483648 bytes

255 heads, 63 sectors/track, 261 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: 2147 MB, 2147483648 bytes

255 heads, 63 sectors/track, 261 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/sdb: 2147 MB, 2147483648 bytes

255 heads, 63 sectors/track, 261 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/sde: 2147 MB, 2147483648 bytes

255 heads, 63 sectors/track, 261 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/sdf: 2147 MB, 2147483648 bytes

255 heads, 63 sectors/track, 261 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/sdg: 2147 MB, 2147483648 bytes

255 heads, 63 sectors/track, 261 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/sdh: 2147 MB, 2147483648 bytes

255 heads, 63 sectors/track, 261 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/sdi: 2147 MB, 2147483648 bytes

255 heads, 63 sectors/track, 261 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/mapper/vg_oel-lv_root: 23.3 GB, 23295164416 bytes

255 heads, 63 sectors/track, 2832 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/mapper/vg_oel-lv_swap: 8388 MB, 8388608000 bytes

255 heads, 63 sectors/track, 1019 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

mkdir  /mnt/iso

mount -o loop /mnt/hgfs/soft/V17794-01/Enterprise-R5-U4-Server-x86_64-dvd.iso /mnt/iso

9、配置 yum 源

vim /etc/yum.repos.d/myoel.repo

[dvdinfo]

name=myoel

baseurl=file:///mnt/iso/Server

enabled=1

gpgcheck=0

yum makecache

10、对磁盘进行逻辑卷划分

fdisk /dev/sdb 

n p 1  回车 回车   w 保存退出

fdisk /dev/sdc

fdisk /dev/sdd

fdisk /dev/sde

fdisk /dev/sdf

fdisk /dev/sdg

fdisk /dev/sdh

fdisk /dev/sdi

配置 udev 生成裸设备

vim /etc/udev/rules.d/60-raw.rules

ACTION==”add”,KERNEL==”sdb1″,RUN+=”/bin/raw /dev/raw/raw1 %N”

ACTION==”add”,KERNEL==”sdc1″,RUN+=”/bin/raw /dev/raw/raw2 %N”

ACTION==”add”,KERNEL==”sdd1″,RUN+=”/bin/raw /dev/raw/raw3 %N”

ACTION==”add”,KERNEL==”sde1″,RUN+=”/bin/raw /dev/raw/raw4 %N”

ACTION==”add”,KERNEL==”sdf1″,RUN+=”/bin/raw /dev/raw/raw5 %N”

ACTION==”add”,KERNEL==”sdg1″,RUN+=”/bin/raw /dev/raw/raw6 %N”

ACTION==”add”,KERNEL==”sdh1″,RUN+=”/bin/raw /dev/raw/raw7 %N”

ACTION==”add”,KERNEL==”sdi1″,RUN+=”/bin/raw /dev/raw/raw8 %N”

KERNEL==”raw[1]”,MODE=”0660″,GROUP=”oinstall”,OWNER=”oracle”

KERNEL==”raw[2]”,MODE=”0660″,GROUP=”oinstall”,OWNER=”oracle”

KERNEL==”raw[3]”,MODE=”0660″,GROUP=”oinstall”,OWNER=”oracle”

KERNEL==”raw[4]”,MODE=”0660″,GROUP=”oinstall”,OWNER=”oracle”

KERNEL==”raw[5]”,MODE=”0660″,GROUP=”oinstall”,OWNER=”oracle”

KERNEL==”raw[6]”,MODE=”0660″,GROUP=”oinstall”,OWNER=”oracle”

KERNEL==”raw[7]”,MODE=”0660″,GROUP=”oinstall”,OWNER=”oracle”

KERNEL==”raw[8]”,MODE=”0660″,GROUP=”oinstall”,OWNER=”oracle”

启动 udev 服务

start_udev

查看裸设备

raw -qa

[root@oel ~]# raw -qa

/dev/raw/raw1:bound to major 8, minor 17

/dev/raw/raw2:bound to major 8, minor 33

/dev/raw/raw3:bound to major 8, minor 49

/dev/raw/raw4:bound to major 8, minor 65

/dev/raw/raw5:bound to major 8, minor 81

/dev/raw/raw6:bound to major 8, minor 97

/dev/raw/raw7:bound to major 8, minor 113

/dev/raw/raw8:bound to major 8, minor 129

11、解压缩 Grid 安装介质

root

xhost +

mkdir -p  /u01/app/oracle/product/11.2.0/grid

mkdir -p /u01/app/oracle

su – oracle

./runInstaller

安装如下:

第一步:

Oracle 11g Grid for Linux 安装指南

第二步:

Oracle 11g Grid for Linux 安装指南

第三步:

Oracle 11g Grid for Linux 安装指南

第四步:

Oracle 11g Grid for Linux 安装指南

第五步:

Oracle 11g Grid for Linux 安装指南

第六步:

Oracle 11g Grid for Linux 安装指南

第 7 步:

Oracle 11g Grid for Linux 安装指南

第八步:

Oracle 11g Grid for Linux 安装指南

第 9 步:

Oracle 11g Grid for Linux 安装指南

用 root 用户执行 2 个脚本

/u01/app/oraInventory/orainstRoot.sh

/u01/app/oracle/product/11.2.0/grid/root.sh

安装完成后

查看 ASM 进程

crs_stat -t 

Oracle 11g Grid for Linux 安装指南

安装完成了!

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

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

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