詢問 Oracle 9i 如何安裝成功? - 第2頁 - PCZONE 討論區

返回   PCZONE 討論區 > ▲ -- 電 腦 軟 體 討 論 區 > -- FreeBSD & Linux 討 論 版


PCZONE 討論區



通知

-- FreeBSD & Linux 討 論 版 因為本站採用 FreeBSD 作業系統,所以自己本身也多學了一些技巧,希望各位在這裡互相討論 Unix 作業系統及程式等相關問題。

花非花
回覆: 詢問 Oracle 9i 如何安裝成功?
今天整理了一下上週在自己的 Fedora core 3 上安裝 Oracle 10g 的步驟
提供給有需要的朋友參考
這些步驟其實就是根據 Oracle 10g 安裝手冊中整理出來的

Fedora Core 3 上安裝 Oracle 10g 的步驟
--------------------------------------------------------------------------
首先當然先從官方將Oracle 下載下來,然後用 FTP 傳到你的 FC3 主機上面
接下來解開抓下來的 Oracle ( 以下的 " 不需要打喔 )
1. Unzip the file: gunzip "Oracle 壓縮檔"
2. Extract the file: cpio -idmv < "解開後的ORACLE檔案"

然後要安裝的套件 (官方以 Red Hat Enterprise 4.0 為例)
gcc-3.4.4-2
gcc-c++-3.4.4-2
libgcc-3.4.4-2
libstdc++-devel-3.4.4-2
compat-libgcc-295-2.95.3-81
compat-libstdc++-33-3.2.3-47.3
glibc-2.3.4-2.13
libaio-0.3.103-3
libaio-devel-0.3.103-3
libstdc++-devel 3.4.4-2

當然也要先安裝並設定好 JAVA 環境,可以用 yum 去安裝
偷懶的方法可以用
# yum install java*

設定你的 Oracle_Hostname
# ORACLE_HOSTNAME=host.plant-seeds.idv.tw ==> 請替換為你的主機明
# export ORACLE_HOSTNAME

加入必要的 group
# /usr/sbin/groupadd oinstall
# /usr/sbin/groupadd dba
# /usr/sbin/groupadd oper

加入必要的 user racle , 及設定 oracle user 的密碼
# /usr/sbin/useradd -g oinstall -G dba,oper oracle
# passwd oracle
# /usr/sbin/usermod -g oinstall -G dba,oper oracle

# id nobody
若不存在,就用下面指令創造 nobody 這位 user
# /usr/sbin/useradd nobody


Configuring Kernel Parameters

請參考 Oracle 安裝手冊中所列之參數來修正
# vi /etc/sysctl.conf

kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 1048576
net.core.rmem_max = 1048576
net.core.wmem_default = 262144
net.core.wmem_max = 262144

Setting Shell Limits for the oracle User

# vi /etc/security/limits.conf

oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536

# vi /etc/pam.d/login

session required /lib/security/pam_limits.so
session required pam_limits.so

註:這邊這兩行我試的結果是... 會讓你以後開機後不管用任何帳號登入不了系統
所以後來我安裝完 Oracle 後,是用 single mode 進去把這兩行移掉


依據使用的 shell 來修改 start-up file

若您是用 Bourne, Bash 或 Korn shell, 請在 /etc/profile 最後面加入下面數行 (若是 SUSE 請修改 /etc/profile.local):

if [ $USER = "oracle" ]; then
  if [ $SHELL = "/bin/ksh" ]; then
    ulimit -p 16384
    ulimit -n 65536
  else
    ulimit -u 16384 -n 65536
  fi
fi

若是用 C shell (csh 或 tcsh), 請在 /etc/csh.login 中加入 (若是用 SUSE 請加在 /etc/csh.login.local) :

if ( $USER == "oracle" ) then
   limit maxproc 16384
   limit descriptors 65536
endif


Creating an Oracle Base Directory

# mkdir -p /oracle
# chown -R oracleinstall /oracle
# chmod -R 775 /oracle

Creating Directories for Oracle Database or Recovery Files

Database file directory:

# mkdir /oracle/oradata
# chown oracleinstall /oracle/oradata
# chmod 775 /oracle/oradata

Recovery file directory (flash recovery area):

# mkdir /oracle/flash_recovery_area
# chown oracleinstall /oracle/flash_recovery_area
# chmod 775 /oracle/flash_recovery_area

建資料夾可依你自己的習慣來決定,我是習慣把 Oracle 的資料放在 Raid-1 的 disk array 上面

Configuring the oracle User's Environment

用 X-windows 登入遠端的 Fedora FC3 (root login),登入後,切換為 oracle user
(或你要直接用 oracle 登入也可以啦~~~ 看個人的習慣)

# su - oracle
# echo $SHELL

依據使用的 shell 來修改 start-up file
‧若是用 Bourne shell (sh), Bash shell (bash), or Korn shell (ksh):
 $ vi .bash_profile

‧若是用 C shell (csh or tcsh):
 % vi .login

然後在最後面加入
umask 022

若 ORACLE_SID, ORACLE_HOME, 或 ORACLE_BASE 環境變數已經被設定到該檔,請先移掉‧

然橫重新讓設定檔生效
‧若是用 Bash shell:
 $ . ./.bash_profile

‧若是用 Bourne or Korn shell:
 $ . ./.profile

‧若是用 C shell:
 % source ./.login

接下來設定 ORACLE_BASE 和 ORACLE_SID 環境變數:

‧若是用 Bourne, Bash, or Korn shell:
 $ ORACLE_BASE=/sata2/oracle
 $ ORACLE_SID=AP1
 $ export ORACLE_BASE ORACLE_SID

‧若是用 C shell:
 % setenv ORACLE_BASE /oracle
 % setenv ORACLE_SID AP1

註:ORACLE SID 看你自己的需要決定

輸入下面指令,以確認 ORACLE_HOME 和 TNS_ADMIN 尚未設定
‧若是用 Bourne, Bash, or Korn shell:
 $ unset ORACLE_HOME
 $ unset TNS_ADMIN

‧若是用 C shell:
 % unsetenv ORACLE_HOME
 % unsetenv TNS_ADMIN

最後再 check 一次
$ umask
$ env | more

註:執行 umask 命令後應該會顯示 22, 022, 或 0022 (若你先前設定正確的話)

然後,就在你的 Xwindows 中開始安裝 Oracle 10g 吧
$ ./runInstaller

安裝過程後面,還會叫你 run 兩個 scripts,照它說的執行完就好了
大概安裝步驟差不多是這樣
ps. 補上那兩個 scripts,分別是要用 root 身份執行
  ‧# /oracle/oraInventory/orainstRoot.sh   Changing permissions of /oracle/oraInventory to 770.
   Changing groupname of /oracle/oraInventory to oinstall.
   The execution of the script is complete
  ‧# /oracle/product/10.2.0/db_1/root.sh   Running Oracle10 root.sh script...
   The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME= /oracle/product/10.2.0/db_1
   Enter the full pathname of the local bin directory: [/usr/local/bin]:
    Copying dbhome to /usr/local/bin ...
    Copying oraenv to /usr/local/bin ...
    Copying coraenv to /usr/local/bin ...

   Creating /etc/oratab file...
   Entries will be added to the /etc/oratab file as needed by
   Database Configuration Assistant when a database is created
   Finished running generic part of root.sh script.
   Now product-specific root actions will be performed.
  執行完這兩個 scripts 後,繼續回到安裝畫面按【OK】,接下來就會顯示安裝完成
  並且會給你兩個網址,可用網頁來登入
  The following J2EE Applications have been deployed and are accessible at the URLs listed below.
  iSQL*Plus URL:
  http://yourhostname:5560/isqlplus
  iSQL*Plus DBA URL:
  http://yourhostname:5560/isqlplus/dba

我這樣裝起來跑是還 ok
接下來您可以視你自己的需要去調整 SGA 等等的參數
或是安裝 client 端的管理工具~~

以上,若有錯誤請大家不吝指教
好久沒打這樣多資料了說,我看有五年以上了吧~~


此篇文章於 2007-06-29 02:10 PM 被 algolee 編輯。.
回覆
會員
回覆: 詢問 Oracle 9i 如何安裝成功?
給您鼓掌拍手放煙火...

可否告知所需硬體規格...
回覆
花非花
回覆: 詢問 Oracle 9i 如何安裝成功?
我用一般 PC 安裝而以
AMD 3.2 GB CPU , 2GB RAM
在 Fedora 5 上安裝有一點小小的不同
其他 OS 還沒試,本來想在台 CentOS 5 上安裝
但那台機器才只有 256 MB RAM , 安裝時Oracle 就直接給你警告
我就放棄在那台機器上試了~~
當然若是要裝在正式環境使用,建議配備要好一點 (CPU 來個四顆八顆,RAM 也來個 8G , 16 GB 玩玩)
資料部份也記得要用 raid,同時要記得備份機制

這邊有【在 Red Hat Linux 9 上安装 Oracle9i Database】: http://www.oracle.com/technology/glo...onredhat9.html

另外一篇:Installing Oracle 9i on Red Hat Enterprise Linux Advanced Server 4, 3, 2.1, and on Red Hat 9, 8.0, 7.3, 7.2, 7.1 (x86)
此篇應可符合提出問題的網友參考

ps. 安裝時,32 bit 和 64 bit 版本不要搞混了

此篇文章於 2007-06-29 12:22 PM 被 algolee 編輯。.
回覆
あなたの家に行く

如果 CPU 快取有 3.2 GB,買到就賺到了。
回覆
花非花
回覆: 詢問 Oracle 9i 如何安裝成功?
引用:
作者: 琥珀 觀看文章
如果 CPU 快取有 3.2 GB,買到就賺到了。
哈哈,筆誤筆誤啦

回覆


類似的主題
主題 主題作者 討論版 回覆 最後發表
【問題】exchange2003 無法寄到@oracle.com willy728 -- 網 路 技 術 版 25 2006-12-05 11:56 AM
【求助】XML on Oracle jimmytseng -- FreeBSD & Linux 討 論 版 1 2002-11-18 06:49 PM
[問題] Oracle? 甲骨文? EIGHTS -- 閒 話 家 常 灌 水 版 15 2002-06-27 10:34 PM
【求助】oracle 9i help mok2000 -- 其 他 軟 體 討 論 版 0 2002-06-20 03:49 PM
【求助】oracle 9i help mok2000 -- 網 路 技 術 版 6 2002-06-09 06:28 AM






 XML   RSS 2.0   RSS 
本站使用 vBulletin 合法版權程式
站務信箱 : [email protected]

本論壇所有文章僅代表留言者個人意見,並不代表本站之立場,討論區以「即時留言」方式運作,故無法完全監察所有即時留言,若您發現文章可能有異議,請 email :[email protected] 處理。