Oracle单实例的安装文档网上比比皆是,其中也不乏很好的文章,其实oracle最好的安装文档莫过于联机手册,但是手册的安装步骤太过详细,所以很多大侠为了方便就整理了许多不同版本的安装文档,本人自学oracle已经快一年了,学到的也只是皮毛,但是谈起安装oracle,特别是11g R2,那还是有一点点心得的,大概是走过太多的弯路,下面来简要介绍下silent方式安装oracle软件,配置监听器,创建数据库的操作步骤

  1. 一:检查服务器的存储环境,各个版本的oracle安装需求都不一样,以oracle联机文档为准
  2. [root@localhost ~]# df -h /u01
  3. Filesystem            Size  Used Avail Use% Mounted on
  4. /dev/mapper/VolGroup00-lv_www
  5. 160G  188M  152G   1% /u01
  6. [root@localhost ~]# grep MemTotal /proc/meminfo
  7. MemTotal:      1351664 kB
  8. [root@localhost ~]#  grep SwapTotal /proc/meminfo
  9. SwapTotal:     4096564 kB
  10. [root@localhost ~]#  df -h /tmp
  11. Filesystem            Size  Used Avail Use% Mounted on
  12. /dev/sda3             1.9G   36M  1.8G   2% /tmp
  13. 二:检查服务器软件环境,下面的包都可以在系统光盘上找到
  14. The following packages (or later versions) must be installed:
  15. binutils-2.17.50.0.6
  16. compat-libstdc++-33-3.2.3
  17. elfutils-libelf-0.125
  18. elfutils-libelf-devel-0.125
  19. elfutils-libelf-devel-static-0.125
  20. gcc-4.1.2
  21. gcc-c++-4.1.2
  22. glibc-2.5-24
  23. glibc-common-2.5
  24. glibc-devel-2.5
  25. glibc-headers-2.5
  26. kernel-headers-2.6.18
  27. ksh-20060214
  28. libaio-0.3.106
  29. libaio-devel-0.3.106
  30. libgcc-4.1.2
  31. libgomp-4.1.2
  32. libstdc++-4.1.2
  33. libstdc++-devel-4.1.2
  34. make-3.81
  35. numactl-devel-0.9.8.i386
  36. sysstat-7.0.2
  37. 三:修改内核参数如下,并使其生效
  38. [root@localhost ~]# vi /etc/sysctl.conf
  39. fs.aio-max-nr = 1048576
  40. fs.file-max = 6815744
  41. kernel.shmall = 2097152
  42. kernel.shmmax = 536870912
  43. kernel.shmmni = 4096
  44. kernel.sem = 250 32000 100 128
  45. net.ipv4.ip_local_port_range = 9000 65500
  46. net.core.rmem_default = 262144
  47. net.core.rmem_max = 4194304
  48. net.core.wmem_default = 262144
  49. net.core.wmem_max = 1048586
  50. [root@localhost ~]# sysctl -p
  51. 四:添加oracle用户和相关的组,若使用ASM自动存储管理,需要添加额外的几个组,具体可以参考联机文档
  52. [root@localhost ~]# /usr/sbin/groupadd oinstall
  53. [root@localhost ~]# /usr/sbin/groupadd dba
  54. [root@localhost ~]# /usr/sbin/groupadd oper
  55. [root@localhost ~]# /usr/sbin/useradd -g oinstall -G dba,oper -d /u01/oracle oracle
  56. [root@localhost ~]# id oracle
  57. uid=500(oracle) gid=500(oinstall) groups=500(oinstall),501(dba),502(oper)
  58. [root@localhost ~]# echo 'oracle' |passwd --stdin oracle
  59. Changing password for user oracle.
  60. passwd: all authentication tokens updated successfully.
  61. 五:修改oracle用户的系统资源限制和权限
  62. [root@localhost ~]# grep 'limits' /etc/pam.d/system-auth
  63. session     required      pam_limits.so
  64. [root@localhost ~]# vi /etc/security/limits.conf
  65. oracle              soft    nproc   2047
  66. oracle              hard    nproc   16384
  67. oracle              soft    nofile  1024
  68. oracle              hard    nofile  65536
  69. oracle              soft    stack   10240
  70. [root@localhost ~]# chown -R oracle.oinstall /u01/
  71. 六:创建oratab文件(该文件用于控制oracle的自动启动和关闭,也可用service脚本实现)和清单目录
  72. [root@localhost ~]# touch /etc/oratab
  73. [root@localhost ~]# cat /etc/oraInst.loc
  74. inventory_loc=/u01/oraInventory
  75. inst_group=oinstall
  76. 七:配置主机名和解析,需要重启才能生效
  77. [root@localhost ~]# vi /etc/sysconfig/network
  78. NETWORKING=yes
  79. NETWORKING_IPV6=yes
  80. HOSTNAME=redora.766.com
  81. [root@localhost ~]# vi /etc/hosts
  82. 127.0.0.1               localhost.localdomain localhost
  83. ::1                     localhost6.localdomain6 localhost6
  84. 192.168.50.195          redora.766.com  redora
  85. 八:配置oracle用户环境变量
  86. [root@redora ~]# su - oracle
  87. [oracle@redora ~]$ vi .bash_profile
  88. ORACLE_BASE=/u01
  89. ORACLE_HOME=/u01/oracle
  90. ORACLE_SID=orac
  91. PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin:$PATH
  92. export PATH ORACLE_BASE ORACLE_HOME ORACLE_SID
  93. [oracle@redora ~]$ source .bash_profile
  94. [oracle@redora ~]$ env |grep ORA
  95. ORACLE_SID=orac
  96. ORACLE_BASE=/u01
  97. ORACLE_HOME=/u01/oracle
  98. 九:上传oracle软件包到服务器并解压
  99. [oracle@redora ~]$ cd /u01/
  100. [oracle@redora u01]$ unzip linux.x64_11gR2_database_1of2.zip
  101. [oracle@redora u01]$ unzip linux.x64_11gR2_database_2of2.zip
  102. [oracle@redora~]$ ls /u01/database/response/
  103. dbca.rsp  db_install.rsp  netca.rsp

十:配置DISPLAY环境变量,(这里使用win7上的secureCRT软件和xmanager软件连接服务器,xmanager软件需要开启被动模式)因为是第一次安装oracle,所以需要一个模板响应文件,若存在这个文件,可以直接跳过这步(网上介绍采用 -record -destinationFile 选项记录安装文件的方式在11g R2中不适用)
[oracle@redora ~]$ export  DISPLAY=192.168.50.40:0
[oracle@redora database]$ ./runInstaller  //使用图形化工具选择安装oracle软件的选项,在最后选择保存响应文件并退出,如下图所示:

  1. 十一:使用响应文件安装oracle软件
  2. [oracle@redora database]$ ./runInstaller -silent -responseFile /u01/oracle/auto_install_db.rsp
  3. Starting Oracle Universal Installer...
  4. Checking Temp space: must be greater than 120 MB.   Actual 1800 MB    Passed
  5. Checking swap space: must be greater than 150 MB.   Actual 4000 MB    Passed
  6. [INS-32016] The selected Oracle home contains directories or files.
  7. CAUSE: The selected Oracle home contained directories or files.
  8. ACTION: To start with an empty Oracle home, either remove its contents or choose another location.
  9. [WARNING] [INS-32016] The selected Oracle home contains directories or files.
  10. CAUSE: The selected Oracle home contained directories or files.
  11. ACTION: To start with an empty Oracle home, either remove its contents or choose another location.
  12. You can find the log of this install session at:
  13. /u01/oraInventory/logs/installActions2010-12-27_10-03-09PM.log
  14. [WARNING] [INS-32016] The selected Oracle home contains directories or files.
  15. CAUSE: The selected Oracle home contained directories or files.
  16. ACTION: To start with an empty Oracle home, either remove its contents or choose another location.
  17. The following configuration scripts need to be executed as the "root" user.
  18. #!/bin/sh
  19. #Root scripts to run
  20. /u01/oracle/root.sh
  21. To execute the configuration scripts:
  22. 1. Open a terminal window
  23. 2. Log in as "root"
  24. 3. Run the scripts
  25. 4. Return to this window and hit "Enter" key to continue
  26. Successfully Setup Software.
  27. 十二:以root用户身份执行root.sh脚本并验证安装是否成功,可具体查看相关日志
  28. [root@redora ~]# /u01/oracle/root.sh
  29. Check /u01/oracle/install/root_redora.766.com_2010-12-27_22-15-47.log for the output of root script
  30. [oracle@redora ~]$ sqlplus /nolog
  31. SQL*Plus: Release 11.2.0.1.0 Production on Mon Dec 27 22:16:35 2010
  32. Copyright (c) 1982, 2009, Oracle.  All rights reserved.
  33. SQL>
  34. 十三:配置侦听器,需要复制模板文件并修改相关内容如下
  35. [oracle@redora ~]$ cp /u01/database/response/netca.rsp ./
  36. [oracle@redora ~]$ grep -v '^#' netca.rsp  |grep -v '^$'
  37. [GENERAL]
  38. RESPONSEFILE_VERSION="11.2"
  39. CREATE_TYPE="CUSTOM"
  40. [oracle.net.ca]
  41. INSTALLED_COMPONENTS={"server","net8","javavm"}
  42. INSTALL_TYPE=""custom""
  43. LISTENER_NUMBER=1
  44. LISTENER_NAMES={"LISTENER"}
  45. LISTENER_PROTOCOLS={"TCP;1521"}
  46. LISTENER_START=""LISTENER""
  47. NAMING_METHODS={"TNSNAMES","ONAMES","HOSTNAME"}
  48. NSN_NUMBER=1
  49. NSN_NAMES={"EXTPROC_CONNECTION_DATA"}
  50. NSN_SERVICE={"PLSExtProc"}
  51. NSN_PROTOCOLS={"TCP;HOSTNAME;1521"}
  52. [oracle@redora ~]$ netca -silent -responseFile /u01/oracle/netca.rsp
  53. Parsing command line arguments:
  54. Parameter "silent" = true
  55. Parameter "responsefile" = /u01/oracle/netca.rsp
  56. Done parsing command line arguments.
  57. Oracle Net Services Configuration:
  58. Configuring Listener:LISTENER
  59. Listener configuration complete.
  60. Oracle Net Listener Startup:
  61. Running Listener Control:
  62. /u01/oracle/bin/lsnrctl start LISTENER
  63. Listener Control complete.
  64. Listener started successfully.
  65. Profile configuration complete.
  66. Oracle Net Services configuration successful. The exit code is 0
  67. 十四:安装数据库,需要复制模板文件并修改相关内容如下
  68. [oracle@redora ~]$ cp /u01/database/response/dbca.rsp ./
  69. [oracle@redora ~]$ grep -v '^#' dbca.rsp |grep -v '^$'
  70. [GENERAL]
  71. RESPONSEFILE_VERSION = "11.2.0"
  72. OPERATION_TYPE = "createDatabase"
  73. [CREATEDATABASE]
  74. GDBNAME = "redora.766.com"
  75. SID = "orac"
  76. TEMPLATENAME = "General_Purpose.dbc"
  77. [CONFIGUREDATABASE]
  78. EMCONFIGURATION = "LOCAL"
  79. SYSMANPASSWORD = "123456"
  80. DBSNMPPASSWORD = "123456"
  81. [oracle@redora ~]$ dbca -silent -createdatabase -responseFile /u01/oracle/dbca.rsp
  82. Enter SYS user password:
  83. Enter SYSTEM user password:
  84. Copying database files
  85. 1% complete
  86. 3% complete
  87. 11% complete
  88. 18% complete
  89. 26% complete
  90. 37% complete
  91. Creating and starting Oracle instance
  92. 40% complete
  93. 45% complete
  94. 50% complete
  95. 55% complete
  96. 56% complete
  97. 60% complete
  98. 62% complete
  99. Completing Database Creation
  100. 66% complete
  101. 70% complete
  102. 73% complete
  103. 85% complete
  104. 96% complete
  105. 100% complete
  106. Look at the log file "/u01/cfgtoollogs/dbca/redora/redora.log" for further details.
  107. 十五:验证安装是否成功
  108. [oracle@redora ~]$ ps -ef |grep ora  |wc -l
  109. 28
  110. [oracle@redora ~]$ sqlplus /nolog
  111. SQL*Plus: Release 11.2.0.1.0 Production on Mon Dec 27 23:04:34 2010
  112. Copyright (c) 1982, 2009, Oracle.  All rights reserved.
  113. SQL> conn /as sysdba
  114. Connected.
  115. SQL> select sysdate from dual;
  116. SYSDATE
  117. ---------
  118. 27-DEC-10
  119. SQL> show user;
  120. USER is "SYS"
  121. SQL> show sga;
  122. Total System Global Area  551165952 bytes
  123. Fixed Size                  2215224 bytes
  124. Variable Size             339739336 bytes
  125. Database Buffers          201326592 bytes
  126. Redo Buffers                7884800 bytes

RHEL5 Silent方式安装Oracle 11gR2指南相关推荐

  1. linux安装oracle tar,在linux as4上用tar方式安装oracle 10g步骤教程-Oracle

    今天在linux as4上用tar方式安装oracle 10g,下面简单那记录步骤及安装过程中出现的问题. 原数据库所在服务器信息: [oracle@haoc2008 data]$ more /etc ...

  2. 通过复制oracle软件方式安装oracle数据库

    通过复制oracle软件方式安装oracle数据库情况只在以下几种情况下出现. 1.在目标服务器没有安装形图界面的. 2.两操作系统版本一致,本示例同为OEL5.8X64. 3.oracle安装用户u ...

  3. 【DB宝3】在Docker中使用rpm包的方式安装Oracle 19c

    [DB宝3]在Docker中使用rpm包的方式安装Oracle 19c 文章目录 [DB宝3]在Docker中使用rpm包的方式安装Oracle 19c 一.安装Docker软件 二.创建CentOS ...

  4. 让开源解读“甲骨文”--RHEL5.3部署安装Oracle Database10g Release2

    系统环境:RHEL5.3 数据库:Oracle Database10g Release2(10.2.0.1.0) for Linux x86 Oracle Database 10g Release 2 ...

  5. oracle软件静默安装程序,【oracle】静默安装 oracle 11gr2

    [序言] oracle 提供了静默安装方法在不适用图形界面的情况下安装 oracle 软件 ,创建db,配置netca,快速完成oracle 的部署. 在以下情形中可以使用静默安装 a OUI 的 G ...

  6. centOS6.5中静默安装oracle 11gR2

    近日公司租用虚机,需要在虚机上安装oracle11gR2,由于先前从未使用过linux系统,在网上查了一些方法进行安装最后都安装失败,最后经多次试验才发现安装不成功的多数问题都是集中在包或者是权限上, ...

  7. VMware Linux 下安装 Oracle 11gR2 RAC

     文本: 文本 VMware Linnux 下安装 Oracle 11g R2 RAC 虚拟机VMware下安装Linux下载wmware server 2.0http://download.pcho ...

  8. 安装oracle 11gR2单实例+ASM

    安装oracle11gR2单实例+ASM,让新手走向数据库管理员 一.介绍 因业务需要,最近在主系统的基础上搭建一套mini系统,本文只讲ORACLE数据库+ASM磁盘管理工具的安装: 1.服务器系统 ...

  9. CentOS7 上以 RPM 包方式安装 Oracle 18c 单实例

    安装阿里云 YUM 源 https://opsx.alibaba.com/mirror?lang=zh-CN 一.安装Oracle数据库 1.安装 Oracle 预安装 RPM yum -y loca ...

最新文章

  1. Could not find the main class: org.apache.catalina.startup.Boostrap. Program will exit.
  2. 下拉菜单显示 隐藏html,根据在下拉列表中选择的内容隐藏和显示HTML元素
  3. 你真的很熟分布式和事务吗?
  4. 电子书下载 | 超实用!阿里售后专家的 K8s 问题排查案例合集
  5. GAE、SAE与BAE的对比分析
  6. open-capacity-platform STS项目导入
  7. 服务器开发设计之算法宝典
  8. python 学习笔记一
  9. 算算奖学金(洛谷P1051题题解,Java语言描述)
  10. How to create a hyperlink in SQL Server Reporting Services
  11. Terry的学习笔记--ASP.NET MVC 4 HELLO WORLD添加视图(View)
  12. Graph Embedding图嵌入
  13. Python+OpenCV:基于色彩空间转换的目标跟踪
  14. CSS3学习笔记——伪类hover
  15. KB2999226安装提示 此更新不适用你的计算机
  16. Python 汇率换算
  17. EXCEL的去重去除某个字段后全部操作
  18. 论文书写各类常见格式汇总Word版
  19. 安卓桌面软件哪个好_每日提醒软件哪个好?电脑上有什么好用的可以每天提醒的桌面便签软件...
  20. “互联网+”拯救了星巴克,出路是“第四空间

热门文章

  1. CentOS 漏洞修补
  2. 3、循序渐进设计模式-创建型
  3. css内边距与外边距的区别
  4. 2019年python课本_2019年Python学习指南
  5. XDP/eBPF — BPF
  6. Docker 容器技术 — Private Registry
  7. java多线程-CyclicBarrier
  8. OAuth2.0的理解基础
  9. 7.Nginx_Keepalived高可用配置
  10. Unidesk, Citrix 桌面虚拟化方案之新神器