一、正常方式全新安裝
本文出自:http://koumm.blog.51cto.com
1. solaris 安裝環境準備
採用Oracle Solaris 10 安裝,安裝過程圖形介面安裝,安裝包選擇整個群組進行安裝。
所以將系統shell更改為bash。
# usermod -s /usr/bin/bash root
# cd /cdrom/sol_10_113_x86/Solaris_10/Product
# ls -l | grep gcc
# pkgadd -d . SUNWgcc
# pkgadd -d . SUNWgccS
# pkgadd -d . SUNWgccruntime
預設安裝目錄並不在PATH目錄中所以得在PATH中加上相應目錄才行
1)複製profile模板到主目錄
# cp /etc/skel/local.profile ~/.profile
2)編輯profile檔案
# vi .profile
PATH=/usr/bin:/usr/local/bin:/usr/ucb:/etc:/usr/sbin:/usr/sfw/bin:/usr/ccs/bin:/opt/csw/bin:.
export PATH
# source .profile
3)查看驗證
# which gcc
/usr/sfw/bin/gcc
2. 環境查看準備確認
(1) 查看solaris硬體環境
查看記憶體
# /usr/sbin/prtconf |grep "Memory size"
查看CPU及位元
# isainfo -kv
64-bit amd64 kernel modules
查看SWAP空間
# /usr/sbin/swap -l
查看檔案系統大小
# df -h
查看作業系統版本
# cat /etc/release
(2)確認安裝以下包
# pkginfo -i SUNWarc SUNWbtool SUNWhea 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 SUNWi1of ISO-8859-1 (Latin-1) Optional Fonts
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
ERROR: information for "SUNWi1cs" was not found
ERROR: information for "SUNWi15cs" was not found
放光碟片
# pkgadd -d /cdrom/sol_10_113_x86/Solaris_10/Product SUNWi1cs SUNWi15cs
然後按提示,然後再按提示輸入y
(3) 安裝rlwrap源碼包(rlwrap需要readline支援)
首先安裝readline庫函數:readline-6.2.tar.gz
gunzip readline-6.2.tar.gz | tar -xvf -
cd readline-6.2
./configure
gmake
gmake install
安裝rlwrap-3.0.tar.gz
gunzip rlwrap-0.37.tar.gz
tar xvf rlwrap-0.37.tar
cd rlwrap-0.37
./configure
***********************************
configure: error:
checking 找不到readline 函數,readline通過原始碼包安裝,安裝在/usr/local/lib,可以將檔案連結到lib或/usr/lib
You need the GNU readline library(ftp://ftp.gnu.org/gnu/readline/ ) to build
this program!
***********************************
cp /usr/local/lib/libreadline* /lib
cp /usr/local/lib/libreadline* /usr/lib
./configure
gmake
gmake install
安裝成功,將rlwrap安裝到/usr/local/bin下
3. 建立使用者帳號
第一步:建立oracle安裝相關使用者組及使用者:
建立oinstall,dba組和oracle使用者.
建立使用者組和使用者的命令如下(用root身份):
groupadd oinstall
groupadd dba
useradd -g oinstall -G dba -d /export/home/oracle -m oracle
passwd oracle
mkdir -p /u01/app/oracle/product/10.2.0/db_1;
chown -R oracle:oinstall /u01/app/oracle
chmod -R 775 /u01/
chown -R oracle:oinstall /var/tmp
chmod -R 775 /var/tmp
確認兩個使用者
id oracle
id nobody
4. 修改核心支援
Solaris10中,兩有種調整核心方法,Oracle建議兩種方式都同時使用。
查看本欄目更多精彩內容:http://www.bianceng.cnhttp://www.bianceng.cn/database/Oracle/