系统要求
1. Linux安装Oracle系统要求
系统要求 说明
内存 必须高于1G的物理内存
交换空间 一般为内存的2倍,例如:1G的内存可以设置swap 分区为3G大小
硬盘 5G以上
 2.修改操作系统核心参数
在Root用户下执行以下步骤:
1)修改用户的SHELL的限制,修改/etc/security/limits.conf文件
输入命令:vi /etc/security/limits.conf,按i键进入编辑模式,将下列内容加入该文件。
oracle   soft    nproc    2047
oracle   hard    nproc    16384
oracle   soft    nofile     1024
oracle   hard    nofile    65536
编辑完成后按Esc键,输入“:wq”存盘退出
2)修改/etc/pam.d/login 文件,输入命令:vi  /etc/pam.d/login,按i键进入编辑模式,将下列内容加入该文件。
session   required    /lib/security/pam_limits.so 
session   required    pam_limits.so
编辑完成后按Esc键,输入“:wq”存盘退出
3)修改linux内核,修改/etc/sysctl.conf文件,输入命令: vi  /etc/sysctl.conf ,按i键进入编辑模式,将下列内容加入该文件
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
编辑完成后按Esc键,输入“:wq”存盘退出
4)要使 /etc/sysctl.conf 更改立即生效,执行以下命令。 输入:sysctl  -p 显示如下:
linux:~ # sysctl -p
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
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.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 68719476736
kernel.shmall = 4294967296
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
5)编辑 /etc/profile ,输入命令:vi  /etc/profile,按i键进入编辑模式,将下列内容加入该文件。
if [ $USER = "oracle" ]; then 
if [ $SHELL = "/bin/ksh" ]; then 
  ulimit -p 16384 
  ulimit -n 65536 
else 
  ulimit -u 16384 -n 65536 
fi
fi
编辑完成后按Esc键,输入“:wq”存盘退出
6)创建相关用户和组,作为软件安装和支持组的拥有者。
创建用户,输入命令:
groupadd  oinstall 
groupadd  dba
创建Oracle用户和密码,输入命令:
useradd -g oinstall -g dba -m oracle
passwd  oracle
然后会让你输入密码,密码任意输入2次,但必须保持一致,回车确认
此处密码gis123
7)创建数据库软件目录和数据文件存放目录,目录的位置,根据自己的情况来定,注意磁盘空间即可,这里我把其放到oracle用户下,例如:
输入命令:
mkdir /home/oracle/app
mkdir /home/oracle/app/oracle
mkdir /home/oracle/app/oradata
mkdir /home/oracle/app/oracle/product
8)更改目录属主为Oracle用户所有,输入命令:
chown -R oracle:oinstall /home/oracle/app
9)配置oracle用户的环境变量,首先,切换到新创建的oracle用户下,
输入:su – oracle  ,然后直接在输入 : vi .bash_profile
按i编辑 .bash_profile,进入编辑模式,增加以下内容:
umask 022
export ORACLE_BASE=/home/oracle/app
export ORACLE_HOME=$ORACLE_BASE/oracle/product/11.2.0/dbhome_1
export ORACLE_SID=orcl
export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib
编辑完成后按Esc键,输入“:wq”存盘退出
测试环境变量是否有效:
[gis@localhost ~]$ echo $ORACLE_HOME
 
发现为空。执行下面命令
[gis@localhost ~]$ . ./.bash_profile
再次测试,ok
[gis@localhost ~]$ echo $ORACLE_HOME
/home/oracle/app/oracle/product/11.2.0/dbhome_1
安装过程
1) 当上述系统要求操作全部完成后,注销系统,在图形界面以Oracle用户登陆。
目录/opt/database
输入命令:
cd  /opt/database
使用ls命令可以查看解压后database所包含的文件,如下:
[gis@localhost database]$ ls
doc  install  response  rpm  runInstaller  sshsetup  stage  welcome.html
2) 执行安装,输入命令:./runInstaller
[oracle@localhost database]$ ./runInstaller
bash: ./runInstaller: Permission denied
解决办法:
[oracle@localhost database]$ su root
Password: 
[root@localhost database]# chown -R gis:gis  /opt/database
[root@localhost database]# chmod -R 777 /opt/database
[root@localhost database]# su oracle
然后:
Starting Oracle Universal Installer...
 
Checking Temp space: must be greater than 120 MB.   Actual 25959 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 3999 MB    Passed
Checking monitor: must be configured to display at least 256 colors.    Actual 16777216    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2014-03-24_06-36-50PM. Please wait ...
 
 

上一张图可以看到缺失很多的rpm包,可以从安装linux的光盘或ISO中查找所缺的包,上传到linux中,

可以用右键菜单安装一部分rpm,如下。

如不能安装,则root用户下使用rpm  –ivh  xxx.rpm  --nodeps –force 来进行安装(其中加上--nodeps -- force 代表强制安装,是在直接使用rpm –ivh  xxx.rpm安装不成功的情况下用的)安装过程略。如 rpm -ivh libaio-0.3.105-2.i386.rpm --nodeps –-force。
如果一些rpm包一直缺失,可以点击查看下面的信息,i386,i686等+rpm包名称到网络搜索下载。
rpm  -ivh  compat-libstdc++-33-3.2.3-61.i386.rpm --nodeps --force
rpm  -ivh  gcc-c++-4.4.7-3.el6.x86_64.rpm  --nodeps -force
rpm  -ivh  gettext-0.18.3.2-1.fc21.x86_64.rpm  --nodeps --force
rpm  -ivh  glibc-2.3.4-2.54.i686.rpm  --nodeps --force
rpm  -ivh  glibc-2.18-4.4.1.x86_64.rpm  --nodeps --force
rpm  -ivh  libaio-0.3.105-2.i386.rpm  --nodeps --force
rpm  -ivh  libaio-devel-0.3.107-10.el6.i686.rpm  --nodeps --force
rpm  -ivh  libaio-devel-0.3.107-10.el6.x86_64.rpm  --nodeps --force
rpm  -ivh  libgcc-3.4.6-3.i386.rpm  --nodeps --force
rpm  -ivh  libstdc++-3.4.6-11.i386.rpm  --nodeps --force
rpm  -ivh  pdksh-5.2.14-36.el5.i386.rpm  --nodeps --force
rpm  -ivh  redhat-lsb-4.0-3.el6.x86_64.rpm  --nodeps --force
rpm  -ivh  unixODBC-2.2.11-7.1.i386.rpm  --nodeps --force
rpm  -ivh  unixODBC-2.2.14-12.el6_3.x86_64.rpm  --nodeps --force
rpm  -ivh  unixODBC-devel-2.2.11-7.1.i386.rpm  --nodeps --force 
rpm  -ivh  unixODBC-devel-2.2.14-12.el6_3.x86_64.rpm  --nodeps –force
root用户下执行以上语句,安装成功提示:
[root@localhost Downloads]# rpm  -ivh  unixODBC-2.2.11-7.1.i386.rpm  --nodeps --force
warning: unixODBC-2.2.11-7.1.i386.rpm: Header V3 DSA/SHA1 Signature, key ID 37017186: NOKEY
Preparing...                ########################################### [100%]
   1:unixODBC               ########################################### [100%]
 
检查通过时自动跳到Summary页。
 

点击finish开始安装。

安装完成后,系统会提示你需要用root权限执行2个shell脚本。按照其提示的路径,找到其所在的位置,如:我的就在/home/oracle/app/oracle/product/11.2.0/dbhome_1/root.sh

和 /home/oracle/app/oraInventory/orainstRoot.sh  新开启一个终端,输入命令:

su root

cd  /home/oracle/app/oracle/product/11.2.0/dbhome_1

sh  root.sh

cd /home/oracle/oraInventory

sh  orainstRoot.sh

[oracle@localhost ~]$ su root

Password:

[root@localhost oracle]# cd  /home/oracle/app/oracle/product/11.2.0/dbhome_1

[root@localhost dbhome_1]# sh  root.sh

Running Oracle 11g root.sh script...

The following environment variables are set as:

ORACLE_OWNER= oracle

ORACLE_HOME=  /home/oracle/app/oracle/product/11.2.0/dbhome_1

Enter the full pathname of the local bin directory: [/usr/local/bin]:

The file "dbhome" already exists in /usr/local/bin.  Overwrite it? (y/n)

[n]: n

The file "oraenv" already exists in /usr/local/bin.  Overwrite it? (y/n)

[n]: n

The file "coraenv" already exists in /usr/local/bin.  Overwrite it? (y/n)

[n]: n

Entries will be added to the /etc/oratab file as needed by

Database Configuration Assistant when a database is created

Finished running generic part of root.sh script.

Now product-specific root actions will be performed.

Finished product-specific root actions.

[root@localhost dbhome_1]# cd /home/oracle/oraInventory

[root@localhost oraInventory]# sh  orainstRoot.sh

Changing permissions of /home/oracle/oraInventory.

Adding read,write permissions for group.

Removing read,write,execute permissions for world.

Changing groupname of /home/oracle/oraInventory to dba.

The execution of the script is complete.

使用sqlplus测试下。

安装完成。

linux redhat6.4安装oracle11g的更多相关文章

  1. Redhat6.5安装oracle11g

    Redhat6.5安装oracle11g 一.    安装环境 linux服务器:Redhat 6.5 64位 oracle版本:oracle11gR2 远程windows服务器:已安装Xmanage ...

  2. 在Red Hat Enterprise Linux 5 64-bit安装oracle11g r2

    网上这种文档一搜就一堆,没别的目的,刚接触oracle为了加深理解记忆.只要是跟我的版本一样操作系统和oracle软件,按照步骤肯定可以成功安装 在虚拟机上安装Red Hat Enterprise L ...

  3. LINUX系统中安装ORACLE11g的安装文档,含部分问题解答

    1.无法使用命令 /usr/bin/xdpyinfo 自动检查显示器颜色 在linux as5下安装oracle11g,环境都配置好了!等运行./runInstaller的时候无法弹出安装的图形界面我 ...

  4. 分享red hat linux 6上安装oracle11g时遇到的gcc: error trying to exec 'cc1': execvp: No such file or directory的问题处理过程

    安装环境:Red Hat Linux 6.5_x64.oracle11g 64bit 报错详情: 安装到68%时弹窗报错: 调用makefile '/test/app/Administrators/p ...

  5. Redhat6.8安装Oracle11g下遇到两个问题记录

    问题一: 刚刚安装完毕Oracle之后,尝试sqlplus登陆报错,TNS:net service name is incorrectly specified 参考文章:关于环境变量ORACLE_SI ...

  6. linux 环境下安装oracle11g方法及安装过程中遇上的问题解决方法

     Oralce安装教程 1.先安装需要的依赖包 找到哪个没有安装,直接yum install XX,直到所有的都安装完成.注意,可能一个包安装了,再次执行检查,还是提示没有安装,那么就不需要管他们了, ...

  7. 解决linux redhat6下安装git的问题

    今天用到linux上的git安装过程比较曲折,记录一下: 首先会报需要perl rpm -ivh git-1.7.1-14.2.x86_64.rpm warning: git-1.7.1-14.2.x ...

  8. RabbitMQ Linux(Redhat6.5)安装(二 )

    一.安装erlang 由于RabbitMq的linux运行环境需要erlang环境,所以需要先安装erlang: 1.erlang下载: http://erlang.org/download/(我下载 ...

  9. Linux图形界面安装Oracle11G(Centos7)

    以Centos7为列 创建运行Oracle数据库的系统用户和用户组 #切换root用户 [px@localhost /]$ su - root [px@localhost /]$ su - root ...

随机推荐

  1. android开发------编写用户界面之线性布局(补充知识)

    在前面的文章中 http://www.cnblogs.com/ai-developers/p/android_linearlayout.html 我们看到了布局中有这样一个属性: layout_wei ...

  2. Using LINQ to SharePoint

    LINQ and LINQ Providers   LINQ is a feature of the programming languages C# and Microsoft Visual Bas ...

  3. 使用delegate实现简单的查询功能

    protected void imgbtnSearch_Click(object sender, System.Web.UI.ImageClickEventArgs e) { string keyWo ...

  4. 写启动界面Splash的正确姿势,解决启动白屏(转)

    原文链接:http://www.jianshu.com/p/cd6ef8d3d74d 从我学习写第一个android项目以来,我都是这样写着启动界面: 在里面做一些事,比如:第一次启动时拷贝数据. 然 ...

  5. JPA Hibernate应用实例

    1.配置文件:persistence.xml <?xml version="1.0" encoding="UTF-8"?> <persiste ...

  6. VS 远程发布IIS

    <?xml version="1.0" encoding="utf-8"?><!--您 Web 项目的发布/打包进程将使用此文件.您可以通过编 ...

  7. composer更新不成功,启用国内镜像网站的配置更改办法

    通过 composer config -l -g 命令可以列出 composer 的全局配置信息 [home] 配置项就是 composer 的主目录 修改config.json { "co ...

  8. 虚拟机NAT模式无法上网问题的解决办法

    在使用CentOS虚拟机时,出现了无法上网的情况,使用主机ping虚机地址可以ping通,而虚机ping不通主机,同时虚机也无法ping通其他的网址或ip,显示内容为Network is unreac ...

  9. 精通Web Analytics 2.0 (1) 引言

    精通Web Analytics 2.0 : 用户中心科学与在线统计艺术 前言 我对这本书抱有一个简单的愿望,也许是崇高的目标:改变世界对线上事情作决策的方式. 长久以来,我们在线上的举动已经被准确的归 ...

  10. ES5/ES6的区别研究(ECMAScript)

    我所理解的概念应该是语法的区别和特性的区别 这里是ECMAScript的解析http://baike.baidu.com/item/ECMAScript 参考: (ES6)http://es6.rua ...