版權(quán)說(shuō)明:本文檔由用戶(hù)提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、Oracle 12c R1 RAC for Oracle Linux 6.4 X86_64 install物理機(jī)配置:Core i3 CPU(64位、VT技術(shù)支持即可),Win7 X86_64位系統(tǒng)(64位系統(tǒng)即可),6G內(nèi)存(全安裝完后,內(nèi)存利用率為95%),300G硬盤(pán)虛擬機(jī)配置(1,2機(jī)同配):1 CPU,2.5G內(nèi)存,50G硬盤(pán),雙網(wǎng)卡軟件:VirtualBox 4.3.8,Oracle Linux 6.4 X86_64,Oracle 12C R1 X86_64(包含四個(gè)文件),oracleasm驅(qū)動(dòng)(包含一個(gè)文件,X86_64),詳見(jiàn)下面:安裝Oracle Linux 6.4系統(tǒng),安
2、裝時(shí)選擇Desktop,因?yàn)橐肙racle 12c圖形安裝,避免麻煩,具體安裝包如下:Base System > Base Base System > Compatibility libraries · Base System > Hardware monitoring utilities · Base System > Large Syst
3、ems Performance · Base System > Network file system client · Base System > Performance Tools · Base System > Perl Support · Base System > Java
4、PlatformServers > Server Platform Servers > System administration tools · Servers > oracle-rdbms-server-11gR2-Servers > oracleasm-support-Desktops > Desktop Desktops > Desktop Platform
5、60;· Desktops > Fonts Desktops > General Purpose Desktop · Desktops > Graphical Administration Tools · Desktops > Input Methods · Desktops > X Wi
6、ndow System · Applications > Internet Browser · Development > Additional Development · Development > Development Tools 檢測(cè)硬件環(huán)境:grep MemTotal /proc/meminfo 內(nèi)存>4Ggrep SwapTotal /proc/meminfo
7、交換分區(qū)>2.5Gdf m /tmp /tmp目錄空閑區(qū)>2Gfree 查看可用內(nèi)存和交換空間df m 硬盤(pán)空閑空間>30Guname m;uname a 查看系統(tǒng)提醒架構(gòu)cat /etc/oracle-release;lsb_release id 查看系統(tǒng)發(fā)行版本一、oracle linux 6 yum服務(wù)器的搭建備份/etc/yum.repos.d/下其他repo文件mount /dev/cdrom /mntrpm -ivh createrepo-0.9.9-17.el6.noarch.rpm deltarpm-3.5-0.5.20090913git.
8、el6.x86_64.rpm python-deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm然后建立以下內(nèi)容local.repo文件Servername=Serverbaseurl=file:/mnt/Servergpgcheck=0enabled=1gpgkey=file:/mnt/RPM-GPG-KEY-oracle 然后yum clean all然后就可以yum -y install 了二、依賴(lài)包yum install binutils -y yum&
9、#160;install compat-libcap1 -y yum install compat-libstdc+-33 -y yum install compat-libstdc+-33.i686 -y yum install gcc -y yum install gcc-c+ -y yum install glibc -y yum install
10、60;glibc.i686 -y yum install glibc-devel -y yum install glibc-devel.i686 -y yum install ksh -y yum install libgcc -y yum install libgcc.i686 -y yum install libstdc+ -y yu
11、m install libstdc+.i686 -y yum install libstdc+-devel -y yum install libstdc+-devel.i686 -y yum install libaio -y yum install libaio.i686 -y yum install libaio-devel -y yum in
12、stall libaio-devel.i686 -y yum install libXext -y yum install libXext.i686 -y yum install libXtst -y yum install libXtst.i686 -y yum install libX11 -y yum install libX11.i686&
13、#160;-y yum install libXau -y yum install libXau.i686 -y yum install libxcb -y yum install libxcb.i686 -y yum install libXi -y yum install libXi.i686 -y yum install
14、make -y yum install sysstat -y yum install unixODBC -y yum install unixODBC-devel -ybinutils-.2-5.11.el6 (x86_64)compat-libcap1-1.10-1 (x86_64)compat-libstdc+-33-3.2.3-69.el6 (x86_64)compat-libstdc+-33-3.2.3-69.el6 (i686)gcc-4
15、.4.4-13.el6 (x86_64)gcc-c+-4.4.4-13.el6 (x86_64)glibc-2.12-1.7.el6 (i686)glibc-2.12-1.7.el6 (x86_64)glibc-devel-2.12-1.7.el6 (x86_64)glibc-devel-2.12-1.7.el6 (i686)kshlibgcc-4.4.4-13.el6 (i686)libgcc-4.4.4-13.el6 (x86_64)libstdc+-4.4.4-13.el6 (x86_64)libstdc+-4.4.4-13.el6 (i686)libstdc+-devel-4.4.4-
16、13.el6 (x86_64)libstdc+-devel-4.4.4-13.el6 (i686)libaio-0.3.107-10.el6 (x86_64)libaio-0.3.107-10.el6 (i686)libaio-devel-0.3.107-10.el6 (x86_64)libaio-devel-0.3.107-10.el6 (i686)libXext-1.1 (x86_64)libXext-1.1 (i686)libXtst- (x86_64)libXtst- (i686)libX11-1.3 (x86_64)libX11-1.3 (i686)l
17、ibXau-1.0.5 (x86_64)libXau-1.0.5 (i686)libxcb-1.5 (x86_64)libxcb-1.5 (i686)libXi-1.3 (x86_64)libXi-1.3 (i686)make-3.81-19.el6sysstat-9.0.4-11.el6 (x86_64)檢查軟件包的安裝rootoradata12C # rpm -qa | grep binutilsrootoradata12C # rpm -qa | grep compatrootoradata12C # rpm -qa | grep gccrootoradata12C # rpm -qa
18、| grep compat-libstdc+rootoradata12C # rpm -qa | grep glibcrootoradata12C # rpm -qa | grep kshrootoradata12C # rpm -qa | grep libgccrootoradata12C # rpm -qa | grep libstdc+rootoradata12C # rpm -qa | grep libaiorootoradata12C # rpm -qa | grep libXrootoradata12C # rpm -qa | grep libXextrootoradata12C
19、# rpm -qa | grep libXtstrootoradata12C # rpm -qa | grep libXextrootoradata12C # rpm -qa | grep libXtstrootoradata12C # rpm -qa | grep libX11rootoradata12C # rpm -qa | grep libXaurootoradata12C # rpm -qa | grep libXirootoradata12C # rpm -qa | grep libxcbrootoradata12C # rpm -qa | grep makerootoradata
20、12C # rpm -qa | grep sysstat三、內(nèi)核參數(shù)(RAC時(shí),01、02機(jī)相同)vi /etc/sysctl.confkernel.shmmni=4096kernel.sem=250 32000 100 128kernel.shmmax= 4398046511104 kernel.shmall= 1073741824fs.file-max=6815744net.ipv4.ip_local_port_range=9000 65500net.core.rmem_default=262144net.core.wmem_default=262144net.core.rmem_max=
21、4194304net.core.wmem_max=1048576fs.aio-max-nr=1048576查看上面參數(shù)值:/sbin/sysctl a|grep 參數(shù)名使內(nèi)核參數(shù)即時(shí)生效:/sbin/sysctl p四、設(shè)置grid和oracle用戶(hù)shell限制(RAC時(shí),01、02機(jī)相同)Vi /etc/security/limits.conf加入gridsoftnproc2047(確認(rèn)左邊參數(shù)#ulimit Su)gridhardnproc16384(確認(rèn)左邊參數(shù)#ulimit Hu)gridsoftnofile1024(確認(rèn)左邊參數(shù)#ulimit Sn)gridhardnofile65
22、536(確認(rèn)左邊參數(shù)#ulimit Hn)grid soft stack 10240(確認(rèn)左邊參數(shù)#ulimit Ss)grid hard stack 32768(確認(rèn)左邊參數(shù)#ulimit Hs)oraclesoftnproc2047oraclehardnproc16384oraclesoftnofile1024oraclehardnofile65536oracle soft stack 10240oracle hard stack 32768vi /etc/pam.d/login加入(RAC時(shí),01、02機(jī)相同)sessionrequired/lib/security/pam_limits
23、.so(X64系統(tǒng)用/lib64/security/pam_limits.so)session requiredpam_limits.so$source /.bash_profile使環(huán)境變量生效解壓zip包:unzip *.zip更改主機(jī)名:vi /etc/sysconfig/network和/etc/hostsHOSTNAME=XXX.com(最好是全域名)RAC時(shí),/etc/hosts(RAC時(shí),01、02機(jī)相同)<IP-address><fully-qualified-machine-name><machine-name> #public
24、eth04oracle015oracle02#vip4oracle01-oracle01-vip5oracle02-oracle02-vip#private eth14oracle01-oracle01-priv5oracle02-oracle02-priv#scanoracle-scanroot12c-vst-rac2 # cat /etc/security/limits.d/90-nproc.con
25、f # Default limit for number of user's processes to prevent # accidental fork bombs. # See rhbz #432903 for reasoning. * -
26、0; nproc 16384 root soft nproc unlimited vi /etc/selinux/config注釋掉SELINUX=enforcing,再加上SELINUX=disable使用以下命令重新啟動(dòng) # setenforce
27、0; Permissive關(guān)閉防火墻:Chkconfig -list iptablesChkconfig iptables offChkconfig -list iptables# service iptables stop # chkconfig iptables off檢查selinux和防火墻配置:# getenforce# service iptables status#xhost +#export DISPLAY=x.x.x.x:0.0Xmanager設(shè)置:XstartExecution Command選GNOME,見(jiàn)下圖:
28、時(shí)間同步協(xié)議NTP配置(不建議使用NTP)或者停ntp時(shí)間同步service ntpd stop chkconfig ntpd off mv /etc/ntp.conf /etc/ntp.conf.bak 五、創(chuàng)建組和用戶(hù)(RAC時(shí),01、02機(jī)相同)節(jié)點(diǎn)1 rootrac01 # groupadd -g 54321 oinstall rootrac01 # groupadd -g 54322 dba rootrac01 # groupadd -g 54323 oper rootrac01 # groupadd -g 54324 backupdba rootrac01 # groupadd -
29、g 54325 dgdba rootrac01 # groupadd -g 54326 kmdba rootrac01 # groupadd -g 54327 asmdba rootrac01 #groupadd -g 54328 asmoper rootrac01 # groupadd -g 54329 asmadmin rootrac01 #useradd -u 12345 -g oinstall -G dba,asmadmin,asmdba,asmoper grid rootrac01 # useradd -u 54321 -g oinstall -G dba,oper,backupdb
30、a,dgdba,kmdba,asmdba,asmadmin oracle rootrac01 # passwd gridrootrac01 # passwd oracle六、創(chuàng)建相關(guān)目錄(RAC時(shí),01、02機(jī)相同)節(jié)點(diǎn)1 # mkdir -p /u01/app/12.1.0/grid # mkdir -p /u01/app/grid # mkdir -p /u01/app/oracle/product/12.1.0/db_1# chown -R grid
31、:oinstall /u01 # chmod -R 775 /u01/ # chown -R oracle:oinstall /u01/app/oracle七、設(shè)置環(huán)境變量節(jié)點(diǎn)1 gridrac01 $ vi .bash_profile export TMP=/tmp export TMPDIR=/tmpexport ORACLE_HOSTNAME=export ORACLE_BASE=/u01/app/grid export
32、;ORACLE_HOME=/u01/app/12.1.0/grid export ORACLE_SID=+ASM1 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 export DISPLAY=:0.0umask=022orac
33、lerac01 $ vi .bash_profile export TMP=/tmp export TMPDIR=/tmpexport ORACLE_HOSTNAME=export ORACLE_UNQNAME=racdbexport ORACLE_BASE=/u01/app/oracle export ORACLE_HOME=/u01/app/oracle/product/12.1.0/db_1export ORACLE_SID=racdb1export PATH=$ORACLE_HOME/b
34、in:$PATH export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib export DISPLAY=:0.0umask=022節(jié)點(diǎn)2 gridrac02 $ vi .bash_profile export TMP=/tmp export TMPDIR=/tmpexport ORACLE_HOSTNAM
35、E=export ORACLE_BASE=/u01/app/grid export ORACLE_HOME=/u01/app/12.1.0/grid export ORACLE_SID=+ASM2export PATH=$ORACLE_HOME/bin:$PATH export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOM
36、E/rdbms/jlib export DISPLAY=:0.0umask=022oraclerac02 $ vi .bash_profile export TMP=/tmp export TMPDIR=/tmpexport ORACLE_HOSTNAME=export ORACLE_UNQNAME=racdbexport ORACLE_BASE=/u01/app/oracle export ORACLE_HOME=/u01/app/oracle/product/12.1.0/db_1export
37、0;ORACLE_SID=racdb2export 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 DISPLAY=:0.0umask=022八、測(cè)試rootrac01 # ping rac01 rootrac01 # ping rac01-priv roo
38、trac01 # ping rac02 rootrac01 # ping rac02-priv rootrac02 # ping rac01 rootrac02 # ping rac01-priv rootrac02 # ping rac02 rootrac02 # ping rac02-privfdisk lrootoracle1# fdisk -lDisk /dev/sdd: 10.5 GB, 10485760000 bytes255 heads, 63 sectors/track, 1274 cylindersUnits = cylinders of 16065 * 512 = 8225
39、280 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x50e5d5d9 Device Boot Start End Blocks Id System/dev/sdd1 1 1274 10233373+ 83 LinuxDisk /dev/sdb: 5242 MB, 5242880000 bytes255 heads, 63 sectors/track, 637 cylindersUnits
40、= cylinders of 16065 * 512 = 8225280 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x37c21d87 Device Boot Start End Blocks Id System/dev/sdb1 1 637 5116671 83 LinuxDisk /dev/sdc: 8388 MB, 8388608000 bytes255 heads, 63 sect
41、ors/track, 1019 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0xc3f44eb7 Device Boot Start End Blocks Id System/dev/sdc1 1 1019 8185086 83 LinuxDisk /dev/sda: 53.1 GB, 53
42、130297344 bytes255 heads, 63 sectors/track, 6459 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x000029cb Device Boot Start End Blocks Id System/dev/sda1 * 1 26 204800 83
43、 LinuxPartition 1 does not end on cylinder boundary./dev/sda2 26 664 5120000 82 Linux swap / SolarisPartition 2 does not end on cylinder boundary./dev/sda3 664 6460 46559232 83 Linuxrootoracle1 oracleasm#rootcmsnmdb1 # /sbin/partprobeASM設(shè)置:安裝oracleasm驅(qū)動(dòng),前面的一個(gè),自身帶有一個(gè),共兩個(gè),如下:運(yùn)行以下命令,啟動(dòng) ASM 配置程序 (以下操作ro
44、ot用戶(hù)分別在前置機(jī)執(zhí)行) /etc/init.d/oracleasm configure Default user to own the driver interface 輸入grid Default group to own the driver interface 輸入asmadmin Start Oracle ASM library driver on boot 輸入y Fix permissions of Oracle ASM disks on boot 輸入 y 創(chuàng)建ASM 磁盤(pán)。創(chuàng)建 ASM 磁盤(pán)使用下的命令 (以下操作root用戶(hù)在任意一臺(tái)前置機(jī)執(zhí)行) #/usr/sbin/o
45、racleasm init/etc/init.d/oracleasm createdisk asm1 /dev/sdb1 /etc/init.d/oracleasm scandisks /etc/init.d/oracleasm listdisks安裝cvuqdisk,cvuqdisk RPM 包含在 Oracle Grid Infrastructure 安裝介質(zhì)上的 rpm 目錄中(兩個(gè)節(jié)點(diǎn)都要裝)。# CVUQDISK_GRP=oinstall; export CVUQDISK_GRP# rpm ivh cvuqdisk-1.0.9-1.rpm如果測(cè)試安裝雙機(jī)
46、互信通不過(guò),可運(yùn)行g(shù)rid安裝目錄中的一個(gè)文件(目錄為/grid/sshsetup)。在rac1上運(yùn)行(root用戶(hù))./sshUserSetup.sh -user root -hosts rac2 rac1 -advanced -exverify -confirm 在rac2上執(zhí)行(root用戶(hù))./sshUserSetup.sh -user root -hosts rac1 rac2 -advanced
47、160;-exverify confirm在rac1上運(yùn)行 (grid用戶(hù))./sshUserSetup.sh -user grid -hosts rac2 rac1 -advanced -exverify -confirm 在rac2上運(yùn)行 (grid用戶(hù))./sshUserSetup.sh -user grid -hosts rac1 rac2 -advanced&
48、#160;-exverify -confirm 在rac1上運(yùn)行 (oracle用戶(hù))./sshUserSetup.sh -user oracle -hosts rac2 rac1 -advanced -exverify -confirm 在rac2上運(yùn)行 (oracle用戶(hù))./sshUserSetup.sh -user oracle -hosts rac1 rac2
49、 -advanced -exverify -confirm校驗(yàn) grid12crac1 grid$ ./runcluvfy.sh stage -pre crsinst -n oracle1,oracle2 verbose九、安裝 Oracle Grid Infrastructuregridoracle1$./runInstaller注:上面選錯(cuò)了,應(yīng)該選CRS。注:我的物理機(jī)內(nèi)存太?。?G),安裝oracle 12C要求大于4G內(nèi)存;
50、因?yàn)樽鰧?shí)驗(yàn),所以沒(méi)有做DNS解析,生產(chǎn)狀態(tài)最好做DNS解析。(不影響安裝,忽略了)十、檢查OGI安裝、運(yùn)行狀態(tài)grid$srvctl status nodeapps十一、安裝數(shù)據(jù)庫(kù)軟件oracleoracle1$ ./runInstaller十二、為RAC數(shù)據(jù)庫(kù)創(chuàng)建ASM磁盤(pán)組ASMCAgridoracle1 $ asmca十三、創(chuàng)建RAC數(shù)據(jù)庫(kù)DBCAoracleoracle1 $ dbca更改Server pools 如果在創(chuàng)建數(shù)據(jù)庫(kù)時(shí), 把server pools 的 Cardinality 設(shè)為1,只有1
51、個(gè)節(jié)點(diǎn)的oracle 實(shí)例會(huì)運(yùn)行。 需要用下列指令修改 $ srvctl modify srvpool serverpool mysp max -1 歸檔先別開(kāi),否則影響建庫(kù)速度查看歸檔啟用與否: sysLUOCS12C> archive log list Database log mode &
52、#160; No Archive Mode Automatic archival Disabled Archive destination USE_DB_RECOVERY_F
53、ILE_DEST Oldest online log sequence 15 Current log sequence 16 現(xiàn)在手動(dòng)開(kāi)啟: oracle12crac1 $ srvctl stop database -d luocs12c
54、oracle12crac1 $ srvctl start database -d luocs12c -o mount節(jié)點(diǎn)1: oracle12crac1 $ sqlplus / as sysdba SQL*Plus: Release .0 Production on Mon Jul 1 17:13:58 2013 Cop
55、yright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 12c Enterprise Edition Release .0 -64bit Production With the Partitioning, Real Applicati
56、on Clusters, Automatic Storage Management, OLAP, Advanced Analytics and Real Application Testing options idle> alter database archivelog; Database altered. idle> alter database open; Database
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶(hù)所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶(hù)上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶(hù)上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶(hù)因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 毛皮制品制作工安全生產(chǎn)意識(shí)競(jìng)賽考核試卷含答案
- 船舶涂裝工安全生產(chǎn)基礎(chǔ)知識(shí)能力考核試卷含答案
- 模鍛工操作規(guī)程水平考核試卷含答案
- 2025年陶瓷片狀磷擴(kuò)散沅項(xiàng)目發(fā)展計(jì)劃
- 2025年特種裝備電纜項(xiàng)目發(fā)展計(jì)劃
- 2025年新能源掃路車(chē)項(xiàng)目發(fā)展計(jì)劃
- 2025年雄激素及同化激素合作協(xié)議書(shū)
- 2026年智能SOS緊急按鈕項(xiàng)目投資計(jì)劃書(shū)
- 消防保衛(wèi)方案及保證措施
- 選礦工年度考核試卷及答案
- 養(yǎng)老院老人生活設(shè)施管理制度
- (2025年)林業(yè)系統(tǒng)事業(yè)單位招聘考試《林業(yè)知識(shí)》真題庫(kù)與答案
- 2026年七臺(tái)河職業(yè)學(xué)院高職單招職業(yè)適應(yīng)性考試備考題庫(kù)有答案解析
- 2026年直播服務(wù)合同
- 掛靠取消協(xié)議書(shū)
- 哲學(xué)史重要名詞解析大全
- 銀行借款抵押合同范本
- 新生兒休克診療指南
- DB37-T4975-2025分布式光伏直采直控技術(shù)規(guī)范
- 兒童糖尿病的發(fā)病機(jī)制與個(gè)體化治療策略
- 水泥產(chǎn)品生產(chǎn)許可證實(shí)施細(xì)則2025
評(píng)論
0/150
提交評(píng)論