1、首先到官网上下载oracle 11g x64位软件包

下载地址:

http://download.oracle.com/otn/linux/oracle11g/R2/linux.x64_11gR2_database_1of2.zip

http://download.oracle.com/otn/linux/oracle11g/R2/linux.x64_11gR2_database_2of2.zip

2、安装包检测及安装

[root@struggle ~]# rpm -q binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel glibc glibc-common glibc-devel gcc- gcc-c++ libaio-devel libaio libgcc libstdc++ libstdc++-devel make sysstat unixODBC unixODBC-devel pdksh

其中要安装几个32位的包:

    binutils

  compat-libstdc++

  compat-libstdc++(32 bit)

  elfutils-libelf

  elfutils-libelf-devel

  gcc

  gcc-c++

  glibc

  glibc(32 bit)

  glibc-common

  glibc-devel

  glibc-devel(32 bit)

  libaio

  libaio(32 bit)

  libaio-devel

  libgcc

  libgcc (32 bit)

  libstdc++

  libstdc++ (32 bit)

  libstdc++-devel

  make

  sysstat

3、查看内在及swap,对于服务器来说,肯定是没有问题的(如果安装系统时分了swap分区则可以免去这一步)

[root@struggle ~]#  grep MemTotal /proc/meminfo
[root@struggle ~]# grep SwapTotal /proc/meminfo

(1)创建/home/swap分区文件。文件的大小是5120000个block,1个block为1K。

dd if=/dev/zero of=/home/swap bs=1024 count=5120000

(2)把这个分区变成swap分区。

mkswap /home/swap

(3)把它加到fstab里面

echo "/home/swap swap swap defaults 0 0" >> /etc/fstab

4、配置内核

[root@struggle ~]#  vim  /etc/sysctl.conf

# Kernel paramaters required by Oracle 11gR1
fs.file-max = 6815744
fs.aio-max-nr = 1048576
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576

保存并使之生效: [root@struggle ~]# /sbin/sysctl -p

如果有如下提示错误,忽略!

error: "net.bridge.bridge-nf-call-ip6tables" is an unknown key

error: "net.bridge.bridge-nf-call-iptables" is an unknown key

error: "net.bridge.bridge-nf-call-arptables" is an unknown key

注意: kernel.shmmax's 的值是物理内存的一半。

5、对oracle 帐号进行资源限制

[root@struggle ~]# vi /etc/security/limits.conf

oracle soft nproc 2047

oracle hard nproc 16384

oracle soft nofile 1024

oracle hard nofile 65536

6、登录认证配置pam模块

[root@struggle ~]# vim /etc/pam.d/login

session required pam_limits.so
session required /lib/security/pam_limits.so (如果是32位系统则要加上这一句)

7、为oracle用户在bash和ksh中设定资源限制编辑文件

[root@struggle ~]# vim /etc/profile

if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi

8、 创建操作系统用户,作为软件安装和支持组的拥有者

[root@struggle ~]# groupadd oinstall
[root@struggle ~]# groupadd dba
[root@struggle ~]# useradd -g oinstall -G dba oracle
[root@struggle ~]# passwd oracle

9、创建软件安装目录

[root@struggle ~]# mkdir -p /usr/u01/app/
[root@struggle ~]# chown -R oracle:oinstall /usr/u01/
[root@struggle ~]# chmod -R 755 /usr/u01/

10、设置环境变量

[root@struggle ~]# vi /home/oracle/.bash_profile

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi # User specific environment and startup programs PATH=$PATH:$HOME/bin export PATH TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_BASE=/usr/u01/app; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1; export ORACLE_HOME
ORACLE_SID=orcl; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=$ORACLE_HOME/bin:/usr/sbin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib;
export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib;
export CLASSPATH
umask 022

11、将下载的oracle 11g 安装包解压到/home/oracle目录下

[root@struggle ~]# unzip linux.x64_11gR2_database_1of2.zip -d /home/oracle

[root@struggle ~]# unzip linux.x64_11gR2_database_2of2.zip -d /home/oracle

12、进入/home/oracle/database目录下检查文件是否都在

[root@struggle database]# cd /home/oracle/database

[root@struggle database]# ls -al

总用量 44
drwxr-xr-x. 8 root root 4096 8月 21 2009 .
drwx------. 5 oracle oinstall 4096 12月 5 14:19 ..
drwxr-xr-x. 12 root root 4096 8月 17 2009 doc
drwxr-xr-x. 4 root root 4096 8月 15 2009 install
drwxrwxr-x. 2 root root 4096 8月 15 2009 response
drwxr-xr-x. 2 root root 4096 8月 15 2009 rpm
-rwxr-xr-x. 1 root root 3226 8月 15 2009 runInstaller
drwxrwxr-x. 2 root root 4096 8月 15 2009 sshsetup
drwxr-xr-x. 14 root root 4096 8月 15 2009 stage
-rw-r--r--. 1 root root 5402 8月 18 2009 welcome.html

13、关闭防火墙

[root@struggle database]#  service iptables stop

14、安装,用oracle用户登陆

[root@struggle database]# exit

[struggle@struggle ~]$ su - oracle

[oracle@struggle ~]$ cd /home/oracle/database/

[oracle@struggle ~]$./runInstaller -jreLoc /usr/lib/jvm/java-6-sun/jre (我是用自己的JDK安装)

第一步:填写email信息,以便得到支持(需要联网)

第二步:选择创建并配置一个数据库

第三步:选择服务端(看自己情况)

第四步:选择单实例数据库安装

第五步:选择自定义安装

第六步:选择产品语言

第七步:选择要安装的版本

第八步:选择安装路径(配置环境变量进的路径)

第九步:选择数据库实例名:orcl

第十步:选择数据字符集:ZHS16GBK

一路默认安装下去,到十七步的时候oracle检测必须组件,选择ignore all,这样选择安装完oracle后,oracle是可以正常工作的。

机器太卡,传图片太慢。。。

安装完成后进入sqlplus

SQL> sqlplus/nolog

SQL> conn /as sysdba

SQL> startup

配置开机启动:

/usr/u01/app/product/11.2.0/dbhome_1/bin下创建一个开机启动脚本:

[oracle@struggle dbhome_1]$ vim /usr/u01/app/product/11.2.0/dbhome_1/bin/oracledb

#!/bin/bash
## /etc/init.d/oracledb
## Run-level Startup script for the Oracle Listener and Instances
# It relies on the information on /etc/oratab ORACLE_BASE=/usr/u01/app
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
export ORACLE_OWNR=oracle
export PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_SID=orcl
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

修改脚本为可执行的:

[root@struggle ~]# chmod a+x /usr/u01/app/product/11.2.0/dbhome_1/bin/oracledb

创建连接:

[root@struggle ~]# ln -s /usr/u01/app/product/11.2.0/dbhome_1/bin/oracledb /etc/rc.d/init.d/oracledb

授权:

[root@struggle ~]# chmod 755 /etc/rc.d/init.d/

添加服务:

[root@struggle ~]# chkconfig --add oracledb

修改oracle启动配置

[root@struggle ~]# vim /etc/oratab

  orcl:/usr/u01/app/product/11.2.0/dbhome_1:Y

把N改为Y。

测试:

service oracledb stop

service oracledb start

成功!

Linux x64系统上安装 oracle 11g R2 x64的更多相关文章

  1. Oracle Linux 6.3下安装Oracle 11g R2(11.2.0.3)

    本文主要描写叙述了在Oracle Linux 6.3下安装Oracle 11gR2(11.2.0.3).从Oracle 11g開始,Oracle官方站点不再提供其Patch的下载链接,须要使用Meat ...

  2. 在 Oracle Linux 6.5 上安装 Oracle 11g 单实例数据库

    Checking the Hardware Requirements 系统必须满足下面最小的硬件要求 Memory Requirements Minimum: 1 GB of RAMRecommend ...

  3. RHEL6.7 x64双节点安装Oracle 11g r2 RAC

    基础环境 使用两台HP DL580服务器作为RAC节点,存储使用IBM V7000.具体环境如下: 设备 用途 IP地址 磁盘空间 HP DL580 RAC节点01 RAC01-pub:116.1.1 ...

  4. linux上安装Oracle 11g R2 标准版 64位

    一.Oracle 安装前的准备 检查一下包,必须全部安装: binutils-2.20.51.0.2-5.43.el6.x86_64 compat-libstdc++-296-2.96-144.el6 ...

  5. Redhat Linux 下安装Oracle 11g R2

    能够下载:http://download.csdn.net/detail/ykh554541184/8086647文档方便查阅 官方文档:http://docs.oracle.com/cd/E1188 ...

  6. Red Hat Enterprise Linux 6上安装Oracle 11G(11.2.0.4.0)缺少pdksh包的问题

    RHEL 6上安装Oracle 11G警告缺少pdksh包 前言 相信很多刚刚接触学习Oracle的人,在RHEL6上安装11.2.0.3 or 11.2.0.4这两个版本的时候, 都遇到过先决条件检 ...

  7. CentOS 7静默安装Oracle 11g R2数据库软件

    之前安装Oracle 11g R2数据库软件都是建立在图形界面上的,不过现在大部分服务器上都没有安装图形界面.图形界面安装较为方便,安装选项清晰,步骤明确,但Oracle还支持另一种安装方式,就是通过 ...

  8. centos 安装oracle 11g r2(一)-----软件安装

    centos 安装oracle 11g r2(一)-----软件安装 1.进入管理员权限 [anzerong@localhost ~]# su - root password [root@localh ...

  9. 在Windows 10上安装Oracle 11g数据库出现的问题及解决

    在Windows 10上安装Oracle 11g数据库,并且很多次出现过:当安装的进度条进行到快要结束的时候弹出一个提示框.如下: [Java(TM)2 Platform Standard Editi ...

随机推荐

  1. Linux学习之挂载光盘和U盘(六)

    Linux下挂载光盘和U盘 挂载 linux下硬盘.U盘.软盘.移动硬盘都必须挂载后才能使用,不过硬盘的挂载是系统自动进行的. linux中每一个硬件都有一个设备文件名,就是将U盘什么的设备文件名与挂 ...

  2. pandas学习(创建数据,基本操作)

    pandas学习(一) Pandas基本数据结构 Series类型数据 Dataframe类型 基本操作 Pandas基本数据结构 两种常用数据结构: Series 一维数组,与Numpy中的一维ar ...

  3. HTTP协议学习笔记(四)

    HTTP协议学习笔记(四) 与 HTTP 协作的 Web 服务器 一台 Web 服务器可搭建多个独立域名的 Web 网站,也可作为通信路径上的中转服务器提升传输效率. 1.用单台虚拟主机实现多个域名 ...

  4. 收缩自编码器(CAE)

    自编码器是一种很好的降维技术,它可以学习到数据中非常有用的信息.而收缩自编码器作为正则自编码器的一种,其非线性降维效果非常好,并且它的过程可以通过流形知识来解释. 基础知识 1.自编码器 自编码器是一 ...

  5. AM335x启动

    参考文件: 1.TI.Reference_Manual_1.pdf http://pan.baidu.com/s/1c1BJNtm 2.TI_AM335X.pdf http://pan.baidu.c ...

  6. 【随笔】Android应用市场搜索优化(ASO)

    参考了几篇网上的关于Android应用市场搜索优化(ASO)的分析,总结几点如下: 优化关键字:举例目前美团酒店在各Android市场上的关键字有“美团酒店.钟点房.团购.7天”等等,而酒店类竞对在“ ...

  7. Django源代码中model字段

    to_field='绑定的主键字段(默认为ID)' limit_choices_to = {'过滤的choices字段':choices的ID} related_name = 关联表反向查找自己的名称 ...

  8. C# 的枚Enum

    简短的解释: enum 关键字用来声明枚举,一种包含一组被称为枚举数列表的 enum myType{ a, b, c,} int num = 1;Console.Write((myType)num); ...

  9. linux和CentOS下网卡启动、配置等ifcfg-eth0教程(转自)

    转自:http://www.itokit.com/2012/0415/73593.html it 动力总结系统安装好后,通过以下二个步骤就可以让你的系统正常上网(大多正常情况下).步骤1.配置/etc ...

  10. 关闭Ubuntu桌面版GUI

    个人用于实验的Ubuntu虚拟机不需要GUI,且要复制多个,但是又懒得重新装个Ubuntu,打算把现有的带桌面的直接装好克隆起来用,但是多个GUI一起开电脑吃不消,思前想后找了下关闭GUI的方法如下: ...