`

Installing Oracle 11g On Ubuntu 10 32 bit

 
阅读更多

Installing Oracle 11g (11.2.0.1) DB On Ubuntu 10.10 32 Bit

Having recently created an Ubuntu 10.10 VirtualBox image for my Oracle 11.2.0.1 databse installation I have decided to bring my notes together as a simple blog entry that I hope will allow other people to quickly do the same. The reason for this entry is because the information required to successfully complete the installation is spread around the documention. Hence I felt some short concise, I hope, instructions would be useful. I assume that the user does have an understanding of Ubuntu and Oracle database installation and hence do not go into details on all the commands.

Update Packages

apt-get update
apt-get update

apt-get install elfutils libaio1 libaio-dev libstdc++6-4.4-dev numactl pdksh sysstat unixODBC-dev unixODBC build-essential libaio1 gawk ksh libmotif3 alien libtool lsb-rpm

Create Groups

groupadd oinstall
groupadd dba
groupadd nobody

usermod -g nobody nobody

Create / Update oracle User

useradd -s /bin/bash -m -g oinstall -G dba oracle passwd oracle

The following command is required to successfully run the installer.

xhost local:oracle

Configure Limits for oracle

sudo gedit /etc/security/limits.cong

Add :

oracle              soft    nproc   2047
oracle              hard    nproc   16384
oracle              soft    nofile  1024
oracle              hard    nofile  65536

Configure System

sudo gedit /etc/sysctl.conf

Add :

fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586
net.ipv4.tcp_wmem = 262144 262144 262144
net.ipv4.tcp_rmem = 4194304 4194304 4194304

Make Directories

mkdir -p /u01/app/oracle
chown -R oracle:oinstall /u01/app/oracle
chmod -R 775 /u01/app/oracle
mkdir -p /u01/app/oraInventory
chown -R oracle:oinstall /u01/app/oraInventory
chmod -R 775 /u01/app/oraInventory

Link command to location expected by oracle installer

ln -s /usr/bin/awk /bin/awk  
ln -s /usr/bin/rpm /bin/rpm  
ln -s /usr/bin/basename /bin/basename

Run Installer

I assume here that the user has previously installed the oracle database. If not simply follow the default options when the database installer executes.

./runInstaller

Post Install

Add the following to /etc/profile

export ORACLE_BASE=/u01/app/oracle  
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1  
export ORACLE_OWNR=oracle  
export
PATH=$PATH:$ORACLE_HOME/bin

Start Script

Create /etc/init.d/oracledb with the following contents:

#!/bin/bash
#
# Run-level Startup script for the Oracle Listener and Instances
# It relies on the information on /etc/oratab
#
export ORACLE_OWNR=oracle
export ORACLE_OWNER=oracle
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
export PATH=$PATH:$ORACLE_HOME/bin

if [ ! -f $ORACLE_HOME/bin/dbstart -o ! -d $ORACLE_HOME ]
then
    echo "Oracle startup: cannot start"
    exit 1
fi

case "$1" in
    start)
        # Oracle listener and instance startup
        echo -n "Starting Oracle: "
        su $ORACLE_OWNR -c "$ORACLE_HOME/bin/lsnrctl start"
        su $ORACLE_OWNR -c "$ORACLE_HOME/bin/dbstart $ORACLE_HOME"
        touch /var/lock/oracle
        echo "OK"
        ;;
    stop)
        # Oracle listener and instance shutdown
        echo -n "Shutdown Oracle: "
        su $ORACLE_OWNR -c "$ORACLE_HOME/bin/lsnrctl stop"
        su $ORACLE_OWNR -c "$ORACLE_HOME/bin/dbshut $ORACLE_HOME"
        rm -f /var/lock/oracle
        echo "OK"
        ;;
    reload|restart)
        $0 stop
        $0 start
        ;;
    \*)
        echo "Usage: `basename $0` start|stop|restart|reload"
        exit 1
esac

exit 0

Execute :

cd /etc/init.d
update-rc.d oracledb defaults 99

The above will create links within the rc\*.d directories.

Edit oratab Script

Modify /etc/oratab so that the db is started with the os the sid line should look like the following:

# This file is used by ORACLE utilities.  It is created by root.sh
# and updated by the Database Configuration Assistant when creating
# a database.

# A colon, ':', is used as the field terminator.  A new line terminates
# the entry.  Lines beginning with a pound sign, '#', are comments.
#
# Entries are of the form:
#   $ORACLE_SID:$ORACLE_HOME:<N|Y>:
#
# The first and second fields are the system identifier and home
# directory of the database respectively.  The third filed indicates
# to the dbstart utility that the database should , "Y", or should not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
#
#
orcl:/u01/app/oracle/product/11.2.0/dbhome_1:Y

Checking it all works

Shutdown your VirtualBox Ubuntu and change the Network Configuration to Host Only Adapter, this is used to provide and internal loop back with VirtualBox and the os it is running on, and then restart. Once that instance is running log on and execute the following:

/sbin/ifconfig

It should return something like the following:

oracle@ubuntu-oracle-11g:~$ /sbin/ifconfig
eth1      Link encap:Ethernet  HWaddr 08:00:27:c7:f4:7b 
          inet addr:192.168.56.101  Bcast:192.168.56.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fec7:f47b/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:24 errors:0 dropped:0 overruns:0 frame:0
          TX packets:36 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:3355 (3.3 KB)  TX bytes:7381 (7.3 KB)

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:710 errors:0 dropped:0 overruns:0 frame:0
          TX packets:710 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:53972 (53.9 KB)  TX bytes:53972 (53.9 KB)

As you can see this shows that the IP address is 192.168.56.101. On your system add an entry to the "hosts" file (oracle11gdb) and then use your favourite DB tool to access the database at :

jdbc:oracle:thin:@oracle11gdb:1521/ORCL

This should connect and allow you access to the database.

分享到:
评论

相关推荐

    Installing Oracle Database 11g on Linux

    在本文中,我们将深入探讨如何在Linux环境下安装Oracle Database 11g,这是一个重要的数据库管理系统,广泛用于企业级数据存储和处理。Oracle 11g提供了高性能、高可用性和安全性,使其成为许多组织的核心数据库解决...

    Installing Oracle 10G On Linux

    在本文中,我们将深入探讨如何在Linux环境下安装Oracle 10G数据库系统。Oracle 10G是一款功能强大的关系型数据库管理系统,广泛应用于企业级的数据存储和管理。Linux作为开源且稳定的操作系统,是部署Oracle数据库的...

    Oracle administration guide + Concepts Oracle + Installing Oracle Database 10 g on Sun Solaris 10 by Using RC

    安装Oracle Database 10g在Sun Solaris 10操作系统上是一个技术性较强的步骤,"Installing Oracle Database 10 g on Sun Solaris 10 by Using RC"文档会详细指导这一过程。这通常包括硬件和软件需求分析、操作系统...

    Installing Oracle 11g Release 2 Enterprise Edition

    标题《Installing Oracle 11g Release 2 Enterprise Edition》和描述中提到的内容,强调的是安装Oracle 11g R2 EE版数据库软件的过程和注意事项。在这个过程中,首先需要了解的是,官方不推荐在生产环境中使用Oracle...

    Requirements For Installing Oracle10gR2 On RHEL 5&OEL 5 (x86_64)

    ### 安装Oracle 10g R2在RHEL 5 & OEL 5 (x86_64)上的需求 #### 概述 本文档详细介绍了在Red Hat Enterprise Linux(RHEL)5和Oracle Enterprise Linux(OEL)5(x86_64架构)上安装Oracle 10g Release 2数据库的...

    Oracle Database 11g Release 2 (11.2.0.3) RAC On Oracle Linux 6

    This article describes the installation of Oracle Database 11g release 2 (11.2.0.3 64-bit) RAC on Linux (Oracle Linux 6.3 64-bit) using VirtualBox (4.2.6) with no additional shared disk devices. ...

    oracle-11g安装手册

    - Requirements for Installing Oracle 11g R2 RDBMS on RHEL (and OEL) 5 on AMD64/EM64T。 #### 三、Oracle 11g的安装 1. **安装流程**: - 运行Oracle Database安装程序。 - 配置单点登录(Single Sign-On)...

    Installing Oracle RAC 10g Release 2 on Linux x86(中)

    ### 安装Oracle RAC 10g Release 2于Linux x86(中)的知识点解析 #### 概览与背景 Oracle Database 10g Release 2 RAC(Real Application Clusters)的安装流程旨在指导新手及有经验的用户在Linux环境下部署RAC...

    Installing Oracle9i 32-bit on Red Hat

    linux 下Oracle9i 安装

    Oracle Solaris 11 Installing Oracle Solaris 11 Systems-204

    本教程"Oracle Solaris 11 Installing Oracle Solaris 11 Systems-204"着重于系统的安装过程,旨在帮助用户理解并顺利完成Oracle Solaris 11的部署。 在安装Oracle Solaris 11时,用户需要掌握以下关键知识点: 1....

    Installing-oracle-10g.zip_oracle

    《在Linux环境下安装Oracle 10g的详细指南》 Oracle 10g是一款功能强大的关系型数据库管理系统,尤其在企业级应用中广泛使用。在Linux操作系统上安装Oracle 10g,不仅可以充分利用Linux的稳定性,还能享受到开源...

    installing oracle9i on redhat linux.rar

    从压缩包文件`Installing Oracle9i on RedHat Linux 7_2, 7_3, 8_0, 9, AS 2_1, 3_0 (Red Hat Enterprise Advanced Server 3 - RHEL AS 3) (Oracle database installation, install Oracle software).htm`中,我们...

    Vmware+oracle 10G+ rac+redhat as 4.7+RAW(裸设备)installing

    本教程主要围绕"Vmware+Oracle 10G+RAC+Red Hat AS 4.7+RAW(裸设备)installing"的主题,将详细阐述如何在虚拟环境中搭建Oracle RAC集群。以下是关键知识点的详解: 1. **Vmware**:Vmware是一款强大的虚拟化软件...

    Step By Step guide for installing Oracle RAC 11gR2 on Linux

    在深入探讨如何逐步安装Oracle RAC 11gR2于Linux系统上的过程中,我们首先应当理解该版本中引入的一些新概念与特性,这将有助于更有效地进行部署和管理。 ### 1. 新概念概览 #### 1.1 SCAN(Single Client Access ...

    Installing STLinux on Ubuntu

    ### 安装STLinux在Ubuntu上的关键步骤与挑战 #### 概览 本文将深入探讨在Ubuntu上安装STLinux的全过程,重点解析由于包管理系统的差异而带来的挑战及其解决方案。对于那些希望在Ubuntu环境中利用STLinux强大功能的...

    大牛出手Oracle 11g 新手入门安装文档

    一、依赖包的安装 二、Creating Required Operating System Groups and Users 三、Configuring Kernel Parameters 配置内核参数 四、Creating Required Directories ...六、Installing Oracle Database

    Installing Oracle 9i on RedHat Linux.rar

    在IT行业中,数据库管理系统是至关重要的,而Oracle数据库系统作为其中的佼佼者,被广泛应用于企业级的数据存储和管理。本教程将详述如何在Red Hat Linux操作系统上安装Oracle 9i,这对于那些需要在Linux环境下搭建...

    installing+Oracle+RAC+10g+Release+2+on+Linux+x86

    在本文中,我们将深入探讨如何在Linux x86平台上安装Oracle RAC 10g Release 2。这个过程适用于评估目的,旨在为初次接触Linux和/或Oracle的用户提供基础指导。我们将逐步介绍从零开始安装Oracle RAC软件的整个过程...

    [原创]Guide: Installing Oracle Enterprise Manager Grid Control 10.2.0.5 on Oracle Database 11gR2 and RHEL Linux 5.4

    本指南详细介绍了如何在Red Hat Enterprise Linux (RHEL) 5.4上安装并配置Oracle Enterprise Manager (EM) Grid Control 10.2.0.5版本,同时适用于Oracle Database 11g Release 2 (11gR2)。该文档不仅包含了...

    installing samba on ubuntu

    面是我在Ubuntu6.06 LTS 下源码编译安装samba主要安装过程,本人第一次用Ubuntu,刚装上去时候,没有gcc编译环境。郁闷了半天。找出这一过程发了不少的时间。可能还有些不妥,不过我经过这样的安装达到了向windows共享...

Global site tag (gtag.js) - Google Analytics