Ubuntu 9.04安装Oracle 11
折腾了好几天,今天好不容易找到一篇好的文章,把oracle装到ubuntu上了,注明我的ubuntu是10.10。呵呵,我安装的是oracle 10G,这篇文章好像没有些那个,认证,我这里是运用的是redhat认证。
Ubuntu 9.04安装Oracle 11 1.安装wcid sudo aptitude install wicd
2.安装Oracle ruijc@jackalope:~$sudo apt-get install unzip build-essential x11-utils rpm ksh lsb-rpm libaio1
ruijc@jackalope:~$ sudo su -
root@jackalope:~# cd /bin
root@jackalope:/bin# ls -l /bin/sh lrwxrwxrwx 1 root root 4 2009-05-26 12:58 /bin/sh -> dash
root@jackalope:/bin# ln -sf /bin/bash /bin/sh
root@jackalope:/bin# ls -l /bin/sh lrwxrwxrwx 1 root root 9 2009-05-26 13:27 /bin/sh -> /bin/bash
root@jackalope:/bin#
root@jackalope:/bin# cd
root@jackalope:~# addgroup oinstall Adding group `oinstall' (GID 1001) ... Done.
root@jackalope:~# addgroup dba Adding group `dba' (GID 1002) ... Done.
root@jackalope:~# addgroup nobody Adding group `nobody' (GID 1003) ... Done.
root@jackalope:~# usermod -g nobody nobody
root@jackalope:~# useradd -g oinstall -G dba -p password -d /home/oracle -s /bin/bash oracle
root@jackalope:~# mkdir /home/oracle
root@jackalope:~# chown -R oracle:dba /home/oracle
root@jackalope:~# ln -s /usr/bin/awk /bin/awk
root@jackalope:~# ln -s /usr/bin/rpm /bin/rpm
root@jackalope:~# ln -s /usr/bin/basename /bin/basename
root@jackalope:~# mkdir /etc/rc.d
root@jackalope:~# 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@jackalope:~# mkdir -p /u01/app/oracle
root@jackalope:~# chown -R oracle:dba /u01
root@jackalope:~#
root@jackalope:~# cd /etc
root@jackalope:/etc# cp sysctl.conf sysctl.conf.original
root@jackalope:/etc# vi sysctl.conf #Edit it, adding the following lines to the bottom of the file: 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 = 4194304 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 262144
root@jackalope:/etc# cd /etc/security/
root@jackalope:/etc/security# cp limits.conf limits.conf.original
root@jackalope:/etc/security# vi limits.conf #Add the following lines to the bottom of the file: oracle soft nproc 2047 oracle hard nproc 16383 oracle soft nofile 1023 oracle hard nofile 65535
root@jackalope:/etc/security#
root@jackalope:/etc/security#cd /etc/pam.d/
root@jackalope:/etc/pam.d# sysctl -p 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 = 4194304 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 262144 root@jackalope:/etc/pam.d# logout ruijc@jackalope:~$ logout Connection to 192.168.254.118 closed.
ruijc@jackalope:~$
ruijc@jackalope:~$ unzip Oracle.11g.Release.1.linux_11gR1_database.zip Archive: Oracle.11g.Release.1.linux_11gR1_database.zip creating: database/ creating: database/doc/ creating: database/doc/dcommon/ creating: database/doc/dcommon/css/ inflating: database/doc/dcommon/css/blafdoc.css inflating: database/doc/dcommon/css/bp_layout.css (...) inflating: database/stage/properties/oracle.server_Custom.properties inflating: database/stage/properties/oracle.server_PE.properties inflating: database/welcome.html
ruijc@jackalope:~$
ruijc@jackalope:~$ whoami ruijc
ruijc@jackalope:~$ sudo su -
root@jackalope:~# su - oracle
oracle@jackalope:~$ export DISPLAY=127.0.0.1:0.0
oracle@jackalope:~$ cd /home/ruijc/database
oracle@jackalope:/home/ruijc/database$ ./runInstaller -jreLoc $JAVA_HOME/jre Starting Oracle Universal Installer...
Oracle 安装时乱码的解决
确定java环境可以显示中文,如果不行: 方法很简单,就是在java安装目录下放进去一个中文字体即可。
cd $JAVA_HOME/jre/lib/fonts
sudo mkdir fallback
cd fallback
sudo ln -s /usr/share/fonts/truetype/wqy/wqy-zenhei.ttc(把某个中文字体链接进 fallback 目录,我选了最新的文泉驿夸父字体)
sudo mkfontdir
sudo mkfontscale
sudo cp wqy-zenhei.ttc wqy-zenhei.ttf
oracle@ts:/home/tangshuai/database$ ./runInstaller -jreLoc $JAVA_HOME/jre正在启动 Oracle Universal Installer...
检查临时空间: 必须大于 80 MB。 实际为 7456 MB 通过 检查交换空间: 必须大于 150 MB。 实际为 2949 MB 通过 检查监视器: 监视器配置至少必须显示 256 种颜色 >>> 无法使用命令 /usr/X11R6/bin/xdpyinfo 自动检查显示器颜色。请检查是否设置了 DISPLAY 变量。 未通过 <<<<
未通过某些要求检查。必须先满足这些要求, 出错解决方法 corection:
You are logged as different user than root or oracle. I don't know your login so in examples I'll call it my_login
So as my_login execute in shell: xhost +
As oracle execute: export DISPLAY=:0 ./runInstaller
If this don't help then as root execute:
gdmconfig
Go to "Security" section and there is something like "Always disallow TCP ..." this checkbox must be unchecked.
rpm: To install rpm packages on Debian systems, use alien. See README.Debian. error: cannot open Packages index using db3 - No such file or directory (2) error: cannot open Packages database in /var/lib/rpm apt-get install rpm alien
参考地址:http://www.blogjava.net/huawen5/archive/2009/11/08/301630.html