个人实操步骤:

1,下载什么版本;有哪些常用版本,下载地址有:

11g,11gR2

10g,10gR2

Windows

 Linux

    ----rpm包,64位,32位;server,client

    |

    ----deb包,64位,32位;server,client

===================================================================

http://www.oracle.com/us/products/database/product-editions-066501.html?ssSourceSiteId=otnen

http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html?ssSourceSiteId=ocomen

 

===================================================================

10g,deb:

Oracle Database 10g Express Edition (Universal)

 
    http://www.oracle.com/technetwork/products/express-edition/downloads/102xelinsoft-102048.html
  squeeze上安装oracle11g(Oracle On Debian  Install Configure apple use) oracle-xe-universal_10.2.0.1-1.0_i386.deb (262,440,214 bytes) (cksum 3404538446) *Debian package
  Multi-byte Unicode database for all language deployment, with the Database Homepage user interface available in the following languages: Brazilian Portuguese, Chinese (Simplified and Traditional), English, French, German, Italian, Japanese, Korean and Spanish.

11gR2,64bit,rpm: 

Oracle Database Express Edition 11g Release 2 September 2011
Thank you for accepting the License Agreement; you may now download this software.
   
  http://www.oracle.com/technetwork/products/express-edition/downloads/index.html
squeeze上安装oracle11g(Oracle On Debian  Install Configure apple use)

Oracle Database Express Edition 11g Release 2 for Linux x64
-Unzip the download and the RPM file can be installed as normal

 

############################################################################

 http://www.fairtec.at/de/it-blog-mainmenu-16/169

Oracle 11g Installation on Debian Squeeze

 

squeeze上安装oracle11g(Oracle On Debian  Install Configure apple use)

 

squeeze上安装oracle11g(Oracle On Debian  Install Configure apple use)

I recently needed to install a Oracle 11g Database on Debian, and wrote down the notes here. Please send me a message

if i missed a step or something is easier to achieve than I did.

install mandatory packages

some packages are probably not necessary, I put them together from old notes from me and several weblinks if you know which are not necessary send me a list and i will correct it

apt-get install binutils autoconf automake bzip2 gcc less libc6-dev make libstdc++5 unzip zlibc build-essentials libaio1

!!!doxygen reported as not needed by Tobia, tx for this! Also watch his comment if you use OpenVZ!

x-terminal

I chose fluxbox but you can also take anything else like xterm, gnome, kde….

apt-get install fluxbox

prepare user and groups

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

check environment

there are several kernel parametersw that have to be changed to succesfully install the database, here is a script that helps you to determine them

echo "sem: ";echo "min 250 32000 100 128"; echo "is " `cat /proc/sys/kernel/sem`; echo; \
echo "shmall: ";echo "min 2097152"; echo "is " `cat /proc/sys/kernel/shmall`; echo; \
echo "shmmax - should be able to hold the SGA - max 4G-1byte: ";echo "is " `cat /proc/sys/kernel/shmmax`; echo; \
echo "shmmni: ";echo "min 4096"; echo "is " `cat /proc/sys/kernel/shmmni`; echo; \
echo "file-max: ";echo "min 6815744"; echo "is " `cat /proc/sys/fs/file-max`; echo; \
echo "ip_local_port_range: ";echo "min/max 9000  65500"; echo "is     " `cat /proc/sys/net/ipv4/ip_local_port_range`; echo; \
echo "rmem_default: ";echo "min 262144"; echo "is " `cat /proc/sys/net/core/rmem_default`; echo; \
echo "rmem_max: ";echo "min 4194304"; echo "is " `cat /proc/sys/net/core/rmem_max`; echo; \
echo "wmem_default: ";echo "min 262144"; echo "is " `cat /proc/sys/net/core/wmem_default`; echo; \
echo "wmem_max: ";echo "min 1048576"; echo "is " `cat /proc/sys/net/core/wmem_max`; echo; \
echo "aio-max-nr: ";echo "max 1048576"; echo "is " `cat /proc/sys/fs/aio-max-nr`; echo;

change necessary parameters

you have just to change the parameters that don't fit, but feel free to set them all to the minimum with this script

echo "kernel.sem = 250 32000 100 128" >> /etc/sysctl.conf
echo "kernel.shmall = 2097152" >> /etc/sysctl.conf
# !!!! needs to fit YOUR SGA (=main memory for database, be sure to have enough ram for PGA etc.)!!!!
echo "kernel.shmmax = 1200000000" >> /etc/sysctl.conf
#echo "kernel.shmmni = 4096" >> /etc/sysctl.conf
echo "fs.file-max = 6815744" >> /etc/sysctl.conf
#echo "net.ipv4.ip_local_port_range = 1024 65000" >> /etc/sysctl.conf
echo "net.core.rmem_default = 262144" >> /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 = 1048576" >> /etc/sysctl.conf
echo "fs.aio-max-nr = 1048576" >> /etc/sysctl.conf

change some limits

also some limits have to be set

echo "oracle soft nproc 2047" >> /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

create directories

I prefer to separate software, database files and recovery files so i put them in /u01 /u02 /u03

mkdir -p /u01/app/oracle
mkdir -p /u02/oradata
mkdir -p /u03/flash_recovery_area
chown -R oracle:oinstall /u01 /u02 /u03
chmod -R 775 /u01 /u02 /u03

NOTE: seems they just say “recovery_area” or even “fast_recovery_area” now to the “flash_recovery_area”
additional steps

These steps prevent errors when the installer links some libraries

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

finish preparations

reboot

== call the installer But before calling the installer check with above script if the kernel parameters are fine now

su oracle
/pathtoinstallfileshere/database/runInstaller -ignoreSysPrereqs

installer

The installer should guide you through each step in simple and advanced mode. When the requirements are checked you can savely bypass the warnings, because not everything can be checked on an unsupported ;-) environment.

!!!I really want to keep this up-to-date so please send me a note if i missed something or something is easier to handle than i did it!!!

Errors that can happen and how to bypass them

Added at 30.12.2010 including some more install packages some of the errors below did not happen when i wrote this article, it seems some new library versions etc. changed recently

java exception when calling the installer

happened at my side because I installed it over vnc This should help:

xhost localhost

Error in invoking target 'install' of makefile ins_ctx.mk

seems to be a problem with a newer? glibc version in the make.log file you should find something like

warning: libstdc++.so.5, needed by /u01/app/oracle/product/11.2.0/dbhome_1/ctx/lib//libsc_fa.so, not found

simply install libstdc++5 apt-get install libstdc++5

 

...

 

 

Oracle 11g R2安装手册(图文版)
For Debian Lenny/Sid/Squeeze/Ubuntu
BY:撒加
2010年04月19日
文中操作系统为Debian 5.04,Ubuntu 9.04,此文档适用于在一个局域网内安装ORACLE使用,如果是从私网-公
网这样的方式安装请使用vnc4server+x-window-system+gdm的方式远程安装
从Oracle官网下载Oracle 11g R2 for x86的版本
假设debian lenny已经配置完毕,作为服务器在安装的时候只安装“基本系统”,"KDE环境”不用安装(尽管
oracle安装必须使用桌面环境,但这不是问题)。
第一步,配置基本的编译环境
1、编辑/etc/apt/source.list文件,将升级源配置为如下
deb http://mirrors.163.com/debian lenny main contrib non-free
2、安装必要的软件
apt-get update
必须的软件包:
apt-get install build-essential alien debhelper gawk gettext html2text intltool-debian ksh lesstif2 libaio-dev libaio1
libbeecrypt6 libdb4.2 libmotif3 libelf-dev libelf1 libltdl3 libltdl3-dev libodbcinstq1c2 libqt4-core libqt4-gui librpm4.4
libsqlite3-0 libstdc++6 libstdc++5 lsb lsb-core lsb-cxx lsb-desktop lsb-graphics lsb-qt4 lsb-rpm odbcinst1debian1 pax
po-debconf sysstat unixodbc unixodbc-dev elfutils libebl-dev pdksh
此为方便安装的包:
Apt-get install sun-java6-jdk p7zip-full xorg ttf-wqy-zenhei
//sun-java6-jdk为了不让安装的时候使用oracle自带的JDK,p7zip-full解包oracle的安装包,xorg为x-window
系统,ttf-wqy-zenhei为安装时显示中文
3、增加swap分区
oracle安装需要1G的交换分区(可以根据需要来添加,如果在安装系统的时候已经有交换分区了,可以忽略)
dd if=/dev/zero of=/tmp/swap bs=1M count=1024
chmod 600 /var/tmp/swap
mkswap /var/tmp/swap
swapon /var/tmp/swap
可以使用swapon -s 来查看交换分区,在安装完oracle后使用命令swapoff /var/tmp/swap关闭交换分区
4、创建用户
要用oracle用户安装和启动数据库
groupadd oinstall
groupadd dba
groupadd nobody //创建这个组是因为oracle支持的redhat系统中默认有这个组,为了欺骗oracle,所以要建立这
个组
useradd -g oinstall -G dba -s /bin/bash -m -d /home/oracle oracle //新建一个oracle用户
passwd oracle //设置用户oracle的登录密码
usermod -g nobody nobody //将用户nobody用户添加到nobody组里
5、创建目录
mkdir -p -m 775 /var/oracle
chown -R oracle.oinstall /var/oracle
6、修改内核参数
vim /etc/sysctl.conf
添加:
kernel.shmmax = 3147483648
kernel.shmall = 2097152
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 262144
保存后执行 sysctl -p 是修改生效
7、创建链接
ln -s /usr/bin/awk /bin/awk
ln -s /usr/bin/rpm /bin/rpm
ln -s /usr/bin/basename /bin/basename
ln -s /etc /etc/rc.d
8、编辑/etc/profile
在文件末尾添加
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384
ulimit -n 65536
fi
fi
9、编辑/etc/security/limits.conf
在文件末尾添加
* soft nproc 2047
* hard nproc 16384
* soft nofile 1024
* hard nofile 65536
修改/etc/pam.d/login,添加
session required /lib/security/pam_limits.so
修改/etc/pam.d/su,添加
session required /lib/security/pam_limits.so
10、设置用户环境
vim /home/oracle/.profile
添加:
export ORACLE_BASE=/var/oracle
export ORACLE_HOME=$ORACLE_BASE/product/ 11.2.0 /db_1
export ORACLE_SID=test
export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin
将umask 022前的#删除
保存退出
echo "export DISPLAY=*.*.*.*:0.0" >> /home/oracle/.profile // //*.*.*.*指安装了NetSarang Xmanager Enterprise的
机器
vim /home/oracle/.bashrc
添加:
ORACLE_BASE=/var/oracle
ORACLE_HOME=$ORACLE_BASE/product/11.2.0
ORACLE_SID=test
TNS_ADMIN=$ORACLE_HOME/network/admin
LD_LIBRARY_PATH=$ORACLE_HOME/lib
PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_BASE
export ORACLE_HOME
export ORACLE_SID
export TNS_ADMIN
export LD_LIBRARY_PATH
export PATH
unset USERNAME
11、安装准备
通过apt-get安装JDK的默认路径为/usr/lib/jvm/java-6-sun-1.6.0.12/
mkdir -p /usr/lib/jvm/java-6-sun-1.6.0.12/jre/lib/fonts/fallback
cp /usr/share/fonts/truetype/wqy/wqy-zenhei.ttf /usr/lib/jvm/java-6-sun-1.6.0.12/jre/lib/fonts/fallback
cd /usr/lib/jvm/java-6-sun-1.6.0.12/jre/lib/fonts/fallback
mkfontdir
mkfontscale
echo "Red Hat Linux release 4.1" > /etc/redhat-release // 欺骗oracle的系统检查
12、安装过程
假设下载的linux_11gR2_database_1of2.zip,linux_11gR2_database_2of2.zip在/opt下,执行:
7z x /opt/linux_11gR2_database_1of2.zip -o/opt
7z x /opt/linux_11gR2_database_2of2.zip -o/opt //解压文件到/opt目录
su – oracle //切换到用户oracle
cd /opt/database
./runInstaller -jreLoc /usr/lib/jvm/java-6-sun/jre
PS:在运行./runInstaller前,在一台windows机器上安装NetSarang Xmanager Enterprise 3.0.0208,并且运行
xmanager –Passive模式,运行./runInstaller后,在安装了NetSarang Xmanager Enterprise的机器上就会弹出
oracle的安装界面
启动Xmanager - Passive模式:
步骤一:输入电子邮件地址
步骤二:我们选择仅安装数据库软件,数据库等安装完后再自行创建
步骤三:
步骤四:选择产品语言
步骤五:选择数据库版本
步骤六:确定安装位置
步骤七:
步骤八:操作系统组
步骤九:先决条件检查
先决条件检查环境后,选择“全部忽略”,可以放心,按上面的软件安装,一定可以成功安装的
步骤十:概要
步骤十一:
文件复制的过程比较慢,耐心等待
链接二进制文件也需要几分钟时间
安装程序文件这个过程比较长
待“安装程序文件”过程结束后,在secureCRT中另开一个连接,用root用户登录,执行这两个脚本就可以
步骤十二:
执行完后,点确定,ORACLE就安装完成了
PS:安装过程中,对于Debian/Ubuntu,在SecureCRT中,有如下的错误提示,不用管它,对安装数据库没有
丝毫影响
最后执行以下命令,让Oracle的其他GUI程序都是界面显示中文
cp /usr/share/fonts/truetype/wqy/wqy-zenhei.ttf /var/oracle/product/11.2.0/db_1/jdk/jre/lib/fonts/

分类:

技术点:

相关文章: