您好,登錄后才能下訂單哦!
1、在一臺裸機上安裝Linux系統c3,準備讓其加入c1,c2兩節點的rac環境
要有兩個網卡eth0,eth2
(略)
2、調整/etc/hosts文件
將三個節點都變成如下
127.0.0.1localhost
192.168.33.101c1
192.168.33.201c1-vip
10.0.0.2c1-priv
192.168.33.102c2
192.168.33.202c2-vip
10.0.0.3c2-priv
192.168.33.103c3
192.168.33.203c3-vip
10.0.0.4c3-priv
10.0.0.1san
3、配置hangcheck-timer:用于監視 Linux
內核是否掛起
vim /etc/modprobe.conf
options hangcheck-timer
hangcheck_tick=30 hangcheck_margin=180
4、自動加載hangcheck-timer
模塊/u01/app/oracle/product/10.2.0/db_1
vim /etc/rc.local
modprobe hangcheck-timer
檢查hangcheck-timer模塊是否已經加載:
lsmod
| grep hangcheck_timer
5、創建組dba & oinstall,創建用戶oracle
groupadd
oinstall
groupadd dba
usreadd -g oinstall -G dba oracle
6、配置集群互信
在新節點創建key:
su - oracle
ssh-keygen -t rsa
ssh-keygen -t
dsa
cd .ssh
cat *.pub >> authorized_keys
然后三個節點進行輪流追加(略)
7、c3配置ntp
vim
/etc/ntp.conf
--------------------------------------
server
192.168.0.253
restrict 192.168.0.253 mask
255.255.255.255 nomodify notrap noquery
crontab -e
*/5 * * * * /usr/sbin/ntpdate san
8、導入san存儲
yum
install iscsi-initiator-utils -y
service iscsid start
iscsiadm -m
discovery -t st -p san
service iscsi start
chkconfig iscsid
on
chkconfig iscsi on
9、用udev進行綁定
vim /etc/udev/rules.d/60-raw.rules
ACTION=="add",
KERNEL=="sdf1", RUN+="/bin/raw /dev/raw/raw1 %N"
ACTION=="add",
KERNEL=="sdg1", RUN+="/bin/raw /dev/raw/raw2 %N"
KERNEL=="raw1",
OWNER="oracle", GROUP="oinstall", MODE="660"
KERNEL=="raw2", OWNER="oracle",
GROUP="oinstall", MODE="660"
然后啟動udev
start_udev
9.5、為了將來在c3上開啟實例方便
可以直接拷貝c1的
/etc/sysctl.conf
/etc/security/limits.conf
/home/oracle/.bashrc
然后進行相應的修改
10、檢查集群節點
cd
/soft/clusterware/cluvfy/
./runcluvfy.sh stage -pre crsinst -n c1,c2,c3 -verbose
11、添加clusterware
從老節點啟動添加節點向導:
cd /u01/crs_1/oui/bin/
./addNode.sh
在Specify Cluster Nodes to Add to Installation頁
加入c3,c3-priv,c3-vip信息
執行三個腳本
c3上執行
/u01/app/oracle/oraInventory/orainstRoot.sh
c1上執行
/u01/crs_1/install/rootaddnode.sh
c3上執行
/u01/crs_1/root.sh
12、添加數據庫軟件
cd /u01/app/oracle/produt/10.2.0/db1/oui/bin/
./addNode.sh
在Specify Cluster Nodes to Add to Installation頁
勾選c3
執行一個腳本
在c3上執行
/u01/app/oracle/product/10.2.0/db_1/root.sh
13、配置監聽
在老節點c1啟動netca
選擇Cluster configuration
選擇c3節點
Listener configuration
Add
LISTENER
TCP
Use the standard port number of 1521
14、掃描ASM磁盤
在c3安裝oracleasmlib、oracleasm、oracle-support包
/etc/init.d/oracleasm configure
/etc/init.d/oracleasm scandisks
15、啟動dbca配置ASM實例
Configure Automatic Storage Management
選擇c1和c3(c1是自動選擇的)
16、添加實例
還是使用dbca
Instance Management
Add Instance
確認左側的Database Services是一個服務,
右側的實例是三個,都選擇Preferred,TAF選擇Basic
完成
17、啟動新實例
在16步完成后可能會無法啟動實例3,下面需要這樣幾步來修改
在c1實例上
ALETR SYSTEM SET CLUSETER_DATABASE_INSTANCES=3 SCOPE=SPFILE;
CREATE PFILE='/tmp/init.ora' FROM SPFILE;
把pfile拷貝到c3上
scp /tmp/init.ora c3:/tmp/init.ora
在c3主機上
修改內容
kdata1.__db_cache_size=352321536
kdata2.__db_cache_size=356515840
kdata3.__db_cache_size=352321536
kdata2.__java_pool_size=4194304
kdata1.__java_pool_size=4194304
kdata3.__java_pool_size=4194304
kdata2.__large_pool_size=4194304
kdata1.__large_pool_size=4194304
kdata3.__large_pool_size=4194304
kdata1.__shared_pool_size=230686720
kdata2.__shared_pool_size=226492416
kdata3.__shared_pool_size=226492416
kdata2.__streams_pool_size=0
kdata1.__streams_pool_size=0
kdata3.__streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/kdata/adump'
*.background_dump_dest='/u01/app/oracle/admin/kdata/bdump'
*.cluster_database_instances=3
*.cluster_database=true
*.compatible='10.2.0.1.0'
*.control_files='+AS/kdata/controlfile/current.268.803056777'#Restore
Controlfile
*.core_dump_dest='/u01/app/oracle/admin/kdata/cdump'
*.db_block_size=8192
*.db_create_file_dest='+AS'
*.db_create_online_log_dest_1='+AS'
*.db_domain=''
*.db_file_multiblock_read_count=16
*.db_name='kdata'
*.dispatchers='(PROTOCOL=TCP)
(SERVICE=kdataXDB)'
kdata1.instance_number=1
kdata2.instance_number=2
kdata3.instance_number=3
*.job_queue_processes=10
*.log_archive_dest='+AS'
*.open_cursors=300
*.pga_aggregate_target=199229440
*.processes=150
*.remote_listener='LISTENERS_kdata'
*.remote_login_passwordfile='exclusive'
*.sga_target=599785472
kdata2.thread=2
kdata1.thread=1
kdata3.thread=3
*.undo_management='AUTO'
kdata1.undo_tablespace='UNDOTBS1'
kdata2.undo_tablespace='UNDOTBS2'
kdata3.undo_tablespace='UNDOTBS3'
*.user_dump_dest='/u01/app/oracle/admin/kdata/udump'
在c3上
STARTUP PFILE='/tmp/init.ora'
在c3上
CREATE SPFILE='+AS/KDATA/spfilekdata.ora' FROM PFILE='/tmp/init.ora';
在c3上修改initkdata3.ora
SPFILE='+AS/KDATA/spfilekdata.ora'
至此,所有的部分都修改完畢。
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。