CentOS 安裝 Oracle10gR2

來源:互聯網
上載者:User

安裝環境CentOS 5.5,需要附加的軟體自己找。

或者使用以下,一併升級

 

yum install binutils compat-db compat-libstdc++-296 control-center \
gcc gcc-c++ glibc glibc-common gnome-libs libstdc++ libstdc++-devel \
make pdksh sysstat xscreensaver setarch

有些可能會安裝不到,不過沒關係。

要安裝一個libXp,不然安裝Oracle的時候可能會亂碼。

 

yum install libXp

 

1.以root使用者登入,增加使用者和組。

/usr/sbin/groupadd oinstall
/usr/sbin/groupadd dba
/usr/sbin/groupadd oper

增加使用者

 

/usr/sbin/useradd -g oinstall -G dba[,oper] oracle

設定密碼

 

passwd oracle

2.更新/etc/sysctl.conf

# add by gaohu for oracle 10gR2
#kernel.shmall = 2097152
#kernel.shmmax = 2147483648
#kernel.shmmni = 4096
kernel.sem =25032000100128
#fs.file-max = 65536
net.ipv4.ip_local_port_range =102465000
net.core.rmem_default =1048576
net.core.rmem_max =1048576
net.core.wmem_default =262144
net.core.wmem_max =262144

更新完成後,使用 /sbin/syctl -p 來檢查。

3.更新shell,編輯 /etc/security/limits.conf

oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536

4.更新 /etc/pam.d/login

 

session required /lib/security/pam_limits.so
session required pam_limits.so

5.更新 /etc/profile

 

if [ $USER="oracle" ]; then
if [ $SHELL="/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384-n 65536
fi
fi

6.建立安裝路徑

 

# mkdir -p /u01/app/oracle
# chown -R oracle:oinstall /u01/app/oracle
# chmod -R 775 /u01/app/oracle

7.建立資料路徑和閃迴路徑

 

# mkdir /u01/oradata
# chown oracle:oinstall /u01/oradata
# chmod 775 /u01/oradata

閃迴路徑,可選:

# mkdir /u01/flash_recovery_area
# chown oracle:oinstall /u01/flash_recovery_area
# chmod 775 /u01/flash_recovery_area

8.切換到oracle使用者,設定使用者環境變數 編輯 /home/oracle/.bash_profile, 增加

 

# add by gaohu
TMP=/tmp
TMPDIR=/tmp
export TMP TMPDIR

ORACLE_BASE=/u01/app/oracle
ORACLE_SID=orcl
export ORACLE_BASE ORACLE_SID

#unset ORACLE_HOME
#unset TNS_ADMIN

ORACLE_OWNER=oracle
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export ORACLE_OWNER ORACLE_HOME

PATH=/usr/sbin:$ORACLE_HOME/bin:$PATH;
export PATH

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib;
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib;

NLS_LANG=AMERICAN_AMERICA.ZHS16GBK;
export NLS_LANG

#umask 022

#if [ $USER = "oracle" ]; then
# if [ $SHELL = "/bin/ksh" ]; then
# ulimit -p 16384
# ulimit -n 65536
# else
# ulimit -u 16384 -n 65536
# fi
#fi

9.重新整理環境變數(退出或者source)。執行安裝,因為Oracle10g是不支援CentOS 5的,所以增加忽略前提要求這個參數。

./runInstaller -IgnoreSysprereqs

或者是修改 /etc/redhat-release,改成支援的作業系統,比如 redhat-3, redhat-4

redhat-4 (Verne)

 看上面就知道,其實我是Fedora 16,只要把前面一個識別串改掉就可以了。嘿嘿...

9.關於DHCP的問題

1. 在進行Preinstallation Requirements Checking時遇到了Windows下相同的網路設定問題:
Check complete. The overall result of this check is: Not executed <<<<
Recommendation: Oracle supports installations on systems with DHCP-assigned public IP addresses.    However, the primary network interface on the system should be configured with a static IP address in order for the Oracle Software to function properly.    See the Installation Guide for more details on installing the software on systems configured with DHCP.

問題的具體解決辦法在文檔Installation Guide 的 2.4 Checking the Network Setup中有詳細介紹
[1] 具體做法是用文字編輯器開啟etc檔案夾下的hosts檔案,如:
       [oracle@admin ~]$ gedit etc/hosts
[2] 然後將自己電腦的IP,主機名稱[它可以由hostname命令查詢獲得]和網域名稱(自己起一個好聽一點的就行了)寫在原檔案內容的前面就可以了
       For example:
      192.168.100.16      myhost.us.mycompany.com     myhost
      127.0.0.1           localhost.localdomain     localhost    

或者是給自己真正設定一個靜態IP地址。

 

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.