oracle 10G在fedora2上的安裝

來源:互聯網
上載者:User

1.安裝Fedora2
2.下載Oralce10G (www.oracle.com),一般安裝只需下載ship.db.cpio.gz
3.解開

[oracle @oar10g oracle]$ cd /tmp
[oracle @oar10g oracle]$ gzip -cd ship.db.cpio.gz | cpio –idmv       

4.修改Linux的系統參數:

As root: (su - )
# cat /proc/sys/kernel/shmmax (查看)
33554432
# echo 1073741824 >/proc/sys/kernel/shmmax (更改)  這個值根據各自機器記憶體的數量修改
# cat /proc/sys/kernel/shmmax(查看)
1073741824
# vi /etc/sysctl.conf (更改)   這個值可以不修改,而且在Fedura2的/etc/sysctl.conf中是不存在這項的。
kernel.shmmax=1073741824

5.建立使用者

As root:
# groupadd dba
#useradd -g dba oracle
#passwd oracle

6.建立Oracle的安裝的路徑

As root:
#mkdir –p /opt/oracle/product/10.2
#chown -R oracle.dba /opt/oracle

7.設定Oracle安裝需要的環境變數:

As oracle
[oracle @oar10g oracle]$ vi .bash_profile
…………..
# add by admin For Install oracle
#Oracle Environment:
umask 022
export ORACLE_BASE=/opt/oracle
export ORACLE_HOME=/opt/oracle/product/10.2/
export ORACLE_SID=ora10g
export ORACLE_TERM=xterm
#export TNS_AIMIN=Set if sqlnet.ora,tnsnames.ora,etc.
#there are not in $ORACLE_HOME/network/admin.
export NLS_LANG=AMERICAN
#export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
#LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib

LD_LIBRARY_PATH=$ORACLE_HOME/jdk/fre/lib/i386:
$ORACLE_HOME/jdk/jre/lib/i386/server:
$ORACLE_HOME/rdbms/lib:$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH

#Set shell search paths:
export PATH=$ORACLE_HOME/bin:$PATH
#end add by admin For oracle install.

8.重新登陸系統,察看環境變數是否生效

As oracle:

[oracle @oar10g oracle]$ export | grep ORACLE,如果以vnc的方式串連的話可能需要重新起一個vncserver

9.開始安裝

As oracle
$startx (or vncserver)
[oracle @oar10g oracle]$xterm &
[oracle @oar10g oracle]$sh /tmp/Disk1/ runInstaller -ignoreSysPrereqs&  --系統參數,表示不進行系統類別型的驗證,現在官方的oracle10g不支援fedora的安裝,所以需要加這個參數。

10.安裝過程中,會提示你以root的方式來執行一個指令碼。

As root:

[oracle @oar10g oracle]$ su –
[root @oar10g oracle]# sh /opt/oracle/product/10.2/root.sh

11.安裝完成。

不進行建立資料庫的操作;修改$ORACLE_HOME/bin 下的oracle指令碼。

cd $ORACLE_HOME/bin
mv oracle oracle.bin
cat >oracle <<"EOF"
#!/bin/bash
export DISABLE_HUGETLBFS=1
exec $ORACLE_HOME/bin/oracle.bin $@
EOF
chmod +x oracle

這一步是為瞭解決 ORA-27125: unable to create shared memory segment 這個錯誤。ORACLE的問題?Fedora的問題?

12.開始建庫

dbca

13.修改listner

可以根據實際情況修改listner,修改。

$ORACLE_HOME/network/admin/listener.ora檔案,oracle會將機器名直接作為listner的Host,可以根據實際情況修改為機器的ip地址

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.0.2)(PORT = 1521))
)
)
)

14.修改字元集

1.串連到伺服器 sqlplus user/password@ora10g
2.connect sys as sysdba
3.update props$ set value$=’你的字元集’ where name=’NLS_CHARACTERSET’;

相關文章

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.