国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁(yè) > 數(shù)據(jù)庫(kù) > Oracle > 正文

為L(zhǎng)inux配備Oracle 8

2024-08-29 13:29:20
字體:
來(lái)源:轉(zhuǎn)載
供稿:網(wǎng)友

為linux配備oracle 8

  在linux下使用oracle 8以前,應(yīng)當(dāng)安裝oracle 8,但oracle公司提供的安裝文檔較為簡(jiǎn)單。筆者借鑒其在unix操作系統(tǒng)下的安裝方法,得出了在linux上安裝oracle 8的方法,此方法并不一定是最好的,使各位讀者用上oracle 8才是本文的目的。

前期準(zhǔn)備

  假定安裝環(huán)境是red hat linux,請(qǐng)?jiān)诎惭b前確認(rèn)linux的核心版本為2.0.36及以上。

  1.以root用戶(hù)登錄進(jìn)入系統(tǒng),創(chuàng)建用戶(hù)oracle和組dba,這是oracle默認(rèn)的安裝用戶(hù)。創(chuàng)建安裝用戶(hù)后,用tar -xvzf 將壓縮文件解壓到一個(gè)指定的目錄,本文假定為/oracle,因?yàn)閠ar進(jìn)行數(shù)據(jù)歸檔與用戶(hù)本機(jī)的用戶(hù)id、組id不同,所以要運(yùn)行chown -r oracle:dba 以更改文件屬性。

  2.由于oracle本身對(duì)共享段的要求,用戶(hù)必須重新手工生成核心,以便共享段的設(shè)定滿(mǎn)足安裝要求。為生成核心,用戶(hù)應(yīng)當(dāng)安裝linux操作系統(tǒng)的源代碼,編輯/usr/src/linux/include/shmparam.h,將#define shmmax 0x002000000一行的0x002000000(32mb)改為256mb以上,然后在/usr/src/linux下運(yùn)行make dep、make clean、make bzimage生成核心,使用linuxconf命令將新核心設(shè)為啟動(dòng)核心。這一步一定要做,如果生成的新核心有錯(cuò),可以用原來(lái)的核心啟動(dòng)計(jì)算機(jī)。可用ipc -ml查看共享段的設(shè)置是否滿(mǎn)足要求。當(dāng)共享段大于2gb時(shí),查看到的值是負(fù)數(shù)。

  3.安裝相應(yīng)的egc包。假定安裝光盤(pán)mount在/mnt/cdrom上,用命令modprobe isofs使操作系統(tǒng)能處理光盤(pán)的文件系統(tǒng),然后運(yùn)行mount -t iso9660 /dev/cdrom /mnt/cdrom,如在安裝后修改了/etc/fstab,可不進(jìn)行這一步操作。進(jìn)入相應(yīng)的rpms目錄,安裝以egc開(kāi)始的包,采用的安裝命令為rpm -ivh <包名>。

設(shè)定安裝的環(huán)境變量

  安裝前,應(yīng)該設(shè)定相應(yīng)的環(huán)境變量。修改用戶(hù)oracle的.bash—profile文件,設(shè)定相應(yīng)的環(huán)境變量。由于安裝系統(tǒng)時(shí)需要root用戶(hù),也要有這些環(huán)境變量,故將其放在/etc/profile內(nèi),加*號(hào)為oracle專(zhuān)有的環(huán)境變量,示例如下:

# /etc/profile # system wide environment and startup programs # functions and aliases go in /etc/bashrc java—home=/usr/local/jdk1.1.3 sybase=/opt/sybase-11.9.2 dsquery=sybaserdbms *path=$path:$java—home/bin:/usr/x11r6/bin:/home/oracle/product/8.0.5/bin ps1=″[email protected]:w$″ ulimit -c 1000000 if [ ′id -gn′ = ′id -un′ -a ′id -u′ -gt 14 ]; then umask 002 else umask 022 fi user=′id -un′ logname=$user mail=″/var/spool/mail/$user″ classpath=/usr/local/jdk1.1.3/lib:$home/bin hostname=′/bin/hostname′ histsize=1000 histfilesize=1000 export java—home classpath sybase dsquery export path ps1 hostname histsize histfilesize user logname mail *oracle—home=/home/oracle/product/8.0.5 *oracle—base=/home/oracle *oracle—owner=oracle *oracle—sid=oracle8 *oracle—term=386 *ld—library—path=/home/oracle/product/8.0.5/lib *tmpdir=/var/tmp *export oracle—home oracle—base oracle—owner oracle—sid oracle—term export ld—library—path tmpdir for i in /etc/profile.d/.sh ; do if [ -x $i ]; then . $i fi done unset i

安裝并啟動(dòng)數(shù)據(jù)庫(kù)

  1.以用戶(hù)root登錄系統(tǒng),然后到相應(yīng)目錄運(yùn)行/oracle/orainst/oratab.sh可生成/etc/oratab文件。用su - oracle切換到用戶(hù)oracle,運(yùn)行/oracle/orainst/orainst就可啟動(dòng)安裝命令,安裝時(shí)注意在這一步不要安裝oracle文檔、jdk和智能代理,并且不要?jiǎng)?chuàng)建數(shù)據(jù)庫(kù)對(duì)象。重新啟動(dòng)/oracle/orainst/orainst安裝的rdbms部份,一般情況下除了輸入幾個(gè)用戶(hù)定制的口令其余按默認(rèn)值就可以了。oracle安裝程序開(kāi)始拷貝文件,拷貝文件過(guò)程中,當(dāng)安裝到數(shù)據(jù)庫(kù)管理系統(tǒng)(rdbms)時(shí),用戶(hù)可從另一終端登錄,用ps -ef | grep oracle見(jiàn)到一些oracle進(jìn)程已啟動(dòng)。

  2.數(shù)據(jù)庫(kù)服務(wù)器安裝完成后,就可以手工啟動(dòng)了。以用戶(hù)oracle登錄,進(jìn)入$oracle—home/bin,運(yùn)行dbstart就可以啟動(dòng)數(shù)據(jù)庫(kù)服務(wù)器。運(yùn)行dbshut就可停止數(shù)據(jù)庫(kù)服務(wù)器。

  如果用戶(hù)不太熟悉oracle的網(wǎng)絡(luò)部份,可將$oracle—home/network/admin/ora拷貝到/etc目錄,在$oracle—home/bin下運(yùn)行l(wèi)snrctl start就可以啟動(dòng)網(wǎng)絡(luò)監(jiān)視進(jìn)程。

  3.為了每一次啟動(dòng)系統(tǒng)時(shí)自動(dòng)啟動(dòng)oracle或管理員手工指定是否每一次啟動(dòng)時(shí)自動(dòng)啟動(dòng)oracle,可采用如下方法。以root登錄,進(jìn)入/etc/rc.d/init.d,手工生成文件oracle,至于文件的書(shū)寫(xiě)格式可參見(jiàn)其余相應(yīng)文件,示例如下:

#!/bin/sh # oracle   this shell script takes care of starting and stopping #       oracle. # chkconfig: 2345 80 30 # description: oracle is a rdbms server. # processname: oracle # source function library. . /etc/rc.d/init.d/functions # source networking configuration. . /etc/sysconfig/network # check that networking is up. [${networking}= ″no″ ] && exit 0 # see how we were called. case ″$1″ in start) # start daemons. echo -n ″starting oracle: ″ su - oracle /home/oracle/product/8.0.5/bin/dbstart > /dev/null 2>&1 sleep 60 su - oracle/home/oracle/product/8.0.5/bin/lsnrctl start > /dev/null 2>&1 echo touch /var/lock/subsys/oracle ;; stop) # stop daemons. echo -n ″shutting down oracle: ″ su - oracle/home/oracle/product/8.0.5/bin/lsnrctl stop > /dev/null 2>&1 su - oracle /home/oracle/product/8.0.5/bin/dbshut > /dev/null 2>&1 echo rm -f /var/lock/subsys/oracle ;; restart) $0 stop $0 start ;; status) status oracle ;; ) echo ″usage: oracle {start|stop|restart|status}″ exit 1 esac exit 0

客戶(hù)端配置

  為了能使用windows下的一些開(kāi)發(fā)工具,可以按如下方法進(jìn)行:

  1.在windows下安裝oracle客戶(hù)端軟件(可以采用oracle 7.xx的windows客戶(hù)端軟件),安裝完成后,將linux下的/etc/tnsnames.ora拷到windows下的$oracle etworkadmin目錄下,在開(kāi)始選單中運(yùn)行net easy configure并指明odbc連接的字串名和運(yùn)行sqlplus需要的主機(jī)字串(host string),就可以從客戶(hù)端連上服務(wù)器,通過(guò)odbc進(jìn)行數(shù)據(jù)庫(kù)的開(kāi)發(fā)。

  2.如果用戶(hù)使用delphi為開(kāi)發(fā)工具,可在bde設(shè)定中指明有遠(yuǎn)端oracle服務(wù)器,設(shè)定時(shí)僅指明數(shù)據(jù)庫(kù)系統(tǒng)的網(wǎng)絡(luò)協(xié)議為tns(transparent network substrate,請(qǐng)不要使用tcp),然后進(jìn)入數(shù)據(jù)庫(kù)桌面,就可以訪問(wèn)遠(yuǎn)端oracle數(shù)據(jù)庫(kù)上的數(shù)據(jù)了。
發(fā)表評(píng)論 共有條評(píng)論
用戶(hù)名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 榕江县| 台安县| 寿阳县| 磐石市| 广灵县| SHOW| 贵港市| 宜宾市| 二连浩特市| 东安县| 彰化县| 那坡县| 灵台县| 辽源市| 宁蒗| 寻甸| 沂水县| 洪洞县| 虎林市| 大同县| 临高县| 隆尧县| 惠来县| 巴彦淖尔市| 姚安县| 沁水县| 邯郸市| 会同县| 大新县| 阳东县| 辉县市| 洪雅县| 弥勒县| 磐安县| 南通市| 昂仁县| 虎林市| 台前县| 江津市| 崇礼县| 巴楚县|