Install Oracle 11gR2 on Debian wheezy(转)

Install Oracle 11gR2 on Debian wheezy

出处:
http://gaiustech.wordpress.com/2013/06/26/howto-install-oracle-on-debian-wheezy/

Oracle 11gR2 on Debian still isn’t an officially supported configuration (10g XE was for a while), but it is perfectly do-able with a little cajoling. Here I am starting with a fresh installation of Debian 7.1 in a VirtualBox VM, with 1G memory and a 40G dynamically allocated virtual disk. I installed just the base desktop + system utilities options from the DVD image. Once this is done I take a snapshot of it, which I can quickly clone whenever I need a new VM.

The first thing I want to do is get it set up the way I like it, including patching to the latest Guest Additions. In a root terminal (Applications → Accessories → Root Terminal):
Add the following lines to the file /etc/sysctl.conf:

kernel.shmmax=1073741824
kernel.shmall=262143

And execute the following commands:
# apt-get remove virtualbox-guest-dkms virtualbox-guest-utils virtualbox-guest-x11 gnome-shell
# apt-get install linux-headers-3.2.0-4-all
# apt-get autoremove
# eject
# cd /media/cdrom0
# sh VBoxLinuxAdditions.run
# reboot

After ejecting the distro ISO, insert the Guest Editions. This may take a while (esp. the autoremove).

After this the system will boot into the console, old-skool style. After logging in type startx to get the desktop (but no need if you just want to use the VM to run the DB server). It will be the less resource-guzzling Classic desktop only. I also disable screen locking and enable automatic login, since those are actually taken care of by the host machine (an MBP in this case):

Applications → System Tools → Preferences → System Settings → User Accounts → Automatic Login
Applications → System Tools → Preferences → System Settings → Brightness and Lock
Now I am ready to begin the actual Oracle installation, starting with the prereqs. Many of these will fail the Oracle installer precheck, e.g. it wants Make 3.8 whereas Wheezy comes with 3.81!

# apt-get install libaio-dev sysstat unixodbc-dev libelf-dev unzip g++ libstdc++6-4.7-dev libstdc++5

And create the users and groups necessary, and open up the display so this new user can see it:

# groupadd dba
# useradd -d /home/oracle -m -c "Oracle Database" -g dba -s `which bash` oracle
# mkdir /opt/oracle
# mkdir /opt/oraInventory
# mkdir /oradata
# chown oracle:dba /opt/oracle /opt/oraInventory /oradata
# xhost +

Next do some fakery to make it look like Red Hat/OEL (all these appear to be hard-coded paths in the Oracle tools):
# ln -s /usr/bin/basename /bin/basename
# ln -s /usr/bin/awk /bin/awk
# ln -s /usr/lib/i386-linux-gnu/libpthread_nonshared.a /usr/lib
# ln -s /usr/lib/i386-linux-gnu/libc_nonshared.a /usr/lib
# ln -s /lib/i386-linux-gnu/libgcc_s.so.1 /lib
# ln -s /usr/lib/i386-linux-gnu/libstdc++.so.6 /usr/lib

Go and fetch the software from OTN (11.2.0.1) or if you have access to Metalink, just grab patch 10404530 which will take you straight to 11.2.0.3. Unzip these into /home/oracle where it will create a database/ folder. In a Root Terminal, su - oracle and:

$ for f in *.zip ; do unzip $f; done
$ cd database/
$ export DISPLAY=:0.0
$ export ORACLE_BASE=/opt/oracle
$ export ORACLE_HOME=$ORACLE_BASE/product/11.2.0.3
$ export PATH=$PATH:$ORACLE_HOME/bin
$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/i386-linux-gnu:/bin/lib:/lib/i386-linux-gnu/:/usr/lib
$ ./runInstaller

Proceed through the installer, selecting the appropriate options for the installation you want (or just accept the defaults if you are not sure). I am using

ORACLE_BASE=/opt/oracle
ORACLE_HOME=/opt/oracle/product/11.2.0.3
Datafiles in /oradata, inventory in /opt/oraInventory
Install software only, single instance, Enterprise Edition.
Skip all the prereq checks – they are there even tho’ the GUI installer doesn’t recognize them as such, the underlying scripts and the linker will. The installation will fail when relinking “agent nhms” due to a change in the behavior of the linker. The clue is in the log message:

/usr/bin/ld: note: ‘B_DestroyKeyObject‘ is defined in DSO

/opt/oracle/product/11.2.0.3/lib/libnnz11.so so try adding it to the linker command line

We can fix that in the Makefile $ORACLE_HOME/sysman/lib/env_emagent.mk by replacing:

NNMEFET_STACKLIBS_LINK=$(LDPATHFLAG)$(ORACLE_HOME)/$(LIBDIR)  $(LDPATHFLAG)$(PRODLIBHOME) $(LLIBNMEMSO) $(LLIBCORE) -Wl,-rpath,$(AGENTRPATH):$(JAVA_RTLINK_PATH) $(LIB_JVM_LINK) -Wl,--allow-shlib-undefined

With

NNMEFET_STACKLIBS_LINK=$(LDPATHFLAG)$(ORACLE_HOME)/$(LIBDIR)  $(LDPATHFLAG)$(PRODLIBHOME) $(LLIBNMEMSO) $(LLIBCORE) -lnnz11 -Wl,-rpath,$(AGENTRPATH):$(JAVA_RTLINK_PATH) $(LIB_JVM_LINK) -Wl,--allow-shlib-undefined

And clicking retry. Now I can create a database with DBCA. There is one customization I make to the startup parameters to avoid a crash in the Oracle JVM (still known as Aurora internally!) while creating the data dictionary, set java_jit_enabled from TRUE to FALSE in the Advanced Parameters:

Congratulations, you now have a working Oracle installation on a halfway sane Linux distro! Of course this is all moot since 12c is out now; the same steps should apply, I will update when I have had a chance to try it.

Finally I install some software that I like, again in a Root Terminal (you can skip this step if you don’t plan to do any OCaml development!):

# apt-get install hardening-wrapper hardening-includes git ocaml-batteries-included ocaml-mode rlwrap gnome-screenshot strace valgrind

安装后的环境变量设置

export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle
export ORACLE_SID=test
export PATH=$ORACLE_HOME/bin:$PATH:$HOME/bin

http://www.cnblogs.com/xzpp/p/3572307.html

时间: 2024-12-28 16:42:03

Install Oracle 11gR2 on Debian wheezy(转)的相关文章

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

HOWTO install Oracle 11g on Ubuntu Linux 12.04 (Precise Pangolin) 64bits

安装了Ubuntu 12.04 64bit, 想在上面安装Oracle 11gr2,网上找了好多文档都没成功,最后完全参考了MordicusEtCubitus的文章. 成功安装的关键点:install additional packages, 在link过程中处理错误的方法. 原文:http://www.makina-corpus.org/blog/howto-install-oracle-11g-ubuntu-linux-1204-precise-pangolin-64bits Before

RedHat 6 静默安装Oracle 11gR2

之前看了网上很多篇Linux静默安装Oracle的文章,但安装测试时老觉得有问题,后来直接找来Oracle官方英文文档并仔细阅读研究rsp文件的内容说明,经过自己在虚拟机中的安装测试,使用RedHat 6.5(内核版本:2.6.32-431.el6.x86_64)上静默安装Oracle 11gR2(版本:11.2.0.3),整理出了本文,主要包括了环境要求与准备.静默安装Oracle软件与监听.静默安装Oracle数据库.安装完成后检查.设置Oracle开机自动启动等部分. 一. 环境要求与准备

【翻译自mos文章】Oracle 11gR2 relink 新特性

Oracle 11gR2 relink 新特性 来源于: Oracle 11gR2 Relink New Feature (文档 ID 883299.1) 适用于: Oracle Database - Enterprise Edition - Version 11.2.0.0 to 11.2.0.0 [Release 11.2] Generic UNIX 解决方案: I) Oracle 11gR2有2种方法来relink $ORACLE_HOME中的binary 1)传统的方法:relink a

HowTo: Xen 4.1.3 Windows 8 HVM domU with Intel HD4000 VGA Passthrough on Debian Wheezy

http://linux-bsd-sharing.blogspot.com/2012/10/howto-xen-413-windows-8-hvm-domu-with.html Update 05/07/2013:Despite the HowTo being close to 1 year it applies perfectly to this day. At the time Wheezy was Debian's Testing distribution and has since mo

CentOS7安装Oracle 11gR2 安装

概述 Oracle 在Linux和window上的安装不太一样,公司又是Linux系统上的Oracle,实在没辙,研究下Linux下Oracle的使用,oracle默认不支持CentOS系统安装,所以安装的时候,需要修改部分属性,先参考同行博客和自己安装实践,总结下安装流程. 准备工作 1.下载Oracle安装包:linux.x64_11gR2_database_1of2.zip 和 linux.x64_11gR2_database_2of2.zip ,可以下载到本地,通过ftp服务上传到Lin

OEL5.5安装Oracle 11gr2详解

虚拟机环境:Vmware Workstation 11.1.0 + Oracle Enterprise Linux 5.5 X86-641.物理机内存设置 最小:1GB 推荐:2GB或以上 检测内存大小: # grep MemTotal /proc/meminfo 查看可用的内存空间: free 2.交换分区(swap)设置 物理内存 交换分区大小 1~2G    前者的1.5倍 2G~16G 与前者相等 >16GB   16GB 查看交换分区的大小: # grep SwapTotal /pro

Xfce 触摸板启用“点击”(Debian Wheezy)

问题描述 系统:Debian Wheezy Xfce. 问题:虽然安装了 Xorg 触摸板输入的驱动(synaptics),但是“点击”触摸板中间部分,仍然无法启用其相当于鼠标的“单击”功能. 解决方法 1.首先,保证安装了 synaptics 驱动: $ sudo apt-get install xserver-xorg-input-synaptics 2.复制 /usr/share/X11/xorg.conf.d 到 /etc/X11 $ sudo cp -R /usr/share/X11/

Centos 6下安装Oracle 11gR2

一.安装环境 CentOS release 6.7 (Final) Oracle Database 11g Release 2 二.安装前准备 #修改主机名 修改/etc/sysconfig/network配置文件中的HOSTNAME变量 [[email protected] ~]# hostname oracledb ####永久性修改 [[email protected] ~]#vi /etc/sysconfig/network NETWORKING=yes HOSTNAME= oracle