Solaris10 x86 u1 下安裝 Oracle 10g Release 2

來源:互聯網
上載者:User

作業環境
Dell 2850
Solaris 10 x86 u1
Oracle 10g Release 2
Bash shell
綜合知識
Solaris 10 x86 u1會在Dell 2850下以64位元模式運行。
Oracle 10g Release 2就是64位架構
參考資料
安裝檔案10201_database_solx86_64.zip內的協助文檔
http://www.dbspecialists.com/presentations/oracle10gsolaris.html
http://download-west.oracle.com/docs/html/B13972_01/toc.htm
下載檔案
http://www.oracle.com/technology ... racle10g/index.html
註冊後點擊
Oracle Database 10g Release 2 (10.2.0.1.0) for Solaris Operating System (x86-64)
下載
10201_database_solx86_64.zip
檢查系統內容
確保系統可以運行圖形介面或可以遠程運行圖形介面,在此使用的遠端桌面是X Manager 2.0
開啟XBrowser,輸入伺服器的IP地址即可連上。
查看系統版本(要求5.10 64-bit)
? uname -a
SunOS javasvr 5.10 Generic_118844-26 i86pc i386 i86pc
? isainfo -kv
64-bit amd64 kernel modules
查看實體記憶體(要求512MB以上,按具體情況)
? /usr/sbin/prtconf | grep "Memory size"
Memory size: 2048 Megabytes
查看分頁檔(要求1G以上)
? /usr/sbin/swap -l
swapfile dev swaplo blocks free
/dev/dsk/c0t0d0s1 55,65 8 4192952 4192952
臨時檔案空間(要求400M以上)
? df -h /tmp
Filesystem size used avail capacity Mounted on
swap 3.1G 8K 3.1G 1% /tmp
這裡的實體記憶體為2G,理論上為2G*1.5=3G合適,這裡再添加512MB
建立一個512MB的分頁檔:
# mkfile 512M /export/home/swapone
添加剛建立的分頁檔:
# swap -a /export/home/swapone
檢查一下:
# swap -l
swapfile dev swaplo blocks free
/dev/dsk/c0d0s1 102,1 8 1056376 1056376
/export/home/swapone - 8 1048568 1048568
下面設定分頁檔在重啟後自動載入使用:
# vi /etc/vfstab
/export/home/swapone - - swap - no -
查看硬碟空間(要求3.7G以上)
df -h
Filesystem size used avail capacity Mounted on
/dev/dsk/c0t0d0s0 29G 3.1G 25G 12% /
......
swap 3.1G 636K 3.1G 1% /etc/svc/volatile
......
/dev/dsk/c0t0d0s7 27G 6.3G 20G 24% /export/home
查看以下軟體包是否存在
? 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
這裡需要安裝兩個包:SUNWi1cs和SUNWi15cs
這裡從下載的安裝鏡像檔案安裝
載入存放鏡像檔案分區
? mkdir /mnt/storage
? mount -F pcfs /dev/dsk/c0t0d0p4:1 /mnt/storage
以塊裝置載入鏡像檔案
? lofiadm -a /mnt/storage/solaris10/sol-10-u1-ga-x86-dvd.iso
/dev/lofi/1
? mount -F hsfs -o ro /dev/lofi/1 /mnt/isoimg
安裝這兩個包
? pkgadd -d /mnt/isoimg/Solaris_10/Product SUNWi1cs
? pkgadd -d /mnt/isoimg/Solaris_10/Product SUNWi15cs
卸載載入的檔案
? umount /mnt/isoimg/
? lofiadm -d /dev/lofi/1
? umount /mnt/storage/
由於使用的Solaris 10 u1比較新,就不打補丁了。

建立使用者和組
需要建立兩個組oinstall和dba,兩個使用者oracle和nobody
先查看是否已存在
? grep oinstall /etc/group
? grep dba /etc/group
? id -a oracle
? id -a nobody
uid=60001(nobody) gid=60001(nobody) groups=60001(nobody)
建立組
? groupadd oinstall
? groupadd dba
建立使用者
? useradd -g oinstall -G dba -d /export/home/oracle -s /usr/bin/bash -c 'Oracle software
owner' -m oracle
? id -a oracle
uid=107(oracle) gid=104(oinstall) groups=105(dba)
設定密碼
? passwd oracle
***
建立所需目錄
需要建立兩個目錄oracle和oradata,一個用來儲存程式檔案,一個用來儲存資料檔案
查看磁碟空間
? df -kh
建立目錄oracle(需要3G以上)
? mkdir -p /opt/oracle
? chown -R oracle:oinstall /opt/oracle
? chmod -R 775 /opt/oracle
建立目錄oradata(需要1.2G以上)
? mkdir -p /export/home/oradata
? chown -R oracle:oinstall /export/home/oradata
? chmod -R 775 /export/home/oradata
調整核心參數
備份設定檔
? cp /etc/system /etc/system.orig
修改設定檔,添加如下幾行
? vi /etc/system
* for install oracle 10g
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=4294967295
set shmsys:shminfo_shmmin=1
set shmsys:shminfo_shmmni=100
set shmsys:shminfo_shmseg=10
重啟系統
? reboot
準備安裝檔案
解壓安裝檔案:
? unzip 10201_database_solx86_64.zip
得到檔案夾database
配置環境參數
用oracle登入
? su - oracle
設定環境參數
? vi .profile
umask 022
ORACLE_BASE=/opt/oracle
ORACLE_SID=cdtdb
export ORACLE_BASE ORACLE_SID
重新登入查看
-bash-3.00$ umask
0022
? env | more
-bash-3.00$ env | more
......
ORACLE_SID=cdtdb
ORACLE_BASE=/opt/oracle
......
開始安裝過程
用Xmanager登入到伺服器
用oracle使用者
運行database目錄下的runInstaller
Select Installation Method
Advanced Installation
Specify Inventory directory and credentials
/opt/oracle/oraInventory
oinstall
Select Installation Type
Enterprise Edition
Sepcify Home Details
Name: OraDb10g_home1
Path: /opt/oracle/oracle/product/10.2.0/db_1
Product-Specific Prerequisite Checks
全部通過即可!
Select Configuration Option
Create a database
Select Database Configuration
General Purpose
Specify Database Configuration Options
Global Database Name:cdtdb SID:cdtdb
Select Database Character set: Simplified Chinese ZHS16GBK
選中Create database with sample schemas
Select Database Management Option
選中Use Database Control for Database Management
Enable Email Notification
61.144.43.235
chenliqun@pyp.edu.cn
Specify Database Storage Option
選中File System
location:/export/home/oradata
Specify Backup and Recovery Options
選中Do not enable Automated backups
Specify Database Schema Passwords
統一使用一個密碼:***
Summary
Execute Configuration Scripts
按照提示,用root使用者運行指令碼
安裝完成!
安裝日誌:
/opt/oracle/oracle/product/10.2.0/db_1/cfgtoollogs/dbca/cdtdb
iSQL*Plus URL:
http://192.168.200.11:5560/isqlplus
iSQL*Plus DBA URL:
http://192.168.200.11:5560/isqlplus/dba
Enterprise Manager 10g Database Control URL:
http://192.168.200.11:1158/em
用sys使用者以sysdba身份登入
完成服務配置
用oracle登入
? su - oracle
修改設定檔
? vi .profile
stty istrip
PS1='# '
umask 022
MAIL=/usr/mail/${LOGNAME:?}
PATH=/usr/bin:/usr/sbin:/usr/sadm/bin:/usr/sfw/bin:/usr/local/bin:/usr/ucb:/etc:.
ORACLE_SID=cdtdb
ORAENV_ASK=NO
ORACLE_BASE=/opt/oracle
export PS1 PATH ORACLE_BASE ORACLE_SID ORAENV_ASK
. oraenv
正確設定資料庫執行個體入口
? vi /var/opt/oracle/oratab
cdtdb:/opt/oracle/oracle/product/10.2.0/db_1:Y
建立自動運行指令碼
? vi /etc/init.d/oracle
#!/bin/sh
ORA_HOME=/opt/oracle/oracle/product/10.2.0/db_1
ORA_OWNER=oracle
if [ ! -f $ORA_HOME/bin/dbstart ]
then
echo "Oracle startup: cannot start"
exit
fi
case "$1" in
'start') # Start the Oracle databases and listeners
su - $ORA_OWNER -c "$ORA_HOME/bin/dbstart"
su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl start"
su - $ORA_OWNER -c "$ORA_HOME/bin/emctl start dbconsole"
su - $ORA_OWNER -c "$ORA_HOME/bin/isqlplusctl start"
;;
'stop') # Stop the Oracle databases and listeners
su - $ORA_OWNER -c "$ORA_HOME/bin/isqlplusctl stop"
su - $ORA_OWNER -c "$ORA_HOME/bin/emctl stop dbconsole"
su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl stop"
su - $ORA_OWNER -c "$ORA_HOME/bin/dbshut"
;;
esac
建立符號串連
? ln -s /etc/init.d/oracle /etc/rc2.d/S99oracle
? ln -s /etc/init.d/oracle /etc/rc0.d/K10oracle
非常感謝原作者.

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.