中文字幕av专区_日韩电影在线播放_精品国产精品久久一区免费式_av在线免费观看网站

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

虛擬軟件vmare內怎么安裝linux系統下的ORACLE數據的RAC環境

發布時間:2021-11-09 14:46:16 來源:億速云 閱讀:350 作者:iii 欄目:關系型數據庫

本篇內容介紹了“虛擬軟件vmare內怎么安裝linux系統下的ORACLE數據的RAC環境”的有關知識,在實際案例的操作過程中,不少人都會遇到這樣的困境,接下來就讓小編帶領大家學習一下如何處理這些情況吧!希望大家仔細閱讀,能夠學有所成!

/opt  //安裝包路徑 并且解壓grid壓縮包

1、安裝系統、配置雙網卡網絡、配置共享磁盤(以rac02為例)    

1.1 IP地址規劃

192.168.47.151 rac01

192.168.47.152 rac02

10.11.12.51 rac01priv

10.11.12.52 rac02priv

192.168.47.153 rac01vip

192.168.47.154 rac02vip

192.168.47.155 racscanip

1.2 設置共享盤(兩個虛擬機配置都需要更改設置)

1.2.1 添加獨立 永久磁盤--共享盤路徑:H:\sharedisk\diskrac2\sharedisk*

1.2.2 更改獨立虛擬機配置(vmdk中添加、修改以下信息)

一:

scsi1.present = "TRUE"scsi1.virtualDev = "lsilogic"scsi1.sharedBus = "virtual"
scsi1:1.present = "TRUE"scsi1:1.mode = "independent-persistent"

scsi1:1.filename = "H:\sharedisk\diskrac2\sharediskOCR.vmdk"

scsi1:1.deviceType = "plainDisk"scsi1:2.present = "TRUE"

scsi1:2.mode = "independent-persistent"

scsi1:2.filename = "H:\sharedisk\diskrac2\sharediskrDate01.vmdk"

scsi1:2.deviceType = "plainDisk"

scsi1:3.present = "TRUE"

scsi1:3.mode = "independent-persistent"

scsi1:3.filename = "H:\sharedisk\diskrac2\sharediskrDate02.vmdk"

scsi1:3.deviceType = "plainDisk"

scsi1:4.present = "TRUE"

scsi1:4.mode = "independent-persistent"

scsi1:4.filename = "H:\sharedisk\diskrac2\sharediskrFlash.vmdk"

scsi1:4.deviceType = "plainDisk"
disk.locking = "false"

diskLib.dataCacheMaxSize = "0"

diskLib.dataCacheMaxReadAheadSize = "0"

diskLib.DataCacheMinReadAheadSize = "0"

diskLib.dataCachePageSize = "4096"

diskLib.maxUnsyncedWrites = "0"

disk.EnableUUID="TRUE"

二:

scsi1.present = "TRUE"

scsi1.virtualDev = "lsilogic"

scsi1.sharedBus = "virtual"

scsi1:0.present = "TRUE"

scsi1:0.fileName = "C:\sharedisk\RAC01\ocr1.vmdk"

scsi1:0.mode = "independent-persistent"

scsi1:0.deviceType = "plainDisk"

scsi1:1.present = "TRUE"

scsi1:1.fileName = "C:\sharedisk\RAC01\ocr2.vmdk"

scsi1:1.mode = "independent-persistent"

scsi1:1.deviceType = "plainDisk"

scsi1:2.present = "TRUE"

scsi1:2.fileName = "C:\sharedisk\RAC01\ocr3.vmdk"

scsi1:2.mode = "independent-persistent"

scsi1:2.deviceType = "plainDisk"

scsi1:3.present = "TRUE"

scsi1:3.fileName = "C:\sharedisk\RAC01\data.vmdk"

scsi1:3.mode = "independent-persistent"

scsi1:3.deviceType = "plainDisk"

scsi1:4.present = "TRUE"

scsi1:4.fileName = "C:\sharedisk\RAC01\fra.vmdk"

scsi1:4.mode = "independent-persistent"

scsi1:4.deviceType = "plainDisk"

floppy0.present = "FALSE"

disk.locking = "false"

diskLib.dataCacheMaxSize = "0"

diskLib.dataCacheMaxReadAheadSize = "0"

diskLib.DataCacheMinReadAheadSize = "0"

diskLib.dataCachePageSize = "4096"

diskLib.maxUnsyncedWrites = "0"

disk.EnableUUID="TRUE"

三:

scsi1.sharedBus = "virtual"

scsi1:0.deviceType = "plainDisk"

scsi1:1.deviceType = "plainDisk"

scsi1:2.deviceType = "plainDisk"

scsi1:3.deviceType = "plainDisk"

scsi1:4.deviceType = "plainDisk"

disk.locking = "false"

diskLib.dataCacheMaxSize = "0"

diskLib.dataCacheMaxReadAheadSize = "0"

diskLib.DataCacheMinReadAheadSize = "0"

diskLib.dataCachePageSize = "4096"

diskLib.maxUnsyncedWrites = "0"

disk.EnableUUID="TRUE"

2、配置OS    

2.1 關閉防火墻、selinux

[root@rac02 ~]# chkconfig iptables off

[root@rac02 ~]# service iptables status

[root@rac02 ~]# service iptables stop

[root@rac02 ~]# vi /etc/selinux/config              

 SELINUX=disabled    

2.2 修改host文件

[root@rac02 ~]# vi /etc/hosts

172.19.15.142 racd01

172.19.15.141 racd02

10.10.11.10 racd01priv

10.10.11.22 racd02priv

172.19.15.143 racd01vip

172.19.15.144 racd02vip

172.19.15.145 racdscanip    

2.3 配置yum源         

 2.3.1 配置本地yum源

[root@rac02 ~]#yum clean all

[root@rac02 ~]#mkdir /mnt/cdrommount -t iso9660 /dev/cdrom /mnt/cdrom/

[root@rac02 ~]#vi /etc/yum.repos.d/local.repo

[local]

name=local

baseurl=file:///mnt/cdrom

gpgcheck=0enabled=1         

2.3.2 配置163yum源

[root@rac02 ~]#vi /etc/yum.repos.d/163.repo

[163]

name=163

baseurl=http://mirrors.163.com/centos/7/os/x86_64/

gpgcheck=0enabled=1

#yum repolist    

2.4 安裝rpm包

[root@rac02 ~]#vi  yum.sh

yum install  compat-lib* 

yum install  binutils-2* 

yum install  gcc* 

yum install  glibc-2* 

yum install  glibc-devel-2* 

yum install  ksh 

yum install  libgcc-4*

 yum install  libstdc++-4*

 yum install  libstdc++-d*

 yum install libaio-0* 

yum install  libaio-d* 

yum install  sysstat-9*

yum install  make-3*

yum install binutils-2*

yum install libc*    

2.5 修改內核配置文件

[root@rac02 ~]#vi /etc/sysctl.conf

fs.aio-max-nr = 1048576

fs.file-max = 6815744

kernel.shmall = 2097152

kernel.shmmax = 1054472192

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 = 1048586

net.ipv4.tcp_wmem = 262144 262144 262144

net.ipv4.tcp_rmem = 4194304 4194304 4194304

[root@rac02 ~]##sysctl -p   //立即生效。    

 2.6 修改用戶限制

[root@rac02 ~] #vi /etc/security/limits.conf

grid soft nproc 2047

grid hard nproc 16384

grid soft nofile 1024

grid hard nofile 65536

oracle soft nproc 2047

oracle hard nproc 16384

oracle soft nofile 1024

oracle hard nofile 65536    

 2.7配置Oracle軟件安裝組、用戶、環境變量、安裝目錄         

 2.7.1 #創建組

groupadd -g 1300 dbagroupadd -g 1301 opergroupadd -g 1000 oinstallgroupadd -g 1200 asmadmin

groupadd -g 1201 asmdbagroupadd -g 1202 asmoper            

   #用戶

useradd -m -u 1100 -g oinstall -G asmadmin,asmdba,asmoper -s /bin/bash grid

useradd -m -u 1101 -g oinstall -G dba,oper,asmdba -s /bin/bash oracle         

2.7.2#配置目錄

mkdir -p /u01/app/11.2.0/grid

mkdir -p /u01/app/grid

mkdir -p /u01/app/oracle

chown grid:oinstall /u01/app/11.2.0/grid

chown grid:oinstall /u01/app/grid

chown oracle:oinstall /u01/app/oracle

chmod -R 775 /u01/chown -R grid:oinstall /u01

2.7.3#用戶環境變量修改home下的 .bash_profile(Oracle_sid需要根據節點不同進行修改)    

ORACLE用戶

export TMP=/tmp

export TMPDIR=$TMPexport ORACLE_SID=orc1  # rac01

export ORACLE_SID=orc2  # rac02

export ORACLE_UNQNAME=orc

export ORACLE_BASE=/u01/app/oracle

export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1

export TNS_ADMIN=$ORACLE_HOME/network/admin

export PATH=/usr/sbin:$PATH

export PATH=$ORACLE_HOME/bin:$PATH

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib

$ source .bash_profile   //使配置文件生效    

GRID用戶

export TMP=/tmp

export TMPDIR=$TMP

export ORACLE_SID=+ASM1  # rac01

export ORACLE_SID=+ASM2  # rac02

export ORACLE_BASE=/u01/app/grid

export ORACLE_HOME=/u01/app/11.2.0/grid

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

umask 022

$ source .bash_profile   //使配置文件生效    

2.8.配置grid及oracle用戶ssh互信         

 方法一:

#cd /software/grid/sshsetup

#./sshUserSetup.sh -user grid -hosts "rac01 rac02" -advanced -noPromptPassphrase

#./sshUserSetup.sh -user oracle -hosts "rac01 rac02" -advanced -noPromptPassphrase       

方法二:              

 1)在節點 1 上:                    

 [root@rac01 ~]$ su - grid                   

 [grid@rac01 ~]$ cd /home/grid/                   

 [grid@rac01 ~]$  mkdir~/.ssh                   

 [grid@rac01 ~]$ chmod   700 ~/.ssh                   

 [grid@rac01 ~]$ ssh-keygen -t rsa                   

 [grid@rac01 ~]$ ssh-keygen -t dsa              

 2)在節點2上:                   

[root@rac02 ~]$ su - grid                   

[grid@rac02 ~]$ cd /home/grid/                    

[grid@rac02 ~]$ mkdir  ~/.ssh                    

[grid@rac02 ~]$ chmod   700 ~/.ssh                   

[grid@rac01 ~]$ ssh-keygen -t rsa                   

[grid@rac01 ~]$ ssh-keygen -t dsa            

3) 僅在一個節點操作,以rac01為例:                   

 [grid@rac01 ~]$ touch ~/.ssh/authorized_keys                   

 [grid@rac01 ~]$ cd ~/.ssh                   

[grid@rac01.ssh]$ ssh racd01 cat ~/.ssh/id_rsa.pub >> authorized_keys                   

[grid@rac01.ssh]$ ssh racd02 cat ~/.ssh/id_rsa.pub >> authorized_keys                   

[grid@rac01.ssh]$ ssh racd01 cat ~/.ssh/id_dsa.pub >> authorized_keys                   

[grid@rac01.ssh]$ ssh racd02 cat ~/.ssh/id_dsa.pub >> authorized_keys                   

[grid@rac01.ssh]$pwd                   

[grid@rac01.ssh]$scp authorized_keys racd02:`pwd`              

 4)每個節點均操作                   

[grid@rac01 ~]$ chmod 600 ~/.ssh/authorized_keys                   

[grid@rac01 ~]$ chmod 600 ~/.ssh/authorized_keys               

5)在要運行oui的接單以grid用戶運行,以racd01為例:                   

[grid@rac01.ssh]$exec /usr/bin/ssh-agent $SHELL                   

[grid@rac01.ssh]$ssh-add             

 6)檢查互信                   

$ ssh rac01 date                   

$ ssh rac02 date                   

$ ssh rac01priv date                   

$ ssh rac02priv date    

2.9 配置裸設備[root@rac01 ~]#fdisk /dev/sdb         

 n   p   1    +2G         

 n   p   2     w 

[root@rac01 ~]# vi /etc/udev/rules.d/60-raw.rules

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

ACTION=="add", ENV{MAJOR}=="8", ENV{MINOR}=="17", RUN+="/bin/raw /dev/raw/raw1 %M %m"

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

ACTION=="add", ENV{MAJOR}=="8", ENV{MINOR}=="33", RUN+="/bin/raw /dev/raw/raw2 %M %m"

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

ACTION=="add", ENV{MAJOR}=="8", ENV{MINOR}=="49", RUN+="/bin/raw /dev/raw/raw3 %M %m"

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

ACTION=="add", ENV{MAJOR}=="8", ENV{MINOR}=="65", RUN+="/bin/raw /dev/raw/raw4 %M %m"

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

ACTION=="add", ENV{MAJOR}=="8", ENV{MINOR}=="81", RUN+="/bin/raw /dev/raw/raw5 %M %m"

ACTION=="add",KERNEL=="raw*",OWNER="grid",GROUP="asmadmin",MODE="660"

[root@rac01 ~]#start_udev    //無法正確安裝時,使用下列兩個語句    

 // #raw /dev/raw/raw1 /dev/sdb1      

// #raw /dev/raw/raw2 /dev/sdb2

[root@rac01 ~]#raw -qa  =等價于= ls -lrt /dev/raw

[root@rac01 ~]#ll /dev/raw

[root@rac01 ~]#partprobe

3、安裝grid

[root@rac01 /]#xhost +

[root@rac01 /]# su - grid

[grid@rac01 ~]$ export

[grid@rac01 ~]$ cd /software/grid/

[grid@rac01 grid]$ ./runInstaller         

運行roo.sh報錯,可使用如下命令

[root@rac02 ~]# /u01/app/11.2.0/grid/crs/install/rootcrs.pl -deconfig -force         

查看安裝日志

[root@rac01 /]# cat /u01/app/oraInventory/logs/installActions2019-03-27_04-25-47PM.log         

檢查crs狀態

[grid@rac01 ~]$ crsctl check crs         

檢查Clusterware資源

[grid@rac01 ~]$ crs_stat -t -v

[grid@rac01 ~]$ crsctl stat res -t         

 檢查集群節點

[grid@rac01 ~]$ olsnodes -n         

檢查兩個節點上的Oracle TNS監聽器進程

[grid@rac01 ~]$ ps -ef|grep lsnr|grep -v 'grep'|grep -v 'ocfs'|awk '{print$9}'         

 確認當前正在運行已安裝的Oracle ASM:

[grid@rac01 ~]$ srvctl status asm -a        ./runcluvfy.sh stage -post hwos -n rac01,rac02 -verbose         

 安裝asm [grid@rac01 ~]$ asmca

4、安裝oracle

[root@rac01 ~]#xhost +

[root@rac01 ~]# su - oracle

[oracle@rac01 ~]$ cd /software/database

[oracle@rac01 database]$ ./runInstaller    

5、檢查安裝后的配置            

檢查集群運行狀態

[grid@rac01 ~]$srvctl status database -d orc           

檢查本地節點crs狀態

[grid@rac01 ~]$ crsctl check crs          

 檢查集群crs狀態

[grid@rac01 ~]$ crsctl check cluster           

檢查集群節點

[grid@rac01 ~]$ olsnodes -n -i -s -t          

檢查集群間的表決磁盤信息

[grid@rac01 ~]$ crsctl query css votedisk          

 檢查集群scan ip

[grid@rac01 ~]$ srvctl config scan            

檢查scan 監聽       

[grid@rac01 ~]$  srvctl config scan_listener

6、啟、停集群數據庫進入grid用戶 

整個集群的數據庫啟停

[grid@rac01 ~]$ srvctl stop database -d orcl

[grid@rac01 ~]$ srvctl start database -d orcl

進入root用戶 只關閉了當前結點

[root@rac01 bin]# pwd/u01/app/11.2.0/grid/bin

[root@rac01 bin]# ./crsctl stop crs

7、em

[oracle@rac1 ~]$ emctl status dbconsole

[oracle@rac1 ~]$ emctl start dbconsole

[oracle@rac1 ~]$ emctl stop dbconsole                                                                                                           

“虛擬軟件vmare內怎么安裝linux系統下的ORACLE數據的RAC環境”的內容就介紹到這里了,感謝大家的閱讀。如果想了解更多行業相關的知識可以關注億速云網站,小編將為大家輸出更多高質量的實用文章!

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

涟源市| 宝清县| 屯昌县| 连平县| 甘谷县| 汶川县| 交城县| 平罗县| 嘉黎县| 浦江县| 武隆县| 永靖县| 阜新市| 丰城市| 永平县| 正宁县| 壤塘县| 温泉县| 东丰县| 柘荣县| 饶河县| 晋州市| 密云县| 辉南县| 辽阳市| 贡觉县| 大冶市| 余姚市| 天津市| 古浪县| 泌阳县| 齐齐哈尔市| 务川| 简阳市| 黄冈市| 瑞金市| 安庆市| 布尔津县| 平原县| 南岸区| 阿克陶县|