这个恶心了我好几天的问题今天在一个神贴的帮助下终于搞定了,还没有测试连接,但是EM已经连接上去了,估计剩下的如果有也应该就只是配置问题了。为了避免以后该神贴失效,还是在自己的地盘上也简单做一下备份吧。原帖地址:http://forums.oracle.com/forums/thread.jspa?threadID=1115155&tstart=0
This is a of follow-up of my previous post: Installing Oracle 11g R2 on Ubuntu 10.04 (solved)
http://forums.oracle.com/forums/thread.jspa?threadID=1077139
Revisited and re-verified.
Installing Oracle 11gR2 11.2.0.1 x86_64-bit in Ubuntu Linux 10.04 Intel x86_64-bit.
(Please see the previous thread regarding feedback for 32-bit installations)
Note: You may want to review the Tips at the end prior to installing Oracle
Oracle Installation:
1. Oracle Software Prerequisites
Gain root access:
sudo su -
Install required packages
apt-get install build-essential
apt-get install libaio1
apt-get install libaio-dev
apt-get install unixODBC
apt-get install unixODBC-dev
apt-get install pdksh
apt-get install expat
apt-get install sysstat
apt-get install libelf-dev
apt-get install elfutils
apt-get install lsb-cxx
To avoid error “linking ctx/lib/ins_ctx.mk…”:
cd /tmp
wget http://mirrors.kernel.org/ubuntu/pool/universe/g/gcc-3.3/libstdc++5_3.3.6-17ubuntu1_amd64.deb
dpkg-deb -x libstdc++5_3.3.6-17ubuntu1_amd64.deb ia64-libs
cp ia64-libs/usr/lib/libstdc++.so.5.0.7 /usr/lib64/
cd /usr/lib64/
ln -s libstdc++.so.5.0.7 libstdc++.so.5
cd /tmp
wget http://mirrors.kernel.org/ubuntu/pool/universe/i/ia32-libs/ia32-libs_2.7ubuntu6.1_amd64.deb
dpkg-deb -x ia32-libs_2.7ubuntu6.1_amd64.deb ia32-libs
cp ia32-libs/usr/lib32/libstdc++.so.5.0.7 /usr/lib32/
cd /usr/lib32
ln -s libstdc++.so.5.0.7 libstdc++.so.5
cd /tmp
rm *.deb
rm -r ia64-libs
rm -r ia32-libs
To avoid error invoking target ‘idg4odbc’ of makefile:
ln -s /usr/bin/basename /bin/basename
To avoid errors when executing the post-install root.sh script:
ln -s /usr/bin/awk /bin/awk
2. Kernel Parameters
Gain root access:
sudo su -
Make a backup of the original file:
cp /etc/sysctl.conf /etc/sysctl.original
Modify the kernel parameter file
echo “#”>> /etc/sysctl.conf
echo “# Oracle 11gR2 entries”>> /etc/sysctl.conf
echo “fs.aio-max-nr=1048576″ >> /etc/sysctl.conf
echo “fs.file-max=6815744″ >> /etc/sysctl.conf
echo “kernel.shmall=2097152″ >> /etc/sysctl.conf
echo “kernel.shmmni=4096″ >> /etc/sysctl.conf
echo “kernel.sem=250 32000 100 128″ >> /etc/sysctl.conf
echo “net.ipv4.ip_local_port_range=9000 65500″ >> /etc/sysctl.conf
echo “net.core.rmem_default=262144″ >> /etc/sysctl.conf
echo “net.core.rmem_max=4194304″ >> /etc/sysctl.conf
echo “net.core.wmem_default=262144″ >> /etc/sysctl.conf
echo “net.core.wmem_max=1048586″ >> /etc/sysctl.conf
echo “kernel.shmmax=2147483648″ >> /etc/sysctl.conf
Note: kernel.shmmax = max possible value, e.g. size of physical memory in bytes
Load new kernel parameters
sysctl -p
3. Oracle Groups and Accounts
Gain root access:
sudo su -
groupadd oinstall
groupadd dba
useradd -m -g oinstall -G dba oracle
usermod -s /bin/bash oracle
passwd oracle
groupadd nobody
usermod -g nobody nobody
id oracle
uid=1001(oracle) gid=1001(oinstall) groups=1001(oinstall),1002(dba)
Make a backup of the original file:
cp /etc/security/limits.conf /etc/security/limits.conf.original
echo “#Oracle 11gR2 shell limits:”>>/etc/security/limits.conf
echo “oracle soft nproc 2048″>>/etc/security/limits.conf
echo “oracle hard nproc 16384″>>/etc/security/limits.conf
echo “oracle soft nofile 1024″>>/etc/security/limits.conf
echo “oracle hard nofile 65536″>>/etc/security/limits.conf
4. Oracle Directories
Using /u01/app for Oracle software and /u02/oradata for database files
mkdir -p /u01/app/oracle
mkdir -p /u01/app/oraInventory
mkdir -p /u02/oradata
chown oracle:oinstall /u01/app/oracle
chown oracle:oinstall /u01/app/oraInventory
chown oracle:oinstall /u02/oradata
chmod 750 /u01/app/oracle
chmod 750 /u01/app/oraInventory
chmod 750 /u02/oradata
5. Oracle Universal Installer
Login as the Oracle user – do not use ‘su’
ssh -Y oracle@server_address
See Tips below for mounting the Oracle installation source
/path_to_installer/runInstaller
Note: Select the “Ignore All” button at the Prerequisite Checks dialog.
Tips:
Fix backspace and arrow keys in the vi-editor:
sudo apt-get install vim
Allow the Oracle user to gain root access:
Edit /etc/sudoers and add the following:
# Members of the oinstall group may gain root privileges
%oinstall ALL=(ALL) ALL
Enable remote SSH connectivity:
sudo apt-get install ssh
Note: New accounts requires a password: passwd oracle
Connect from a X-Windows enabled terminal with trusted X11 forwarding:
ssh -Y oracle@server_address
Typing ‘xclock’ in the terminal window should display a clock on your desktop.
Note: Using ‘su’ will invalidate the X11 forwarding environment.
Mount an iso disk image:
mount -o loop /u02/oradata/oracle11gR2.iso /mnt/
Note: For this to work the iso image needs to be copied to a Linux filesystem.
Avoid Oracle runInstaller “.oui: No such file” / “bad interpreter: Permission denied:
Logout your current X-session and login as user Oracle
Insert the Oracle Installation DVD
Or from a remote terminal session:
Insert the Oracle Installation DVD
sudo umount /dev/sr0
Create a new session as user Oracle
ssh -Y oracle@server_address
sudo mount /dev/sr0 /media
/media/database/runInstaller
If you see “runinstaller” instead of “runInstaller” you can try the following:
sudo mount -o loop,norock /dev/cdrom /media
Note the OUI installer fails if there are spaces in the path to runInstaller
Regards and best of luck,
Markus
Edited by: Markus Waldorf on Sep 2, 2010 7:18 PM
最悲剧的就是因为用户部分是用的安装程序的默认设置,所以神贴中间段落略过了,没有看到 Note: Select the “Ignore All” button at the Prerequisite Checks dialog. 这句话,导致我被卡在安装前两三天,啥都没干,光google怎么解决那一堆的“错误”了。
整体来讲,ubuntu上面装oracle比windows下面多费不少劲,windows下的安装程序还是相当傻瓜化的,基本一路next下来,没有遇到啥太大的挑战跟困惑。希望linux平台下面oracle能跑的稳当点,不会再有windows下运行的那么多怪问题,也不枉我这两天的忙活,嗯嗯!
