Ubuntu 13.04/12.10安装Oracle 11gR2图文教程(转)
Ubuntu 13.04/12.10安装Oracle 11gR2图文教程
原文标题:How to Install Oracle 11G R2 Enterprise Edition Database Ubuntu 12.10 / 12.04
注:原文出自:http://www.techienote.com/tag/oracle-database-11g-r2-on-ubuntu-12-04
Following is the how to for installing Oracle Database 11g R2 on Ubuntu 12.10 / 12.04
In case you want to install Oracle Database Express edition on Ubuntu 12.10 follow below post
How to install Oracle Database Express Edition on Ubuntu
Installing Dependencies
To install dependencies, run
sudo apt-get update
sudo apt-get install gcc make binutils gawk x11-utils rpm build-essential libaio1 libaio-dev libmotif4 libtool expat alien ksh pdksh unixODBC unixODBC-dev sysstat elfutils libelf-dev binutils lesstif2 lsb-cxx libstdc++5
We need to create some softlinks to start the installation. To do so run the following commands,
sudo ln -sf /bin/bash /bin/sh
sudo ln -s /usr/bin/awk /bin/awk
sudo ln -s /usr/bin/rpm /bin/rpm
sudo ln -s /usr/bin/basename /bin/basename
sudo ln -s /usr/lib/i386-linux-gnu/libpthread_nonshared.a /usr/lib/libpthread_nonshared.a
sudo ln -s /usr/lib/i386-linux-gnu/libc_nonshared.a /usr/lib/libc_nonshared.a
sudo ln -s /lib/i386-linux-gnu/libgcc_s.so.1 /lib/libgcc_s.so.1
sudo ln -s /usr/lib/i386-linux-gnu/libstdc++.so.6 /usr/lib/libstdc++.so.6
Also we need to add oracle user and oinstall, dba, nobody group. Run following commands,
sudo addgroup oinstall
sudo addgroup dba
sudo addgroup nobody
sudo usermod -g nobody nobody
sudo useradd -g oinstall -G dba -p password -d /home/oracle -s /bin/bash oracle
sudo mkdir /home/oracle
sudo chown -R oracle:dba /home/oracle
We need to do changes in start-up script, run following commands as root
mkdir /etc/rc.d
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
Now we will create the directory for installation, and changes it owner to oracle. Run following commands to do the same
sudo mkdir -p /u01/app/oracle
sudo chown -R oracle:dba /u01
We also need to modify the kernel parameter, to do so run following commands as root
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=1073741824″ >> /etc/sysctl.conf
Note: kernel.shmmax = max possible value, e.g. size of physical memory in bytes. In my case machine is having 2GB so we are specifying 1GB. Adjust the parameter as per your configuration
Load new kernel parameters, by running following,
sudo sysctl -p
We have to change shell configuration, to do the same run following commands as root user,
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
Download Oracle 11g R2 database from Oracle Download Center for linux.
I have downloaded both the zip in /home/oracle. We need to extract both the zip to start the installation. To unzip run,
cd /home/oracle
unzip linux_11gR2_database_1of2.zip
unzip linux_11gR2_database_2of2.zip
Now we will start the installation. You can start the installation from /home/oracle/database.
Login as a oracle user.
su oracle
Go to the binaries and start the installation as a oracle user,
cd /home/oracle
chmod 777 -R database
cd database
./runInstaller -ignoreSysPrereqs
ignoreSysPrereqs
Next we go though the installation (I don’t have the “Oracle Support Password” so just skip in here):
Oracle Base: /u01/app/oracle
SofewareLocation: /u01/app/oracle/product/11.2.0/dbhome_1

In “Create Inventory”, it should default as below:
Inventory Directory: /u01/app/oraInventory
oraInventory Group Name: oinstall
In “Select Configure Type”, choose “General Purpose / Transaction Processing”:
(IMPORTANT!) In “Specify Database Identifiers”, configure as below:
Global database name: orcl.techienote.com
Oracle Service Identifier (SID): orcl
In “Specify Configuration Options”, configure as below:
Memory -> Enable Automatic Memory Management:
TRUE
Character sets: Use Unicode (AL32UTF8)
In “Specify Management Options”, choose “Use Database Control for database management” but keep other else empty:
In “Specify Database Storage Options”, choose “File System” where:
Specify database file location: /u01/app/oracle/oradata

In “Specify Recovery Options”, choose “Do not enable automated backups”:
In “Specify Schema Passwords”, I am a bit lazy so choose “Use the same password for all accounts” (don’t do this in production server!):
In “Privileged Operating System Groups”, confirm as below:
Database Administrator (OSDBA) Group: dba
Database Operator (OSOPER) Group: oinstall
In “Preform Prerequisite Checks”, just simply ignore all warning message (since we are using Debian but not Oracle officially supported OS):
So just confirm everything in “Summary”:
And now let’s go for a coffee break
Now following the instructions and run the following commands with “root” user:
/u01/app/oraInventory/orainstRoot.sh
/u01/app/oracle/product/11.2.0/dbhome_1/root.sh
Ok you get it!
Confirm with installation progress
In previous screen the installer mentioned that we can access “Enterprise Manager Database Control URL” from https://localhost:1158/em, so now let’s open the browser and test it with following account:
User Name: SYS
Password: your_secret_password Connect As: SYSDBA

Once login it should show as below:
Error which I faced at the time of installation :
Error No 1 :
INFO: Building Client Shared Libraries
INFO: Building Client Shared Libraries
INFO: The output of this make operation is also available at: '/u01/app/oracle/product/11.2.0/dbhome_1/install/make.log'
INFO: INFO: Start output from spawned process:
INFO: ----------------------------------
INFO: INFO: /u01/app/oracle/product/11.2.0/dbhome_1/bin/genclntsh INFO: /
INFO: usr
INFO: /
INFO: bin/ld: cannot find /usr/lib/libpthread_nonshared.a
INFO: inside
collect2:
INFO: ld returned 1 exit status
INFO: INFO: genclntsh: Failed to link libclntsh.so.11.1 INFO: make:
INFO: *** [client_sharedlib] Error 1 INFO: End output from spawned process.
INFO: ----------------------------------
INFO: Exception thrown from action: make
Exception Name: MakefileException
Exception String: Error in invoking target 'client_sharedlib' of makefile '/u01/app/oracle/product/11.2.0/dbhome_1/rdbms/lib/ins_rdbms.mk'. See '/u01/app/oraInventory/logs/installActions2012-05-08_10-11-08PM.log' for details.
Exception Severity: 1
<pre> Solution for problem 1 is as follows :
<pre lang="bash">
wget http://security.ubuntu.com/ubuntu/pool/universe/i/ia32-libs/ia32-libs_2.2ubuntu10_amd64.deb
dpkg-deb -x ia32-libs_2.2ubuntu10_amd64.deb ia32-libs
cp ia32-libs/usr/lib32/libstdc++.so.5.0.7 /usr/lib/
cd /usr/lib
ln -s libstdc++.so.5.0.7 libstdc++.so.5
ln -s /usr/lib/i386-linux-gnu/libpthread_nonshared.a /usr/lib/libpthread_nonshared.a
Error No 2 :
INFO: /
INFO: usr
INFO: /
INFO: bin
INFO: /ld: warning: -z lazyload ignored.
/usr/bin/ld:
INFO: warning
INFO: : -z nolazyload ignored.
/usr/bin/ld: /u01/app/oracle/product
INFO: /11.2.0/dbhome_1/sysman/lib//libnmectl.a(nmectlt.o): undefined reference to symbol 'B_DestroyKeyObject'
INFO: INFO: /usr/bin/ld: note: 'B_DestroyKeyObject' is defined in DSO /u01
INFO: /app/oracle/product/11.2.0/dbhome_1/lib/libnnz11.so so try adding it to the
INFO: linker
INFO:
INFO: command line
/u01/app/oracle/product/11.2.0/dbhome_1/lib/libnnz11.so: could
INFO:
INFO: not read symbols: Invalid operation
collect2:
INFO: ld returned 1 exit status
INFO: INFO: make[1]: Leaving directory `/u01/app/oracle/product/11.2.0/dbhome_1/sysman/lib' INFO: make[1]: *** [/u01/app/oracle/product/11.2.0/dbhome_1/sysman/lib/emdctl] Error 1
make: *** [emdctl] Error 2 INFO: End output from spawned process.
INFO: ----------------------------------
INFO: Exception thrown from action: make
Exception Name: MakefileException
Exception String: Error in invoking target 'agent nmhs' of makefile '/u01/app/oracle/product/11.2.0/dbhome_1/sysman/lib/ins_emagent.mk'. See '/u01/app/oraInventory/logs/installActions2012-05-08_10-11-08PM.log' for details.
Exception Severity: 1
Solution for problem 2 is as follows :
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1/
sed -i 's/^\(\s*\$(MK_EMAGENT_NMECTL)\)\s*$/\1 -lnnz11/g' $ORACLE_HOME/sysman/lib/ins_emagent.mk
sed -i 's/^\(\$LD \$LD_RUNTIME\) \(\$LD_OPT\)/\1 -Wl,--no-as-needed \2/g' $ORACLE_HOME/bin/genorasdksh
sed -i 's/^\(\s*\)\(\$(OCRLIBS_DEFAULT)\)/\1 -Wl,--no-as-needed \2/g' $ORACLE_HOME/srvm/lib/ins_srvm.mk
sed -i 's/^\(TNSLSNR_LINKLINE.*\$(TNSLSNR_OFILES)\) \(\$(LINKTTLIBS)\)/\1 -Wl,--no-as-needed \2/g' $ORACLE_HOME/network/lib/env_network.mk
sed -i 's/^\(ORACLE_LINKLINE.*\$(ORACLE_LINKER)\) \(\$(PL_FLAGS)\)/\1 -Wl,--no-as-needed \2/g' $ORACLE_HOME/rdbms/lib/env_rdbms.mk http://blog.csdn.net/whatnamecaniuse/article/details/43730273
Ubuntu 13.04/12.10安装Oracle 11gR2图文教程(转)的更多相关文章
- eclipse在Ubuntu 13.04下的安装过程
eclipse在Ubuntu 13.04下的安装过程及问题小记 一.eclipse安装过程 首先确保在安装eclipse之前已经安装好Java虚拟机 1. eclipse官网下载压缩包 下载地址:ht ...
- Ubuntu 16.04/16.10安装 KDE Plasma
KDE目前的最新版本是Plasma 5.7(2016-10).Ubuntu默认的桌面环境是Unity,下面记录怎么在Ubuntu 16.04/16.10上安装KDE. Ubuntu 16.04/16. ...
- Ubuntu 13.04 双显卡安装NVIDIA GT 630M驱动
[日期:2013-05-24] Linux系统:Ubuntu 13.04 安装 bumblebee 以管理双显卡,下面命令会自动安装NVIDIA显卡驱动 sudo add-apt-reposito ...
- mysql 5.7.12 winx64安装配置方法图文教程
这篇文章主要为大家分享了mysql 5.7.12winx64安装配置方法图文教程,感兴趣的朋友可以参考一下 之前安装mysql时未做总结,换新电脑,补上安装记录,安装的时候,找了些网友的安装记录, ...
- Ubuntu 16.04安装Oracle 11gR2入门教程图文详解
概述 Ubuntu版本:ubuntu-16.04.3-desktop-amd64 Oracle版本:linux.x64_11gR2_database ------------------------- ...
- ubuntu 14.04 apt-get 方式安装oracle JDK
之前已经写了 如何手动安装oracle 的JDK :http://www.cnblogs.com/bcsflilong/p/4196536.html 其实 还有可以简单方便的用apt-get 的方式安 ...
- CentOS7安装Oracle 11gR2 图文详解
注:Oracle11gR2 X64安装 一.环境准备 安装包: 1.VMware-workstation-full-11.1.0-2496824.exe 2.CentOS-7-x86_64-DVD-1 ...
- ubuntu 14.04/15.10 安装基于eclipse的android app开发环境
一开始是装了ubuntu15.10,不知道是我的x200机器太old还是iso镜像有问题,总是各种莫名的引导不起来.有时候刚刚装好的干净系统,只install了一个vim和openssh,重启,然后就 ...
- eclipse在Ubuntu 13.04下的安装过程及问题小记
一.eclipse安装过程 首先确保在安装eclipse之前已经安装好Java虚拟机 1. eclipse官网下载压缩包 下载地址:http://www.eclipse.org/downloads/? ...
随机推荐
- [Oracle] 常用工具集之 - SQL*Loader
SQL*Loader原理 SQL*Loader是Oracle提供的用于数据加载的一种工具,它比较适合业务分析类型数据库(数据仓库),能处理多种格式的平面文件,批量数据装载比传统的数据插入效率更高.其示 ...
- JNI生成so
软件:android-ndk-r8 推荐使用这个版本,可以直接不用安装Cygwin软件就可以编译. 然后在系统环境变量中path选项中添加安装路径,比如我的:C:\android-ndk-r8: 然后 ...
- div仿checkbox表单样式美化及功能
div仿checkbox表单样式美化及功能(checkbox的样式不好看)素材在底部: 效果图: window.css .bj { position: absolute; top: 0; left: ...
- memwatch的使用
博主的新Blog地址:http://www.brantchen.com 欢迎訪问:) linux下的測试工具真是少之又少,还不好用,近期试用了memwatch,感觉网上的介绍不太好,所以放在这里跟大家 ...
- POJ--3268--Silver Cow Party【SPFA+邻接表】
题意:一些牛要去某一点參加聚会,然后再回到自己家,路是单向的,问花费时间最多的那头牛最少须要花费多长时间. 思路:从聚会地点返回,相当于是从某一点到其它各个点的最短路径.从牛的家中走到聚会地点,能够把 ...
- hdu4280(最大流)
传送门:Island Transport 题意:有N个岛屿 M条无向路 每个路有一最大允许的客流量,求从最西的那个岛屿最多能运用多少乘客到最东的那个岛屿. 分析:无向图正反都加弧,权值一样,这题点多, ...
- Redis缓存实现单点登录SSO
.NET基于Redis缓存实现单点登录SSO的解决方案 .NET基于Redis缓存实现单点登录SSO的解决方案 一.基本概念 最近公司的多个业务系统要统一整合使用同一个登录,这就是我们耳熟能详的单 ...
- hdu4679(树形dp)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4679 题意:给一棵树,每条边上都有一个权值,去掉树上任意一条边之后,分成两个子树,两个子树的最长路与这 ...
- .Net路(十三)导出数据库到EXCEL
.NET出口Office文件(word,excel)有两种方法我明白.一个存储在导出的文件中server录以下.利用response输出到浏览器地址栏,直接打开:还有直接利用javascript来导出 ...
- 重写equals()与hashCode()方法
出自:http://blog.csdn.net/renfufei/article/details/16339351 Java语言是完全面向对象的,在java中,所有的对象都是继承于Object类.Oj ...