鄒先聰,萬勇
摘要:當前網(wǎng)上關于安裝LIS服務器資料甚多,但是其中存在一些問題。該文筆者根據(jù)安裝服務器經(jīng)驗探討了Linux環(huán)境下Ora? cle10g安裝,以供參考。
關鍵詞:LIS服務器;Linux;RAC;心得體會
中圖分類號:TP393文獻標識碼:A文章編號:1009-3044(2012)02-0262-03
Oracle10g Installation under Linux(RAC)
ZOU Xian-cong, WAN Yong
(Sichuan Academy of Medical Sicences & Sichuan Provincial Peoples Hospotal Institute of Dermatology STD, Chengdu 610031, China)
Abstract: The current online information about installing many LIS server, but of which there are some problems. This experience of the author based on the Linux installation server environment Oracle10g installation for reference.
Key words: LIS server; Linux; RAC; feelings and experiences
前段時間單位安裝LIS服務器,在網(wǎng)上翻閱很多資料,發(fā)現(xiàn)網(wǎng)上的內(nèi)容多多少少都有一點問題,于是在安裝服務器后,綜合自己安裝的經(jīng)驗寫下一篇關于Linux環(huán)境下安裝oracle10g的心得,供大家參考。
檢驗系統(tǒng)環(huán)境
grep MemTotal /proc/meminfo
grep SwapTotal /proc/meminfo
df–k/tmp
#要求:大于512M內(nèi)存,大于1G交換空間,大于400M的臨時文件空間
#/etc?hosts文件中有所有主機的名字(公共和私有)
Rpm–qa|grep compat
#必須有以下軟件包:
#gcc-3.2.3-2
#compat–db-4.0.14.5
#compat–gcc-7.3-2.96.122
#compat–gcc-gc++-7.3-2.96.122
#compat–gcc-libstdc++-7.3-2.96.122
#compat–gcc-libstdc++-devel-7.3-2.96.122
#openmotif21-2.1.30-8
#stdarch-1.3-1
#必須有hangcheck-timer內(nèi)核模塊
/sbin/lsmod|grep–I hang
Vi/etc/rc.local
/sbin/insmod hangcheck_timer hangcheck_tich=30 hangcheck_margin-180
準備用戶和組
groupadd–g 600 oinstall
groupadd–g 601 dba
useradd–u 600–d /home/oracle–g“oninstall”–G“dba”–m–s /bin/bash oracle
grep nobody /etc/password
#確認出nobody用戶的存在
cd /home/oracle
vi .bash_profile
umask 022
ORACLE_BASE=/oracle/oracle;
Export ORACLE_BASE TMP=/oracle/tmp;
Export TMP TMPDIR=$TMP;
Export TMPDIR
#以上文件編輯了user.sh和.bash_profile
內(nèi)核參數(shù)
vi /etc/security/limits.conf
*soft nproc 2047
*hard nproc 16384
*soft nofile 1024
*hard nofile 65536
編輯etc/sysctl.conf
vi /etc/hosts.equiv
/etc/host
vi /etc/sysctl.conf
在/etc/pam.d/login文件中添加一行:
Session required/lib/security/pam_limits.so
#注意如果64位系統(tǒng),則應為:
Session required/lib64/security/pam_limits.so
#否則,會出現(xiàn)系統(tǒng)無法在主控制登錄的問題。
準備裸設備
#至少需要6個裸設備,spfile 5M;passwordfile 5M;OCR 100M 2個;votedisk 20M 3個;ASM磁盤群組2個。
/user/bin/raw–qa
vi/etc/sysconfig/rawdevice
chown root:dba/dev/raw/{OCR}
chmod 640 /dev/raw/{OCR}
#其余裸設備
Chown oracle:oinstall /dev/raw/{}
Chown 660 /dev/raw/{}
/sbin/service rawdevice restart
#增加一個啟動腳本,更愛裸設備的權限。
#創(chuàng)建裸設備的映射文件,如果是利用ASM管理存儲,可能不用映射文件。
Mkdir–p $ORACLE_BASE/oradata/dbname
Chown oracle{}
Chmod–R 775
cd{}
vi dbname_raw.conf
安裝Cluster Ready Service
#安裝過程中會要求./orainstRoot.sh
#利用以下命令確認是否所有借點都安裝上了Cluster Ready Service
#如果提示沒VIP,則可以運行vipca
Olsnodes -n
安裝數(shù)據(jù)庫
#安裝完后備份root.sh
#安裝補丁
cpio備份與恢復
cpio–o–file={}
cpio–divu–I{}
復制系統(tǒng)后,需要修改以下文件:
/etc/oratab
/etc/sysconfig/network-script/eth*
Oracle用戶初始化腳本.bash_profile或.cshrc
在安裝過程中遇到了一個錯誤,ERROR:ORA-12545:因目標主機或對象不存在,連接失敗。通過網(wǎng)上查閱發(fā)現(xiàn),這是安裝ora? cle10g時的通病。不過Oracle沒有認為這個是bug,只是認為是PROBLEM。
對于12545錯誤的處理:
SQL>CONN SYS@TESTRAC1 AS SYSDBA輸入口令:****已連接。
SQL>ALTER SYSTEM SET LOCAL_LISTENSR=‘(ADDRESS=(PROTOCOL=TCP) (HOST=172.25.198.244) (PORT=1521)) SID=testracl;
為RAC ASM數(shù)據(jù)庫增加控制文件
sql>shutdown immediate;
sql>startup nomount;
$rman nocatalog RMAN>connect target RMAN>restore controlfile to +ASM2/oracl/controlfile/newfile.name from +ASM/oracl/control? file/newfile.name scope=spfile;
sql>alter database mount;
sql>alter dababase open;
Subject:How to duplicate a controlfile when ASM is involved
Doc ID:Note:345180.1 Type:HOWTO
……
On the database instance:
1)Identify the location of the current controlfile:
SQL>select name from v$controfile;
……
/oradata2/102b/oradata/P10R2/control01.ctl
2)Shutdown the database and start the instance:
SQL>shutdown normal
SQL>startup nomount