ORACLE11GR2 RAC安装Word文件下载.docx
《ORACLE11GR2 RAC安装Word文件下载.docx》由会员分享,可在线阅读,更多相关《ORACLE11GR2 RAC安装Word文件下载.docx(34页珍藏版)》请在冰豆网上搜索。
libXp(64位)
libXp(32位)
openmotif22(32位)
openmotif22(64位)
compat-libf2c(32位)
compat-libf2c(64位)
compat-libgcc(32位)
libgomp(64位)
elfutils-libelf(64位)
elfutils-libelf-devel(64位)
elfutils-libelf-devel-static(
64位)
libaio-devel(32位)
libaio-devel(64位)
unixODBC(32位)
unixODBC(64位)
unixODBC-devel(32位)
unixODBC-devel(64位)
libgcc(32位)
libgcc(64位)
pdksh-*
4.创建用户和用户组(两个节点都要执行,且建立组的ID要一致)
groupaddoinstall
groupadddba
groupaddoper
groupaddasmadmin
groupaddasmdba
groupaddasmoper
useradd-goinstall-Gdba,asmadmin,asmdba,asmopergrid
useradd-goinstall-Gdba,oper,asmdbaoracle
passwdgrid
passwdoracle
5.建立grid和oracle的安装目录(两个节点都要执行)
product目录的权限是grid:
oinstall775
grid:
/u01/product/grid/11.2.0/u01/product/grid/crs
oracle:
/u01/product/oracle/11.2.0/db_1
6.设置grid和oracle的环境变量(两个节点都要执行)
vi.bash_profile
grid增加(grid的ORACLE_BASE和ORACLE_HOME不能有从属关系):
ORACLE_BASE=/u01/product/grid/crs
exportORACLE_BASE
ORACLE_HOME=/u01/product/grid/11.2.0
exportORACLE_HOME
PATH=$ORACLE_HOME/bin:
$PATH
exportPATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:
$LD_LIBRARY_PATH
exportLD_LIBRARY_PATH
oracle增加:
ORACLE_BASE=/u01/product/oracle
exportORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/11.2.0/db_1
exportORACLE_HOME
ORACLE_SID=racdb1
exportORACLE_SID
PATH=$ORACLE_HOME/bin:
exportPATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:
exportLD_LIBRARY_PATH
7.配置内核参数
7.1vi/etc/sysctl.conf
增加:
fs.aio-max-nr=1048576
fs.file-max=6815744
kernel.shmmni=4096
kernel.sem=25032000100128
net.ipv4.ip_local_port_range=900065500
net.core.rmem_default=262144
net.core.rmem_max=4194304
net.core.wmem_default=262144
net.core.wmem_max=1048576
7.2vi/etc/profile
if[$USER="
oracle"
]||[$USER="
grid"
];
then
if[$SHELL="
/bin/ksh"
ulimit-p16384
ulimit-n65536
else
ulimit-u16384-n65536
fi
umask022
fi
7.3vi/etc/security/limits.conf
gridsoftnproc2047
gridhardnproc32768
gridsoftnofile1024
gridhardnofile250000
oraclesoftnproc2047
oraclehardnproc32768
oraclesoftnofile1024
oraclehardnofile250000
7.4vi/etc/pam.d/login
sessionrequired/lib64/security/pam_limits.so
7.5运行命令
umounttmpfs
mount-ttmpfsshmfs-osize=3000m/dev/shm
7.6vi/etc/fstab
修改:
tmpfs/dev/shmtmpfssize=3000m00
7.7关闭ntpd服务,并移除配置文件
servicentpdstop
chkconfigntpdoff
mv/etc/ntp.conf/etc/ntp.conf.bak
8创建共享磁盘
cmd
cdC:
\ProgramFiles(x86)\VMware\VMwareWorkstation
vmware-vdiskmanager.exe-c-s10Gb-alsilogic-t2"
M:
\VM_REL_RAC\shareDisk"
\disk1.vmdk
vmware-vdiskmanager.exe-c-s10Gb-alsilogic-t2"
\disk2.vmdk
\disk3.vmdk
\disk4.vmdk
\disk5.vmdk
修改虚拟机文件vmx文件(两台虚拟机都要执行),增加:
disk.locking="
false"
scsi1.virtualDev="
lsilogic"
scsi1.present="
TRUE"
scsi1.sharedBus="
virtual"
diskLib.dataCacheMaxSize="
0"
diskLib.dataCacheMaxReadAheadSize="
diskLib.DataCacheMinReadAheadSize="
diskLib.dataCachePageSize="
4096"
diskLib.maxUnsyncedWrites="
scsi1:
1.deviceType="
disk"
1.present="
1.fileName="
\VM_REL_RAC\shareDisk\disk1.vmdk"
1.mode="
independent-persistent"
1.redo="
"
2.deviceType="
2.present="
2.fileName="
\VM_REL_RAC\shareDisk\disk2.vmdk"
2.mode="
2.redo="
3.deviceType="
3.present="
3.fileName="
\VM_REL_RAC\shareDisk\disk3.vmdk"
3.mode="
3.redo="
4.deviceType="
4.present="
4.fileName="
\VM_REL_RAC\shareDisk\disk4.vmdk"
4.mode="
4.redo="
5.deviceType="
5.present="
5.fileName="
\VM_REL_RAC\shareDisk\disk5.vmdk"
5.mode="
5.redo="
为新挂载的磁盘分区:
[root@rac001~]#fdisk/dev/sdb
DevicecontainsneitheravalidDOSpartitiontable,norSun,SGIorOSFdisklabel
BuildinganewDOSdisklabel.Changeswillremaininmemoryonly,
untilyoudecidetowritethem.Afterthat,ofcourse,theprevious
contentwon'
tberecoverable.
Thenumberofcylindersforthisdiskissetto1305.
Thereisnothingwrongwiththat,butthisislargerthan1024,
andcouldincertainsetupscauseproblemswith:
1)softwarethatrunsatboottime(e.g.,oldversionsofLILO)
2)bootingandpartitioningsoftwarefromotherOSs
(e.g.,DOSFDISK,OS/2FDISK)
Warning:
invalidflag0x0000ofpartitiontable4willbecorrectedbyw(rite)
Command(mforhelp):
n
Commandaction
eextended
pprimarypartition(1-4)
p
Partitionnumber(1-4):
1
Firstcylinder(1-1305,default1):
Usingdefaultvalue1
Lastcylinderor+sizeor+sizeMor+sizeK(1-1305,default1305):
Usingdefaultvalue1305
wq
Thepartitiontablehasbeenaltered!
Callingioctl()tore-readpartitiontable.
Syncingdisks.
依次分区所有5个磁盘
9.配置ASM用户(每个节点执行)
[root@rac002init.d]#cd/etc/init.d
[root@rac002init.d]#./oracleasmconfigure
ConfiguringtheOracleASMlibrarydriver.
Thiswillconfiguretheon-bootpropertiesoftheOracleASMlibrary
driver.Thefollowingquestionswilldeterminewhetherthedriveris
loadedonbootandwhatpermissionsitwillhave.Thecurrentvalues
willbeshowninbrackets('
[]'
).Hitting<
ENTER>
withouttypingan
answerwillkeepthatcurrentvalue.Ctrl-Cwillabort.
Defaultusertoownthedriverinterface[]:
grid
Defaultgrouptoownthedriverinterface[]:
dba
StartOracleASMlibrarydriveronboot(y/n)[n]:
y
ScanforOracleASMdisksonboot(y/n)[y]:
WritingOracleASMlibrarydriverconfiguration:
done
InitializingtheOracleASMLibdriver:
\[OK]
ScanningthesystemforOracleASMLibdisks:
[OK]
10.创建ASM磁盘(一个节点执行)
/etc/init.d/oracleasmcreatediskDISK1/dev/sdb1
/etc/init.d/oracleasmcreatediskDISK2/dev/sdc1
/etc/init.d/oracleasmcreatediskDISK3/dev/sdd1
/etc/init.d/oracleasmcreatediskDISK4/dev/sde1
/etc/init.d/oracleasmcreatediskDISK5/dev/sdf1
11.配置grid和oracle连通性
[root@rac001~]#su-grid
[grid@rac001~]$mkdir.ssh
[grid@rac001~]$chmod700.ssh
[grid@rac001~]$ssh-keygen-trsa
Generatingpublic/privatersakeypair.
Enterfileinwhichtosavethekey(/home/grid/.ssh/id_rsa):
Enterpassphrase(emptyfornopassphrase):
Entersamepassphraseagain:
Youridentificationhasbeensavedin/home/grid/.ssh/id_rsa.
Yourpublickeyhasbeensavedin/home/grid/.ssh/id_rsa.pub.
Thekeyfingerprintis:
f4:
41:
c3:
a3:
7d:
ed:
67:
32:
63:
a2:
f0:
b1:
64:
e9:
12:
cagrid@rac001
[grid@rac001~]$cd.ssh
[grid@rac001.ssh]$cpid_rsa.pubauthorized_keys
[grid@rac001.ssh]$chmod600authorized_keys
[grid@rac001.ssh]$vimauthorized_keys
互相复制authorized_keys的内容添加到对方的authorized_keys中。
oracle用户互相之间也相同操作
12.运行CVU检查
#CVUQDISK_GRP=oinstall;
exportCVUQDISK_GRP
#rpm-ivhcvuqdisk-1.0.7-1.rpm
grid用户进入grid安装源目录运行
./runcluvfy.shstage-precrsinst-nrac001,rac002-fixup-verbose
最后一行看到“Pre-checkforclusterservicessetupwassuccessful.”为成功,否则检查日志,修正错误
13.安装grid软件和实例
设置DISPLAY环境变量exportDISPLAY=192.168.0.102.0.0
运行./runInstaller
选择安装和配置一个集群实例
选择高级安装
选择语言
不安装GNS,clustername是各个节点的ORACLE_SID去掉数字部分,
SCANNAME和hosts中的配置匹配
配置节点信息,两个节点都要配置上,和hosts中配置的信息匹配
配置网段
选择存储方式,选择ASM方式
配置ASM存储,groupname随意起,由于是测试用,选择external
选择candidatedisks,勾选所有磁盘
配置密码
不选择安装IPM
确认安装的用户组
确认安装目录
安装清单目录
检查环境
开始安装
用ROOT运行两个脚本,两个节点都要运行,第二个脚本需要比较长的时间。
回到图形界面点O.K.继续
如果root.sh在某一节点报错可以删除该节点的CRS配置,重新执行root.sh
以root用户执行$GRID_HOME/crs/install/rootcrs.pl-verbose-deconfig-force
14.安装ORACLEDBMS软件
设置环境变量DISPLAY=192.168.0.102:
0.0
运行runInstaller
不选择发送邮件
选择只安装软件
勾选所有的节点
选择版本,ENTERPRISE版本
选择安装目录
选择权限组
root用户运行脚本,两个节点都要执行
15.dbca创建数据库实例
dbca
选择安装集群
选择创建数据库
选择数据库模板
填写数据库名称,SID去掉数字的部分,然后选择所有的节点
配置EM管理控制台
选择存储方式
配置flashbackarea和ARCHIVE
样例配置
内存和字符集配置
配置数据文件