安裝Oracle11106 for Solaris 10

yangtingkun發表於2007-11-20

Oracle11gUnix版本終於釋出了,簡單記錄一下Oracle11.1.0.6Solaris 10


首先是硬體是否滿足安裝需要:

# /usr/sbin/prtconf|grep "Memory size"
Memory size: 8192 Megabytes
# /usr/sbin/swap -s
total: 195408k bytes allocated + 24264k reserved = 219672k used, 14974200k available

要求記憶體不小於1G,在記憶體小於2G,SWAP應該是記憶體的1.5倍,記憶體2到8G,SWAP和記憶體相同大小即可,記憶體超過8G,SWAP是記憶體的0.75倍。

# /bin/isainfo -kv
64-bit sparcv9 kernel modules

檢查系統體系結構是否和下載的Oracle軟體匹配。

# df -h /tmp
Filesystem size used avail capacity Mounted on
swap 14G 944K 14G 1% /tmp
# df -h /data
Filesystem size used avail capacity Mounted on
/dev/dsk/c1t1d0s7 67G 64M 67G 1% /data

要求臨時表空間不少於200M,安裝目錄應大於4G。

下面檢查系統軟體情況,首先是作業系統版本:

# uname -r
5.10

然後檢查Oracle所需的包是否已經安裝:

# pkginfo -i SUNWarc SUNWbtool SUNWhea SUNWlibC SUNWlibm SUNWlibms SUNWsprot SUNWtoo SUNWi1of SUNWi1cs SUNWi15cs SUNWxwfnt
system SUNWarc Lint Libraries (usr)
system SUNWbtool CCS tools bundled with SunOS
system SUNWhea SunOS Header Files
system SUNWi15cs X11 ISO8859-15 Codeset Support
system SUNWi1cs X11 ISO8859-1 Codeset Support
system SUNWi1of ISO-8859-1 (Latin-1) Optional Fonts
system SUNWlibC Sun Workshop Compilers Bundled libC
system SUNWlibm Math & Microtasking Library Headers & Lint Files (Usr)
system SUNWlibms Math & Microtasking Libraries (Usr)
system SUNWsprot Solaris Bundled tools
system SUNWtoo Programming Tools
system SUNWxwfnt X Window System platform required fonts

檢查網路設定是否滿足要求:

# cat /etc/nsswitch.conf | grep hosts
# "hosts:" and "services:" in this file are used only if the
hosts: files
# hostname
netdb1
# domainname

# cat /etc/hosts
#
# Internet host table
#
127.0.0.1 localhost
172.0.2.61 netdb1 loghost

系統檢查完成,開始建立Oracle使用者和dba組:

# groupadd oinstall
# groupadd dba
# useradd -g oinstall -G dba oracle
# passwd oracle
New Password:
Re-enter new Password:
passwd: password successfully changed for oracle
# id nobody
uid=60001(nobody) gid=60001(nobody)

檢測並修改系統的核心引數,編輯/etc/system檔案,新增下面的配置,儲存後重啟系統。

set noexec_user_stack=1
set semsys:seminfo_semmni=100
set semsys:seminfo_semmns=1024
set semsys:seminfo_semmsl=256
set semsys:seminfo_semvmx=32767
set shmsys:shminfo_shmmax=8589934592
set shmsys:shminfo_shmmni=100

後建立安裝Oracle所需的目錄結構。

# mkdir -p /export/home/oracle
# chown -R oracle:oinstall /export/home/oracle
# mkdir -p /data/oracle/product/11.1
# chown -R oracle:oinstall /data

編輯oracle使用者目錄下的.profile檔案,新增下列環境變數:

ORACLE_BASE=/data/oracle
export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.1
export ORACLE_HOME
PATH=$ORACLE_HOME/bin:$PATH
export PATH
ORACLE_SID=test11g
export ORACLE_SID

DISPLAY=172.0.2.61:1.0
export DISPLAY

下面開始安裝過程。

透過vnc連線到圖形化介面,執行xhost +,切換到Oracle使用者,執行runInstaller命令。

選擇高階安裝,然後繼續,設定相應的inventory目錄和作業系統組名稱,點選繼續。選擇企業版,新增簡體中文。

輸入ORACLE_BASE/data/oracle和安裝路徑:/data/oracle/product/11.1

剩下的大部分步驟和10g的安裝差別不大,這裡就不過多描述了。

在建立資料庫的時候輸入ORACLE_SIDtest11gGLOBAL_NAMEtest11g.netdb

Oracle11g for Solaris版本新增了對11g新增許可權的選擇,執行使用者在安裝的時候進行設定,這是前面推出的幾個平臺上沒有的,Oracle還是不斷的在新增一些新的東西。

在整個安裝完成後,依次執行/data/oraInventory/orainstRoot.sh/data/oracle/product/11.1/root.sh檔案:

# . /data/oraInventory/orainstRoot.sh
Changing permissions of /data/oraInventory to 770.
Changing groupname of /data/oraInventory to oinstall.
The execution of the script is complete
# . /data/oracle/product/11.1/root.sh
Running Oracle 11g root.sh script...

The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /data/oracle/product/11.1

Enter the full pathname of the local bin directory: [/usr/local/bin]:
Creating /usr/local/bin directory...
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...


Creating /var/opt/oracle/oratab file...
Entries will be added to the /var/opt/oracle/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.

最後登陸資料庫:

$ sqlplus "/ as sysdba"

SQL*Plus: Release 11.1.0.6.0 - Production on Tue Nov 20 10:46:56 2007

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select * from v$version;

BANNER
----------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
PL/SQL Release 11.1.0.6.0 - Production
CORE 11.1.0.6.0 Production
TNS for Solaris: Version 11.1.0.6.0 - Production
NLSRTL Version 11.1.0.6.0 - Production

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/4227/viewspace-69509/,如需轉載,請註明出處,否則將追究法律責任。

相關文章