1. 程式人生 > >oracle 11g grid安裝

oracle 11g grid安裝

oracle 11g grid安裝

oracle 11g grid安裝


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)

[[email protected] ~]# 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


[[email protected] hgfs]# ll

total 4

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

[[email protected] 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

[[email protected] ~]# 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

安裝如下:

第一步:

技術分享

第二步:

技術分享

第三步:

技術分享

第四步:

技術分享

第五步:

技術分享

第六步:

技術分享

第7步:

技術分享

第八步:

技術分享

第9步:

技術分享

用root用戶執行2個腳本

/u01/app/oraInventory/orainstRoot.sh

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



安裝完成後

查看ASM進程

crs_stat -t

技術分享

安裝完成了!




本文出自 “梁小明的博客” 博客,請務必保留此出處http://7038006.blog.51cto.com/7028006/1922719

oracle 11g grid安裝