Linux下安裝Oracle10g(二).安裝配置
?
??? 今天繼續(xù)來進行Oracle的安裝學習。開始進入正式的安裝部分,以及安裝完成后的配置,好在最終安裝成功了,要感謝junsansi提供的詳細教程,以及萬能的google資料。
?
一、掛載光盤拷貝Oracle
?
??? 將Oracle10g_linux裝入虛擬光驅,并將光盤掛載
??? # mount /mnt/cdrom
?
??? 注:關于光盤掛載的操作,見《Linux的mount命令簡介》
?
??? 然后將Oracle拷貝到硬盤中:
??? # cp -r -b /mnt/cdrom/* /tmp/ora10
?
??? 注:Oracle安裝必須要將拷到硬盤上,否則將提示:
???
Error: OUI cannot be launched because the current working directory is set on the CD-ROM mount point. Launching OUI from this directory will make it difficult to unmount the disk later in the installation. Please change the working directory and relaunch OUI.
?
?
二、安裝Oracle
?
??? 用oracle用戶登錄一個視窗界面(必須),然后執(zhí)行安裝
??? $ /tmp/ora10g/runInstaller -ignoreSysPrereqs
?
???
注:-ignoreSysPrereqs 是為了跳過安裝時的系統(tǒng)版本檢測。因為Oracle安裝時會進行操作系統(tǒng)檢測,不在其指定操作系統(tǒng)列表之中則無法安裝。
也可以修改linux的系統(tǒng)參數(shù)/etc/redhat-release來做,但是比較麻煩。
?
??? 之后進入安裝界面,跟Windows下沒有什么區(qū)別。
?
??? 在開始使用中文界面
安裝時發(fā)現(xiàn)出現(xiàn)亂碼,搞了半天沒解決,最后直接把操作系統(tǒng)改成英文了,英文界面下安裝還比較方便一些。
?
?
??? 安裝時會兩次彈出提示框,需要手動執(zhí)行某個指定的shell
??? 需要切換到root用戶下,執(zhí)行文件中的某個shell
?
??? $ su root
??? # ./xxxx.sh
?
??? 關于shell的使用方法,可以參見“Linux shell程序設計”
?
???
注:此次安裝只配置了256M內存,但依然安裝成功,可見并不是非要1G內存不可。不過安裝之后機子超慢,但至少這不是技術限制。
?
?
三、配置Oracle
?
?
1、修改listener.ora
LISTENER =
??? (DESCRIPTION_LIST =
??????? (DESCRIPTION =
??????????? (ADDRESS_LIST =
??????????????? (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.3)(PORT = 1521))
??????????? )
??????????? (ADDRESS_LIST =
??????????????? (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
??????????? )
??????? )
??? )
SID_LIST_LISTENER =
??? (SID_LIST =
??????? (SID_DESC =
??????????? (SID_NAME = PlsExtProc)
??????????? (ORACLE_HOME = /opt/ora10g/product/10.2.0/db_1)
??????????? (PROGRAM = extproc)
??????? )
??????? (SID_DESC =
??????????? (GLOBAL_DBNAME = dodo)
??????????? (ORACLE_HOME = /opt/ora10g/product/10.2.0/db_1)
??????????? (SID_NAME = dodo)
??????? )
??? )
2、修改tnsnames.ora
DODO =
??? (DESCRIPTION =
??????? (ADDRESS_LIST =
??????????? (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.3)(PORT = 1521))
??????? )
??????? (CONNECT_DATA =
??????????? (SERVER = DEDICATED)
??????????? (SERVICE_NAME = dodo)
??????? )
??? )
3、增加dbstart 到rc.local
$ vi /opt/ora10g/product/10.2.0/db_1/bin/dbstart_self
ORACLE_SID=dodo
sqlplus /nolog <<!
connect / as sysdba
startup
!
lsnrctl start
$ chmod +577 dbstart_self
$ su root
# vi /etc/rc.local
su - oracle 'dbstart_self' >>/var/log/dbstart_self.log
?
?
??? 以上配置完成后重啟系統(tǒng)后即可遠程連接。
?
?
四、查看進程
?
??? Linux下的進程操作方法見《Linux 進程管理》
?
# ps -aef | grep oracle
oracle??? 1982???? 1? 0 09:09 ???????? 00:00:01 ora_pmon_dodo
oracle??? 1984???? 1? 0 09:09 ???????? 00:00:00 ora_mman_dodo
oracle??? 1986???? 1? 0 09:09 ???????? 00:00:01 ora_dbw0_dodo
oracle??? 1988???? 1? 0 09:09 ???????? 00:00:00 ora_lgwr_dodo
oracle??? 1990???? 1? 0 09:09 ???????? 00:00:02 ora_ckpt_dodo
oracle??? 1992???? 1? 0 09:09 ???????? 00:00:01 ora_smon_dodo
oracle??? 1994???? 1? 0 09:09 ???????? 00:00:00 ora_reco_dodo
oracle??? 1996???? 1? 0 09:10 ???????? 00:00:01 ora_cjq0_dodo
oracle??? 1998???? 1? 0 09:10 ???????? 00:00:00 ora_d000_dodo
oracle??? 2000???? 1? 0 09:10 ???????? 00:00:00 ora_s000_dodo
oracle??? 2010???? 1? 0 09:10 ???????? 00:00:00 ora_qmnc_dodo
oracle??? 2012???? 1? 0 09:10 ???????? 00:00:03 ora_mmon_dodo
oracle??? 2014???? 1? 0 09:10 ???????? 00:00:01 ora_mmnl_dodo
oracle??? 2017???? 1? 0 09:10 ???????? 00:00:00 /opt/ora10g/product/10.2.0/db_1/bin/tnslsnr LISTENER -inherit
oracle??? 2599? 2343? 0 09:10 ???????? 00:00:00 /opt/ora10g/product/10.2.0/db_1/bin/ocssd.bin
oracle??? 2799? 2798? 0 09:13 pts/1??? 00:00:00 -bash
oracle??? 2817? 2799? 0 09:13 pts/1??? 00:00:00 sqlplus??????
oracle??? 2821???? 1? 0 09:14 ???????? 00:00:00 oracledodo (LOCAL=NO)
oracle??? 2825???? 1? 0 09:16 ???????? 00:00:00 oracledodo (LOCAL=NO)
?
??? 需要注意的是linux下的進程/線程的啟動機制與windows是有區(qū)別的。
?
?
?