詳細講解RHEL AS4安裝Oracle 10R2的方法
RHEL AS4上安裝oracle 10R2
1、檢查安裝環(huán)境
rpm –q setarch compat-libstdc++-33 make glibc openmotif21 compat-db libaio gcc compat-gcc-32 compat-gcc-32-c++
2、添加相關(guān)的用戶與組
groupadd oinstall
groupadd dba
groupadd oper
useradd –g oinstall –G dba oracle
passwd oracle
3、建立路徑并配置權(quán)限
mkdir –p /u01/app/oracle/product/10.2.0/db_1
chown –R oracle.oinstall /u01
chmod –R 755 /u01
4、修改內(nèi)核及相關(guān)配置文件的參數(shù)
cat >> /etc/sysctl.conf <
>kernel.shmall = 2097152 //系統(tǒng)共享內(nèi)存頁面的***數(shù)目
>kernel.shmmax = 2147483648 //共享內(nèi)存段的***尺寸,一般是內(nèi)存容量的50%
>kernel.shmmni = 4096 //系統(tǒng)共享內(nèi)存段的***數(shù)目
>kernel.sem = 250 32000 100 128 //四個值的含義分別是:semmsl:每個ID的最
//大信號量數(shù)目 semmns:系統(tǒng)中信號量的***
//數(shù)目(必須大于或等于semmni*semmsl)
//semopm:每次信號量調(diào)用的***操作次數(shù)
//semmni:信號標(biāo)識符的***數(shù)目
>fs.file-max = 65536 //linux分配的***文件句柄數(shù)
>net.ipv4.ip_local_port_range = 1024 65000 //IP端口號的范圍默認為1024-4999只
//允許3975個向外的連接,但這不夠//Oracle使用
>net.core.rmem_default = 262144
>net.core.wmem_default = 262144
>net.core.rmem_max = 262144
>net.core.wmem_max = 262144
>EOF
cat >> /etc/profile <
>if [ \$USER = “oracle” ]; then
>if [ \$USER = “/bin/ksh” ]; then
>ulimit –p 16384
>ulimit –n 65536
>else
>ulimit –u 16384 –n 65536
>fi
>umask 022
>fi
>EOF
cat >> /etc/csh.login <
>if ( \$USER == “oracle” ) then
>limit maxproc 16384
>limit descriptors 65536
>umask 022
>endif
>EOF
#p#5、配置oracle用戶的變量
$vi .bash_profile
export ORACLE_BASE = /u01/app/oracle
export ORACLE_HOME = $ORACLE_BASE/product/10.2.0/db_1
export ORACLE_SID = lemon //數(shù)據(jù)庫的SID
export PATH = $PATH:$ORACLE_HOME/bin
6、安裝oracle
此時可以進行安裝了。要用oracle用戶登錄,直接進入X-window界面。通過鼠標(biāo)點擊安裝文件進行安裝。安裝過程中一些選項添加內(nèi)容如下:
Oracle Home Location: /u01/app/oracle/product/10.2.0/db_1
Global Database Name: lemon
Enter the full path of the inventory directory: /u01/app/oracle/oraInventory
7、修改dbstart文件
#vi $ORACLE_HOME/bin/dbstart
ORACLE_HOME_LISTNER = $ORACLE_HOME
8、相關(guān)命令
A.#dbstart //啟動數(shù)據(jù)庫
#dbshut //關(guān)閉數(shù)據(jù)庫
B.#emctl start dbconsole //開啟企業(yè)管理器
#emctl stop dbconsole //關(guān)閉企業(yè)管理器
C.#lsnrctl start //啟動監(jiān)聽
#lsnrctl stop //關(guān)閉監(jiān)聽
D.#emctl start agent //開啟代理
#emctl stop agent //關(guān)閉代理
E.#sqlplus /nolog
conn / as sysdba
startup //啟動實例
shutdown immediate //關(guān)閉實例
F.#tnsping 10.0.0.77 //測試Oracle數(shù)據(jù)庫是否通
G.http://10.0.0.77:5560/isqlplus //isQL*Plus URL
http://10.0.0.77:5560/isqlplus/dba //isQL*Plus DBA URL
http://10.0.0.77:1158/em //Enterprise Manager 10g Database Control URL
【編輯推薦】