資安論壇

行政院 國家資通安全會報 - 技術服務中心 - 資安論壇 http://forum.icst.org.tw/
現在的時間是 週六 7月 31, 2010 10:59 am

所有顯示的時間為 UTC + 8 小時




發表新文章 回覆主題  [ 5 篇文章 ] 
發表人 內容
 文章主題 : [研究] Oracle 11g R1 Enterprise安裝研究(CentOS 5.2)
文章發表於 : 週三 2月 25, 2009 12:10 pm 
離線

註冊時間: 週三 9月 25, 2002 10:57 am
文章: 7359
來自: R.O.C
Oracle 11g R1 Enterprise安裝研究(CentOS 5.2)

Oracle Database 11g Release 1 (11.1.0.6.0) Standard Edition, Standard Edition One, and Enterprise Edition
Linux x86 (1.7 GB) | See All (Including Client, Examples, Gateways, Clusterware)
http://www.oracle.com/technology/softwa ... index.html

Oracle Express, Standard, Enterprise 功能比較表
http://www.oracle.com/database/product_editions.html

作業系統:CentOS-5.2-i386-bin-DVD.iso,安裝於虛擬主機上
虛擬主機軟體:VMware Workstation 6.5.1 build 126130
虛擬主機類型:Red Hat Enterprise Linux 5

下載檔案 (1.8 GB, 超大的)
linux_11gR1_database_1013.zip

Oracle Database Installation Guide 11g Release 1 (11.1) for Linux
http://download.oracle.com/docs/cd/B283 ... nstall.htm

Installing Oracle Database 11g Release 1 on Enterprise Linux 5 (32- and 64-bit)
http://www.oracle.com/technology/pub/ar ... stall.html

CentOS 5下安裝Oracle 11g (安裝過程語系設定為簡體中文,不可照抄;某些部分也疑似有問題)
http://dowson33.blog.163.com/blog/stati ... 865139614/

文件庫
http://www.oracle.com/pls/db111/homepage

需求重點 (要求很多,請去安裝指引看)
引言回覆:
Memory 1 GB RAM (recommended), 256 MB RAM (min)
Display 65536 colors, set to at least 1024 X 768 resolution

On Linux x86 and Linux x86-64:
Asianux 2.0
Asianux 3.0
Oracle Enterprise Linux 4.0
Oracle Enterprise Linux 5.0
Red Hat Enterprise Linux 4.0
Red Hat Enterprise Linux 5.0
SUSE Linux Enterprise Server 10.0


Oracle商業版本安裝有很多前置作業,請忍耐完成。

請將X-Window設定為英文介面,避免putty或終端機在某些情況下訊息變成亂碼。(安裝後可以切到繁體介面使用)

請關閉SELINUX的工作模式
代碼:
[root@localhost ~]# vi  /etc/selinux/config

把SELINUX設定為disabled
代碼:
SELINUX=disabled

然後重新啟動系統 (修改SELinux必須重新啟動系統才能生效)
代碼:
[root@localhost ~]# reboot


先建立 /u01目錄
代碼:
[root@localhost ~]# mkdir  /u01


下載linux_11gR1_database.zip放在此目錄中,解壓縮,會產生database目錄:
代碼:
[root@localhost ~]# unzip  linux_11gR1_database.zip
[root@localhost ~]# ls
database

Oracle建議用固定IP, 檢查 /etc/sysconfig/network-scripts/ifcfg-eth0
代碼:
[root@localhost ~]# cat  /etc/sysconfig/network-scripts/ ifcfg-eth0
# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]
DEVICE=eth0
BOOTPROTO=dhcp
HWADDR=00:0C:29:C1:23:E1
ONBOOT=yes
[root@localhost network-scripts]#

改成固定IP,內容類似如下 (請依照自己環境修改)
代碼:
# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]
DEVICE=eth0
BOOTPROTO=none
HWADDR=00:0C:29:C1:23:E1
ONBOOT=yes
NETMASK=255.255.255.0
IPADDR=192.168.128.128
GATEWAY=192.168.128.2
TYPE=Ethernet
USERCTL=no
IPV6INIT=no
PEERDNS=yes


修改/etc/resolv.conf,設定DNS Server(請依照自己環境修改)
代碼:
[root@localhost ~]# cat   /etc/resolv.conf
nameserver 168.95.1.1


修改主機名稱/etc/hosts,增加一筆
代碼:
192.168.128.128    oracle


重新啟動網路,讓設定生效
代碼:
[root@localhost ~]# service  network  restart
Shutting down interface eth0:                              [  OK  ]
Shutting down loopback interface:                          [  OK  ]
Bringing up loopback interface:                            [  OK  ]
Bringing up interface eth0:                                [  OK  ]


安裝必須套件 (這全部是同一行)
代碼:
[root@oracle ~]# yum  -y  install  binutils  compat-libstdc++-33  elfutils-libelf  elfutils-libelf-devel  gcc  gcc-c++  glibc  glibc-common  glibc-devel  glibc-headers  libaio  libaio-devel  libgcc  libstdc++  libstdc++-devel  make  sysstat  unixODBC  unixODBC-devel


如果沒有網路,必須用光碟安裝,請一一用rpm找出在哪個套件檔案中
代碼:
[root@oracle u01]# rpm  -qa  |  grep  <package_name>


要找出來安裝的套件名稱包含
代碼:
binutils-2.17.50.0.6-2.el5
compat-libstdc++-33-3.2.3-61
elfutils-libelf-0.125-3.el5
elfutils-libelf-devel-0.125
gcc-4.1.1-52
gcc-c++-4.1.1-52
glibc-2.5-12
glibc-common-2.5-12
glibc-devel-2.5-12
glibc-headers-2.5-12
libaio-0.3.106
libaio-devel-0.3.106
libgcc-4.1.1-52
libstdc++-4.1.1
libstdc++-devel-4.1.1-52.e15
make-3.81-1.1
sysstat-7.0.0
unixODBC-2.2.11
unixODBC-devel-2.2.11


然後執行下面命令安裝
代碼:
[root@oracle u01]# rpm  -ivh  <package_name>.rpm


建立Oracle所需要的群組名稱(oinstall、dba),建立用戶名稱(oracle)並加入oinstall和dba群組中,設定用戶oracle密碼:

代碼:
[root@oracle ~]# /usr/sbin/groupadd  oinstall

[root@oracle ~]# /usr/sbin/groupadd  dba

[root@oracle ~]# /usr/sbin/useradd  -g  oinstall  -G  dba  oracle

[root@oracle ~]# passwd  oracle


建立安裝目錄和設定權限:
代碼:
[root@oracle ~]# mkdir  -p  /u01/app/oracle/product/

[root@oracle ~]# chown  -R  oracle:oinstall  /u01           

[root@oracle ~]# chmod  -R  775  /u01


修改核心參數:
代碼:
[root@oracle ~]# vi  /etc/sysctl.conf

在最末尾的地方加上:
代碼:
kernel.shmall = 2097152                       
kernel.shmmax = 2147483648                   
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 262144

讓設定生效
代碼:
[root@oracle ~]# /sbin/sysctl  –p


為oracle用戶設置Shell限制
代碼:
[root@oracle ~]# vi  /etc/security/limits.conf

加上
代碼:
oracle  soft  nproc  2047
oracle  hard  nproc  16384
oracle  soft  nofile  1024
oracle  hard  nofile  65536


修改/etc/pam.d/login
代碼:
[root@oracle ~]# vi  /etc/pam.d/login

增加一行
代碼:
session required pam_limits.so


如果使用bash Shell,修改/etc/profile
代碼:
[root@oracle ~]# vi  /etc/profile

最後增加
代碼:
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,修改/etc/csh.login
代碼:
[root@oracle ~]# vi /etc/csh.login

最後增加
代碼:
if ( $USER == "oracle" ) then
        limit maxproc 16384
        limit descriptors 65536
endif


修改作業系統名稱 (實際測試沒有改也可以安裝)
代碼:
[root@oracle ~]# vi  /etc/redhat-release

將CentOS release 5 (Final) 修改成
代碼:
Red Hat Enterprise Linux AS release 5 (Taroon)

(因為oracle公司沒推出CentOS版本的oracle)

切換到oracle用戶
代碼:
[root@oracle ~]# su  -  oracle

修改.bash_profile,此文件為oracle用戶的環境變數
代碼:
[oracle@oracle ~]$ vi  .bash_profile


最後增加
代碼:
# User specific environment and startup programs

ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.1.0/db_1; export ORACLE_HOME
ORACLE_SID=ORCL; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
TNS_ADMIN=$ORACLE_HOME/network/admin; export TNS_ADMIN
PATH=$ORACLE_HOME/bin:$PATH; export PATH

#NLS_LANG="TRADITIONAL CHINESE_TAIWAN".ZHT16BIG5;export NLS_LANG
export NLS_LANG

#LC_CTYPE=zh_TW.Big5; export LC_CTYPE
export LC_CTYPE

#LC_ALL=zh_TW.UTF8; export LC_ALL     
export LC_ALL     

#LANG=zh_TW.Big5; export LANG
export LANG

LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/jdk/jre:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
umask 022

讓設定生效
代碼:
[oracle@oracle ~]$ source .bash_profile

回到root模式
代碼:
[oracle@oracle ~]$ exit                                       


在X-Windows下(不能在MS-Windows的putty下),以root權限下執行下面命令,讓oracle用戶執行時的圖形畫面可以傳送給root權限的X-Window上看到
代碼:
[root@oracle ~]# xhost  +
Access control disabled, clients can connect from any host


再次以oracle用戶登錄,切換到/u01/database目錄
代碼:
[root@oracle ~]# su - oracle
[oracle@oracle ~]$ cd  /u01/database

執行./runInstaller安裝,開始進入圖形介面安裝
代碼:
[oracle@oracle database]$ ./runInstaller


Select Installation Method畫面:輸入Database Password和Confirm Password
圖檔

Specify Inventory directory and credentials畫面:按下Next繼續
圖檔

Product-Specific Prerequisite Checks畫面:環境驗證,有問題則會顯示在下方,如果沒問題就按下Next
圖檔

Oracle Configuration Manager Registration畫面:Oracle Enterprise雖然可以從官方網站下載安裝,但是下載Patch是要花錢的,此處只是安裝研究,按下Next過去就好
圖檔

Summary畫面,按下Install開始安裝了
圖檔

Install畫面
圖檔

Database Configuration Assistant安裝畫面
圖檔

Database Configuration Assistant部分安裝完成
圖檔

Execute Configurations Scripts畫面:要在終端機下用root執行兩個命令,然後才能按下OK繼續
圖檔

請到終端機以root命令執行
代碼:
[root@oracle ~]# /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory to 770.
Changing groupname /u01/app/oraInventory to oinstall.
The execution of the script is complete

[root@oracle ~]# /u01/app/oracle/product/11.1.0/db_1/root.sh
Running Oracle 11g root.sh script...

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/app/oracle/product/11.1.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.
Finished product-specific root actions.

[root@oracle ~]#


修改/etc/oratab內容
代碼:
[root@oracle ~]# vi  /etc/oratab


代碼:
ORCL:/u01/app/oracle/product/11.1.0/db_1:N

改為
代碼:
ORCL:/u01/app/oracle/product/11.1.0/db_1:Y


End of Isntallation畫面:安裝結束了
圖檔

安裝完以後,某些oracle服務預設是沒有被啟動的,則需要手工進行啟動。請以oracle用戶身份登入,登入之後主要服務的啟動方式如下:

數據庫服務 啟動 (這個執行需要點時間,執行完成會回提示字元)
代碼:
[root@localhost ~]# su - oracle
[oracle@oracle ~]$ dbstart
ORACLE_HOME_LISTNER is not SET, unable to auto-start Oracle Net Listener
Usage: /u01/app/oracle/product/11.1.0/db_1/bin/dbstart ORACLE_HOME
Processing Database instance "orcl": log file /u01/app/oracle/product/11.1.0/db_1/startup.log

數據庫服務關閉
代碼:
[oracle@oracle bin]$ dbshut


監聽器 啟動
代碼:
[oracle@oracle bin]$ lsnrctl  start

LSNRCTL for Linux: Version 11.1.0.6.0 - Production on 20-2-2009 21:07:11

Copyright (c) 1991, 2007, Oracle.  All rights reserved.

TNS-01106: 已啟動名稱為 LISTENER 的監聽器

監聽器 關閉。
代碼:
[oracle@oracle bin]$ lsnrctl  stop


進入em控制台(Web管理介面)
代碼:
[oracle@oracle bin]$  firefox  https://localhost:1158/em  &


選擇Or you can add exception來增加例外網站
圖檔

按下Add Exception按鈕
圖檔

按下Get Certificate嘗試取得憑證
圖檔

按下Confirm Security Exception(確認安全性例外)按鈕
圖檔

輸入安裝過程中設定的密碼(Oracle有幾個預設的帳號,例如SYS、SYSTEM)
圖檔

英文管理畫面
圖檔

如果要看中文化面,可以logout,切換語系再login,再次用瀏覽器連上。
圖檔

這就是繁體中文介面
圖檔

安裝完成!


PS : 小弟第一次嘗試安裝,如有疏漏錯誤或建議,歡迎批評指教。

_________________
天道循環,生死不昧,真空妙有,還於本然!
諦聽我們的靈魂之聲,所有飄零的靈魂,此世虛幻,此生一夢,生者必死!
勢不可去盡,話不可說盡,福不可享盡,規矩不可行盡,凡事太盡,緣分勢必早盡!
免費貼圖空間 http://www.picfury.com/
免費貼圖空間 viewtopic.php?t=8816
免費上傳空間 viewtopic.php?t=6558


回頂端
   
 
 文章主題 : Re: [研究] Oracle 11g R1 Enterprise安裝研究(CentOS 5.2)
文章發表於 : 週四 2月 26, 2009 10:23 am 
離線

註冊時間: 週三 9月 25, 2002 10:57 am
文章: 7359
來自: R.O.C
(Oracle 10g R2 Express做Reboot後是會自動啟動的)

發現Reboot後Oracle沒有自動啟動,先切換到oracle帳號,手動測試幾個需要啟動的程式:

切換到oracle帳號
代碼:
[roor@oracle ~]# su  -  oracle

測試dbstart
代碼:
[oracle@oracle ~]$ dbstart
ORACLE_HOME_LISTNER is not SET, unable to auto-start Oracle Net Listener
Usage: /u01/app/oracle/product/11.1.0/db_1/bin/dbstart ORACLE_HOME
Processing Database instance "orcl": log file /u01/app/oracle/product/11.1.0/db_1/startup.log

測試lsnrctl
代碼:
[oracle@oracle ~]$ lsnrctl  start

LSNRCTL for Linux: Version 11.1.0.6.0 - Production on 26-FEB-2009 10:07:17

Copyright (c) 1991, 2007, Oracle.  All rights reserved.

Starting /u01/app/oracle/product/11.1.0/db_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.1.0.6.0 - Production
System parameter file is /u01/app/oracle/product/11.1.0/db_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/oracle/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oracle)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.1.0.6.0 - Production
Start Date                26-FEB-2009 10:07:20
Uptime                    0 days 0 hr. 0 min. 1 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.1.0/db_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/oracle/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oracle)(PORT=1521)))
The listener supports no services
The command completed successfully
[oracle@oracle ~]$

測試 emctl (Enterprise Manager Control是Oracle的Web管理介面)
代碼:
[oracle@oracle ~]$ emctl  start  dbconsole
OC4J Configuration issue. /u01/app/oracle/product/11.1.0/db_1/oc4j/j2ee/OC4J_DBConsole_oracle_ORCL not found.

發現無法啟動,這似乎ORACLE_SID變數有關大小寫有關(目前似乎等於ORCL,而非orcl),一種做法是
代碼:
[oracle@oracle ~]$ export  ORACLE_SID=orcl
[oracle@oracle ~]$ emctl  start  dbconsole

我採取另一種做法,到root權限的終端機建立一個連結
代碼:
[root@oracle ~]# cd  /u01/app/oracle/product/11.1.0/db_1/oc4j/j2ee
[root@oracle j2ee]# ln  -s  OC4J_DBConsole_oracle_orcl OC4J_DBConsole_oracle_ORCL

回到oracle權限的終端機,再測試一次
代碼:
[oracle@oracle ~]$ emctl  start  dbconsole
EM Configuration issue. /u01/app/oracle/product/11.1.0/db_1/oracle_ORCL not found.

到root權限的終端機,再設定一個連結
代碼:
[root@oracle j2ee]# cd  /u01/app/oracle/product/11.1.0/db_1
[root@oracle db_1]# ln -s oracle_orcl oracle_ORCL

回到oracle權限的終端機,再測試一次 (會花點時間),正常了
代碼:
[oracle@oracle ~]$ emctl  start  dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.1.0.6.0
Copyright (c) 1996, 2007 Oracle Corporation.  All rights reserved.
https://oracle:1158/em/console/aboutApplication
Starting Oracle Enterprise Manager 11g Database Control ........... started.
------------------------------------------------------------------
Logs are generated in directory /u01/app/oracle/product/11.1.0/db_1/oracle_ORCL/sysman/log
[oracle@oracle ~]$

接下來建立一個稱為oracledb的Shell Script,讓開機的時候自動執行它
代碼:
root@lu-desktop:~# vim /u01/app/oracle/product/11.1.0/db_1/bin/oracledb

檔案內容如下
代碼:
#!/bin/bash

export ORACLE_SID=orcl
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
export ORACLE_OWNR=oracle
export PATH=$PATH:$ORACLE_HOME/bin

if [ ! -f $ORACLE_HOME/bin/dbstart -o ! -d $ORACLE_HOME ]
then
echo "Oracle startup: cannot start"
exit 1
fi

case "$1" in
start)
# Oracle listener and instance startup
echo -n "Starting Oracle: "
su $ORACLE_OWNR -c "$ORACLE_HOME/bin/lsnrctl start"
su $ORACLE_OWNR -c "$ORACLE_HOME/bin/dbstart $ORACLE_HOME"
su $ORACLE_OWNR -c "$ORACLE_HOME/bin/emctl start dbconsole"

su oracle -c "/u01/app/oracle/product/11.1.0/db_1/bin/emctl start dbconsole"

touch /var/lock/oracle
echo "OK"
;;
stop)
# Oracle listener and instance shutdown
echo -n "Shutdown Oracle: "
su $ORACLE_OWNR -c "$ORACLE_HOME/bin/lsnrctl stop"
su $ORACLE_OWNR -c "$ORACLE_HOME/bin/dbshut $ORACLE_HOME"
su $ORACLE_OWNR -c "$ORACLE_HOME/bin/emctl stop dbconsole"
rm -f /var/lock/oracle
echo "OK"
;;
reload|restart)
$0 stop
$0 start
;;
*)
echo "Usage: `basename $0` start|stop|restart|reload"
exit 1
esac

exit 0


設定Shell Script為可執行的:
代碼:
root@lu-desktop:~# chmod a+x /u01/app/oracle/product/11.1.0/db_1/bin/oracledb


測試一下是否正常執行 (要花點時間)
代碼:
[root@oracle db_1]# /u01/app/oracle/product/11.1.0/db_1/bin/oracledb  start
Starting Oracle:
LSNRCTL for Linux: Version 11.1.0.6.0 - Production on 26-FEB-2009 09:36:29

Copyright (c) 1991, 2007, Oracle.  All rights reserved.

TNS-01106: Listener using listener name LISTENER has already been started
Processing Database instance "orcl": log file /u01/app/oracle/product/11.1.0/db_1/startup.log
Environment variable ORACLE_SID not defined. Please define it.
OK
[root@oracle db_1]#
[root@oracle db_1]# vim /u01/app/oracle/product/11.1.0/db_1/bin/oracledb
[root@oracle db_1]# /u01/app/oracle/product/11.1.0/db_1/bin/oracledb start
Starting Oracle:
LSNRCTL for Linux: Version 11.1.0.6.0 - Production on 26-FEB-2009 09:38:18

Copyright (c) 1991, 2007, Oracle.  All rights reserved.

TNS-01106: Listener using listener name LISTENER has already been started
Processing Database instance "orcl": log file /u01/app/oracle/product/11.1.0/db_1/startup.log
Oracle Enterprise Manager 11g Database Control Release 11.1.0.6.0
Copyright (c) 1996, 2007 Oracle Corporation.  All rights reserved.
https://oracle:1158/em/console/aboutApplication
Starting Oracle Enterprise Manager 11g Database Control .............. started.
------------------------------------------------------------------
Logs are generated in directory /u01/app/oracle/product/11.1.0/db_1/oracle_orcl/sysman/log
OK


看一下記憶體中oracle相關程序
代碼:
[root@oracle db_1]# ps aux | grep oracle
avahi     5303  0.0  0.1   2564  1364 ?        Ss   09:26   0:00 avahi-daemon: running [oracle.local]
oracle    5424  0.0  0.8  54564  8468 ?        Ssl  09:27   0:00 /u01/app/oracle/product/11.1.0/db_1/bin/tnslsnr LISTENER -inherit
oracle    7249  0.0  1.4 546568 15024 ?        Ss   09:38   0:00 ora_pmon_orcl
oracle    7251  0.0  1.2 545976 12636 ?        Ss   09:38   0:00 ora_vktm_orcl
oracle    7255  0.0  1.2 545972 12544 ?        Ss   09:38   0:00 ora_diag_orcl
oracle    7257  0.0  1.7 545972 18188 ?        Ss   09:38   0:00 ora_dbrm_orcl
oracle    7259  0.0  1.2 545976 12696 ?        Ss   09:38   0:00 ora_psp0_orcl
oracle    7263  0.0  1.4 546488 14764 ?        Ss   09:38   0:00 ora_dia0_orcl
oracle    7265  0.2  1.4 545976 15440 ?        Ss   09:38   0:00 ora_mman_orcl
oracle    7267  0.0  1.7 548532 17784 ?        Ss   09:38   0:00 ora_dbw0_orcl
oracle    7269  0.2  3.4 561524 35268 ?        Ss   09:38   0:00 ora_lgwr_orcl
oracle    7271  0.0  1.3 545972 14312 ?        Ss   09:38   0:00 ora_ckpt_orcl
oracle    7273  0.1  3.7 546500 38784 ?        Ss   09:38   0:00 ora_smon_orcl
oracle    7275  0.0  1.6 545972 17452 ?        Ss   09:38   0:00 ora_reco_orcl
oracle    7277  0.5  5.4 550688 56116 ?        Ss   09:38   0:00 ora_mmon_orcl
oracle    7279  0.0  1.5 545972 15676 ?        Ss   09:38   0:00 ora_mmnl_orcl
oracle    7281  0.0  1.2 546504 12712 ?        Ss   09:38   0:00 ora_d000_orcl
oracle    7283  0.0  1.1 546568 12316 ?        Ss   09:38   0:00 ora_s000_orcl
oracle    7291  0.0  1.9 547536 20468 ?        Ss   09:38   0:00 ora_fbda_orcl
oracle    7293  0.0  1.2 545976 12788 ?        Ss   09:38   0:00 ora_smco_orcl
oracle    7295  0.0  1.3 545976 13624 ?        Ss   09:38   0:00 ora_qmnc_orcl
oracle    7309  0.0  1.5 546492 16364 ?        Ss   09:38   0:00 ora_w000_orcl
oracle    7711  0.1  2.5 547544 25924 ?        Ss   09:38   0:00 ora_q000_orcl
oracle    7713  0.0  1.6 545968 17036 ?        Ss   09:38   0:00 ora_q001_orcl
oracle    7803  0.2  0.6  10820  7104 ?        S    09:38   0:00 /u01/app/oracle/product/11.1.0/db_1/perl/bin/perl /u01/app/oracle/product/11.1.0/db_1/bin/emwd.pl dbconsole /u01/app/oracle/product/11.1.0/db_1/oracle_orcl/sysman/log/emdb.nohup
oracle    7817 25.7 16.8 909028 174748 ?       Sl   09:38   0:33 /u01/app/oracle/product/11.1.0/db_1/jdk/bin/java -server -Xmx256M -XX:MaxPermSize=200m -XX:MinHeapFreeRatio=20 -XX:MaxHeapFreeRatio=40 -DORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1 -Doracle.home=/u01/app/oracle/product/11.1.0/db_1/oc4j -Doracle.oc4j.localhome=/u01/app/oracle/product/11.1.0/db_1/oracle_orcl/sysman -DEMSTATE=/u01/app/oracle/product/11.1.0/db_1/oracle_orcl -Doracle.j2ee.dont.use.memory.archive=true -Djava.protocol.handler.pkgs=HTTPClient -Doracle.security.jazn.config=/u01/app/oracle/product/11.1.0/db_1/oc4j/j2ee/OC4J_DBConsole_oracle_orcl/config/jazn.xml -Djava.security.policy=/u01/app/oracle/product/11.1.0/db_1/oc4j/j2ee/OC4J_DBConsole_oracle_orcl/config/java2.policy -Djavax.net.ssl.KeyStore=/u01/app/oracle/product/11.1.0/db_1/sysman/config/OCMTrustedCerts.txt-Djava.security.properties=/u01/app/oracle/product/11.1.0/db_1/oc4j/j2ee/home/config/jazn.security.props -DEMDROOT=/u01/app/oracle/product/11.1.0/db_1/oracle_orcl -Dsysman.md5password=true -Drepapi.oracle.home=/u01/app/oracle/product/11.1.0/db_1 -Ddisable.checkForUpdate=true -Doracle.sysman.ccr.ocmSDK.websvc.keystore=/u01/app/oracle/product/11.1.0/db_1/jlib/emocmclnt.ks -Dice.pilots.html4.ignoreNonGenericFonts=true -Djava.awt.headless=true -jar /u01/app/oracle/product/11.1.0/db_1/oc4j/j2ee/home/oc4j.jar -config /u01/app/oracle/product/11.1.0/db_1/oc4j/j2ee/OC4J_DBConsole_oracle_orcl/config/server.xml
oracle    7822  1.7  1.9  85204 20088 ?        Sl   09:38   0:02 /u01/app/oracle/product/11.1.0/db_1/bin/emagent
oracle    7861 13.3  7.6 548704 78744 ?        Ss   09:38   0:16 oracleorcl (LOCAL=NO)
oracle    7893  0.8  4.6 548688 47648 ?        Ss   09:39   0:00 oracleorcl (LOCAL=NO)
oracle    8233  0.6  3.1 549168 32776 ?        Ss   09:39   0:00 oracleorcl (LOCAL=NO)
oracle    8267  0.4  3.2 547656 33680 ?        Ss   09:39   0:00 oracleorcl (LOCAL=NO)
oracle    8369  0.2  3.0 547672 31388 ?        Ss   09:39   0:00 oracleorcl (LOCAL=NO)
oracle    8375  1.7  4.8 550752 50248 ?        Ss   09:40   0:00 oracleorcl (LOCAL=NO)
oracle    8377  1.5  4.2 548700 44348 ?        Ss   09:40   0:00 oracleorcl (LOCAL=NO)
oracle    8400  0.7  3.4 548704 36112 ?        Ss   09:40   0:00 oracleorcl (LOCAL=NO)
oracle    8404  1.1  3.0 547632 31348 ?        Ss   09:40   0:00 oracleorcl (LOCAL=NO)
oracle    8408  0.7  3.6 548676 37328 ?        Ss   09:40   0:00 oracleorcl (LOCAL=NO)
oracle    8411  0.6  3.7 548676 38572 ?        Ss   09:40   0:00 oracleorcl (LOCAL=NO)
oracle    8418 44.9  6.6 558948 68428 ?        Ss   09:40   0:22 oracleorcl (LOCAL=NO)
oracle    8435  0.1  1.9 546608 20144 ?        Ss   09:40   0:00 oracleorcl (LOCAL=NO)
oracle    8438  0.3  2.5 547636 26260 ?        Ss   09:40   0:00 oracleorcl (LOCAL=NO)
oracle    8440  9.4  5.4 552772 56056 ?        Ss   09:40   0:03 oracleorcl (LOCAL=NO)
root      8476  0.0  0.0   3912   688 pts/1    R+   09:40   0:00 grep oracle


編輯開機自動執行設定檔/etc/rc.local
代碼:
root@lu-desktop:~# vim   /etc/rc.local

加入一行
代碼:
/u01/app/oracle/product/11.1.0/db_1/bin/oracledb  start


然後重新啟動 (在全藍色畫面會花些時間)
代碼:
root@lu-desktop:~# reboot

再用ps aux | grep oracle檢查
代碼:
[root@oracle db_1]# ps aux  |  grep oracle

如果有出現類似下面的訊息,表示emctl仍在啟動中 ,請再等等
代碼:
root      5688  0.3  0.1   4888  1232 ?        S    09:49   0:00 su oracle -c /u01/app/oracle/product/11.1.0/db_1/bin/emctl start dbconsole
oracle    5689 11.3  0.1   4484  1224 ?        Ss   09:49   0:00 /bin/sh -f /u01/app/oracle/product/11.1.0/db_1/bin/emctl start dbconsole
oracle    6101  0.0  0.2   6072  2396 ?        R    09:49   0:00 /u01/app/oracle/product/11.1.0/db_1/perl/bin/perl /u01/app/oracle/product/11.1.0/db_1/bin/emctl.pl start dbconsole


確認啟動完成後,再用瀏覽器連到 Oracle 的管理介面看看
代碼:
[root@oracle db_1]# firefox  https://localhost:1158/em  &

_________________
天道循環,生死不昧,真空妙有,還於本然!
諦聽我們的靈魂之聲,所有飄零的靈魂,此世虛幻,此生一夢,生者必死!
勢不可去盡,話不可說盡,福不可享盡,規矩不可行盡,凡事太盡,緣分勢必早盡!
免費貼圖空間 http://www.picfury.com/
免費貼圖空間 viewtopic.php?t=8816
免費上傳空間 viewtopic.php?t=6558


回頂端
   
 
 文章主題 : Re: [研究] Oracle 11g R1 Enterprise安裝研究(CentOS 5.2)
文章發表於 : 週四 2月 26, 2009 10:27 am 
離線

註冊時間: 週三 9月 25, 2002 10:57 am
文章: 7359
來自: R.O.C
附錄:runInstaller啟動失敗

安裝時碰過runInstaller無法啟動問題(如下圖),經查是xhost沒有成功啟動,後來VM快照復原後重新安裝時候正常。
圖檔

附錄:最低需求不符合

Oracle 11g Release 1 Enterprise安裝需求並沒有說支援CentOS 5.2,其實測試它是把它當成RedHat-5
圖檔

核心參數沒有設定或設定錯誤
圖檔

Gcc套件沒有安裝嗎?一查是安裝的為4.1.2版,要求的是4.1.1,不過後來英文介面安裝時候沒有這個警告;對於這種警告,其實可以強行安裝
圖檔

Compat-libstdc++沒安裝?實際上有,而且也是要求的3.2.3版
圖檔

建議使用固定IP (但是設定了還會有警告)
圖檔

某些情況下,是可以強行繼續安裝下去;但是建議先按下『否』,先逐一檢查修改失敗項目,按下『重試』再次檢查,盡可能符合。
如果有把過,就按下『是』進行安裝吧。
圖檔

附錄:設定錯NLS_LANG語系導致安裝失敗

因為參考的資料設定的是簡體語系,自行修改成繁體時候把NLS_LANG設定錯了,會導致某些畫面有亂碼
圖檔

甚至到了某些畫面,會產生根本無法繼續安裝的情況
圖檔

正確的Big5環境下NLS_LANG應該設定如下
NLS_LANG="TRADITIONAL CHINESE_TAIWAN".ZHT16BIG5;export NLS_LANG
VM快照復原後,重新安裝,就成功了。

附錄:安裝成功,但中文訊息變成亂碼

使用Big5環境設定,雖然可以可以安裝成功,但是某些終端機畫面中程式的訊息會變成亂碼
圖檔

或者MS-Windows XP上putty的的訊息變成亂碼
圖檔

附錄:沒有export LANG產生失敗

為了避免訊息亂碼,於是把VM快照復原,把語系相關設定全部用#號註解掉,再次安裝

代碼:
#NLS_LANG="TRADITIONAL CHINESE_TAIWAN".ZHT16BIG5;export NLS_LANG
#LC_CTYPE=zh_TW.Big5; export LC_CTYPE
#LC_ALL=zh_TW.UTF8; export LC_ALL     
#LANG=zh_TW.Big5; export LANG


結果發生錯誤
圖檔

使用下面命令檢查
[root@oracle ~]# set | grep NLS_LANG
[root@oracle ~]# set | grep LC_CTYPE
[root@oracle ~]# set | grep LC_ALL
[root@oracle ~]# set | grep LANG

發現LANG有參數值,執行
[root@oracle ~]# export LANG

按下Retry按鈕,結果出現SID已經重複,無法繼續安裝 (只好又重新復原快照)
圖檔

最後乾脆把所有語系設定變數都export,最後安裝成功
代碼:
#NLS_LANG="TRADITIONAL CHINESE_TAIWAN".ZHT16BIG5;export NLS_LANG
export NLS_LANG

#LC_CTYPE=zh_TW.Big5; export LC_CTYPE
export LC_CTYPE

#LC_ALL=zh_TW.UTF8; export LC_ALL     
export LC_ALL     

#LANG=zh_TW.Big5; export LANG
export LANG

_________________
天道循環,生死不昧,真空妙有,還於本然!
諦聽我們的靈魂之聲,所有飄零的靈魂,此世虛幻,此生一夢,生者必死!
勢不可去盡,話不可說盡,福不可享盡,規矩不可行盡,凡事太盡,緣分勢必早盡!
免費貼圖空間 http://www.picfury.com/
免費貼圖空間 viewtopic.php?t=8816
免費上傳空間 viewtopic.php?t=6558


回頂端
   
 
 文章主題 : Re: [研究] Oracle 11g R1 Enterprise安裝研究(CentOS 5.2)
文章發表於 : 週一 5月 03, 2010 1:52 pm 
離線

註冊時間: 週二 5月 15, 2007 10:03 pm
文章: 3
為何要關閉SELINUX?
不關會有什麼影響?
若不關的話設定上是否有差別?


回頂端
   
 
 文章主題 : Re: [研究] Oracle 11g R1 Enterprise安裝研究(CentOS 5.2)
文章發表於 : 週一 5月 03, 2010 8:30 pm 
離線

註冊時間: 週三 9月 25, 2002 10:57 am
文章: 7359
來自: R.O.C
song909neo 寫:
為何要關閉SELINUX?
不關會有什麼影響?
若不關的話設定上是否有差別?


官方文件說要關閉
SELinux
* Select Disabled from the drop down bar and click on Forward.
http://www.oracle.com/technology/pub/articles/smiley-11gr1-install.html

不關閉小弟猜無法正常安裝,或者安裝後某些功能無法正常運作

_________________
天道循環,生死不昧,真空妙有,還於本然!
諦聽我們的靈魂之聲,所有飄零的靈魂,此世虛幻,此生一夢,生者必死!
勢不可去盡,話不可說盡,福不可享盡,規矩不可行盡,凡事太盡,緣分勢必早盡!
免費貼圖空間 http://www.picfury.com/
免費貼圖空間 viewtopic.php?t=8816
免費上傳空間 viewtopic.php?t=6558


回頂端
   
 
顯示文章 :  排序  
發表新文章 回覆主題  [ 5 篇文章 ] 

所有顯示的時間為 UTC + 8 小時


誰在線上

正在瀏覽這個版面的使用者:沒有註冊會員 和 1 位訪客


不能 在這個版面發表主題
不能 在這個版面回覆主題
不能 在這個版面編輯文章
不能 在這個版面刪除文章

搜尋:
前往 :  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
正體中文語系由 竹貓星球 維護製作