Ubuntu 9.04下安裝Oracle 11G需要注意的幾點:
(1)Oracle 不支援Ubuntu,並且Linux核心版本相關,
(2)注意Oracle與本機JDk的衝突的問題,以及中文亂碼的問題
本機參數:
(1) Ubuntu 版本: Linux zhanghc-Ubuntu 2.6.28-15-generic #48-Ubuntu SMP Wed Jul 29 08:54:56 UTC 2009 i686 GNU/Linux
(2)Oracle11G版本: Linux x86 的 Oracle 資料庫 11g 第 1 版 (11.1.0.6.0)
安裝步驟:
第一步:
修改X server 的預設設定,點菜單的System -> Administration -> Login Window(系統->管理->登入視窗),選擇“Security(安全)”選項卡,取消“Deny TCP connections to the Xserver(拒絕TCP串連到X伺服器)”的勾,重啟Xserver(或者重啟系統)。然後在
終端輸入: xhost +127.0.0.1
第二步:
安裝必要的個工具:
終端輸入:sudo apt-get install build-essential libaio1 gawk ksh libmotif3 alien libtool lsb-rpm
第三步:
修改一些Ubuntu的/bin/sh的預設串連:
終端輸入:
root@zhanghc-Ubuntu:~# cd /bin
root@zhanghc-Ubuntu:/bin# ls -l /bin/sh
lrwxrwxrwx 1 root root 4 2008-04-28 19:59 /bin/sh -> dash
root@zhanghc-Ubuntu:/bin# ln -sf bash /bin/sh
root@zhanghc-Ubuntu:/bin# ls -l /bin/sh
lrwxrwxrwx 1 root root 4 2008-05-01 22:51 /bin/sh -> bash
第四步:
增加使用者和組:
終端輸入:
root@zhanghc-Ubuntu:/bin# cd /root
root@zhanghc-Ubuntu:~# addgroup oinstall
root@zhanghc-Ubuntu:~# addgroup dba
root@zhanghc-Ubuntu:~# addgroup nobody
root@zhanghc-Ubuntu:~# usermod -g nobody nobody
root@zhanghc-Ubuntu:~# useradd -g oinstall -G dba -p password -d /home/oracle -s /bin/bash oracle
root@zhanghc-Ubuntu:~# mkdir /home/oracle
root@zhanghc-Ubuntu:~# chown -R oracle:dba /home/oracle
root@zhanghc-Ubuntu:~# ln -s /usr/bin/awk /bin/awk
root@zhanghc-Ubuntu:~# ln -s /usr/bin/rpm /bin/rpm
root@zhanghc-Ubuntu:~# ln -s /usr/bin/basename /bin/basename
root@zhanghc-Ubuntu:~# mkdir /etc/rc.d
root@zhanghc-Ubuntu:~# for i in 0 1 2 3 4 5 6 S ; do ln -s /etc/rc$i.d /etc/rc.d/rc$i.d ; done
root@zhanghc-Ubuntu:~# mkdir -p /u01/app/oracle
root@zhanghc-Ubuntu:~# chown -R oracle:dba /u01
第八步:
系統預設值:
(1)增加下面這些到/etc/sysctl.conf檔案的末尾:
fs.file-max = 65535
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 1024 65535
net.core.rmem_default = 1048576
net.core.rmem_max = 1048576
net.core.wmem_default = 262144
net.core.wmem_max = 262144
(2)增加下面這些到/etc/security/limits.conf檔案末尾:
oracle soft nproc 2047
oracle hard nproc 16383
oracle soft nofile 1023
oracle hard nofile 65535
(3)增加下面這些到/etc/pam.d/login檔案末尾:
session required /lib/security/pam_limits.so
session required pam_limits.so
增加完成後執行下面的命令:sysctl -p