iis服务器助手广告广告
返回顶部
首页 > 资讯 > 数据库 >RHEL7安装Oracle 11G R2
  • 528
分享到

RHEL7安装Oracle 11G R2

2024-04-02 19:04:59 528人浏览 八月长安
摘要

oracle 11G R2 安装 实验环境:RHEL7.4 x64 最简安装数据库版本: Oracle 11G R2IP 地址:192.168.10.133linux连接工具: xmanager 5 /

oracle 11G R2 安装

实验环境:RHEL7.4 x64 最简安装
数据库版本: Oracle 11G R2
IP 地址:192.168.10.133
linux连接工具: xmanager 5 //也可以直接使用图形安装Linux无需工具
程序包下载:官网下载


Database安装步骤

1.  修改系统主机名,hosts文件,系统参数
2.  添加用户和组信息,创建Oracle安装目录
3.  修改用户环境变量
4.  开始安装(安装linux组件,上传Oracle程序包,并解压运行安装)
4.  DBCA建库

一. 完善系统信息

1. 修改主机名
[root@localhost ~]# hostname
localhost.localdomain    ##Oracle数据库的安装在生产中要慎重考虑主机名,避免二次修改。
[root@localhost ~]# hostnamectl set-hostname oracle.example.com
[root@localhost ~]# hostnamectl    ##验证是否成功

2. 添加hosts解析条目
[root@localhost ~]# cat << EOF >> /etc/hosts
> 192.168.10.133 oracle.example.com oracle
> EOF

3.下列参数写入到/etc/sysctl.conf文件中
[root@localhost ~]# cat /etc/sysctl.conf
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
# semaphores: semmsl, semmns, semopm, semmni
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
[root@localhost ~]# /sbin/sysctl -p   //执行生效

4. 添加下列参数到/etc/security/limits.conf 
oracle              soft    nproc   2047
oracle              hard    nproc   16384
oracle              soft    nofile  4096
oracle              hard    nofile  65536
oracle              soft    stack   10240

5.添加下列条目到/etc/pam.d/login
session    required     pam_limits.so  ##复制到session相同字段即可

二. 添加用户和用户组信息

1. 创建用户和组信息
[root@localhost ~]# groupdel oinstall
[root@localhost ~]# groupadd -g 2000 oinstall
[root@localhost ~]# groupadd -g 2001 dba
[root@localhost ~]# groupadd -g 2002 oper
[root@localhost ~]# useradd -g oinstall -G 2000,2001,2002 oracle
[root@localhost ~]# echo oracle | passwd --stdin oracle
Changing passWord for user oracle.
passwd: all authentication tokens updated successfully.
[root@localhost ~]# id oracle
uid=1000(oracle) gid=2000(oinstall) groups=2000(oinstall),2001(dba),2002(oper)

2.创建目录结构
[root@localhost ~]# mkdir /u01/app/oracle/product/11.2.0.4/dbhome_1 -p
[root@localhost ~]# chown -R oracle.oinstall /u01 
[root@localhost ~]# chmod -R 775 /u01

三. 开始安装

1. 安装程序组件
yum install binutils -y
yum install compat-libstdc++-33 -y
yum install GCc -y
yum install gcc-c++ -y
yum install glibc -y
yum install glibc-devel -y
yum install ksh -y
yum install libgcc -y
yum install libstdc++ -y
yum install libstdc++-devel -y
yum install libaio -y
yum install libaio-devel -y
yum install libXext -y
yum install libXtst -y
yum install libX11 -y
yum install libXau -y
yum install libxcb -y
yum install libXi -y
yum install make -y
yum install sysstat -y
yum install unixODBC -y
yum install unixODBC-devel -y
yum install zlib-devel -y
yum install elfutils-libelf-devel -y
[root@oracle ~]#  rpm -ivh Http://rpmfind.net/linux/Centos/7.4.1708/os/x86_64/Packages/compat-libstdc++-33-3.2.3-72.el7.x86_64.rpm
注意:  pdksh的一个组件,由于是el5版本的,在rhel7环境可无需安装

2. 如果您是跟着我是最小安装,那么您需要在root环境下安装支持"xhost +"命令的工具
[root@oracle ~]# yum provides xhost
[root@oracle ~]# yum -y install xorg-x11-server-utils
  1. 将下载的数据库程序包上传到Oracle用户/home/oracle目录,xmanager工具自带xftp非常方便。
    RHEL7安装Oracle 11G R2

4. 修改oracle用户环境变量
[oracle@oracle ~]$ su - oracle
[oracle@oracle ~]$ cat .bash_profile 
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
    . ~/.bashrc
fi

# User specific environment and startup programs
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0.4/dbhome_1
export ORACLE_SID=ORACLE
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
PATH=$PATH:$HOME/.local/bin:$HOME/bin:$ORACLE_HOME/bin
export PATH

[oracle@oracle ~]$ source .bash_profile  

5. 将下载的数据库程序包上传到Oracle用户/home/oracle目录并按编号解压
[oracle@oracle ~]$ unzip linux.x64_11gR2_database_1of2.zip
[oracle@oracle ~]$ unzip linux.x64_11gR2_database_2of2.zip
[oracle@oracle ~]$ export DISPLAY=192.168.10.1:0.0  //此IP在当前虚拟机使用的虚拟网卡中获得。
[oracle@oracle ~]$ ./database/runInstaller  //执行安装程序

安装截图

  1. 由于是测试,跳过email登录
    RHEL7安装Oracle 11G R2
  2. 跳过更新
    RHEL7安装Oracle 11G R2
  3. 选择只安装软件(后期使用DBCA或手工建库)
    RHEL7安装Oracle 11G R2
  4. 选择单实例安装(后面是集群安装和集群节点)
    RHEL7安装Oracle 11G R2
  5. 建议使用英文安装,这里我直接下一步
    RHEL7安装Oracle 11G R2
  6. 选择安装企业版
    RHEL7安装Oracle 11G R2
  7. 这里是oracle安装的目录,这是我们前面写的环境变量生效的效果,确认直接下一步
    RHEL7安装Oracle 11G R2
  8. 这里是Oracle产品安装清单,确认之前下一步
    RHEL7安装Oracle 11G R2
  9. Oracle检测到系统参数需要修改,点击需要修复读警告,选择 Fix& Check Again进行修复
    RHEL7安装Oracle 11G R2
    复制脚本,以root用户执行,执行成功后点击OK完成修复
    [root@oracle ~]# /tmp/CVU_11.2.0.4.0_oracle/runfixup.sh
    RHEL7安装Oracle 11G R2
  10. 注意是如果: 有组件需要安装,在生产环境是不能忽略的,需要全部安装
    安装步骤推荐:
    RHEL7安装Oracle 11G R2
    [root@oracle ~]# yum -y install xxxx
  11. 完成以上步骤,进行安装
    RHEL7安装Oracle 11G R2
  12. 这里出现报错,此报错为Oracle在RHEL7上允许的漏洞,需要修改参数
    RHEL7安装Oracle 11G R2
    [oracle@oracle ~]$ vi /u01/app/oracle/product/11.2.0.4/dbhome_1/sysman/lib/ins_emagent.mk
    RHEL7安装Oracle 11G R2 //后面添加 "-lnnz11"字段。
    修改后点击Retry重试:
    RHEL7安装Oracle 11G R2
  13. Oracle让我们安装脚本,两个脚本完成后点击OK继续,第二个脚本一路按回车。
    RHEL7安装Oracle 11G R2
    RHEL7安装Oracle 11G R2
    完成安装
    RHEL7安装Oracle 11G R2

四. DBCA建库

[oracle@oracle ~]$ lsnrctl start
[oracle@oracle ~]$ dbca

  1. 下一步
    RHEL7安装Oracle 11G R2
    2.创建数据库
    RHEL7安装Oracle 11G R2
    RHEL7安装Oracle 11G R2
    3.设置全局名和SID(实例名)
    RHEL7安装Oracle 11G R2
  2. 配置EM
    RHEL7安装Oracle 11G R2
  3. 配置系统用户密码,我选择了全部都设置为一个密码,在生产中,建议各个密码不一样而且复杂
    RHEL7安装Oracle 11G R2
  4. 存储类型选择File System
    RHEL7安装Oracle 11G R2
    RHEL7安装Oracle 11G R2
    RHEL7安装Oracle 11G R2
    8.设置需要分配Oracle内存的大小
    RHEL7安装Oracle 11G R2
    字符集建议设置为(AL32UTF8)
    RHEL7安装Oracle 11G R2
    RHEL7安装Oracle 11G R2
    RHEL7安装Oracle 11G R2
    开始创建点击Finish
    RHEL7安装Oracle 11G R2
    配置完成exit退出
    RHEL7安装Oracle 11G R2

连接数据库

[oracle@oracle ~]$ sqlplus / as sysdba
SQL> select status from v$instance; //查看数据库状态
STATUS
-------------
OPEN
您可能感兴趣的文档:

--结束END--

本文标题: RHEL7安装Oracle 11G R2

本文链接: https://www.lsjlt.com/news/41166.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
  • RHEL7安装Oracle 11G R2
    Oracle 11G R2 安装 实验环境:RHEL7.4 x64 最简安装数据库版本: Oracle 11G R2IP 地址:192.168.10.133Linux连接工具: xmanager 5 /...
    99+
    2022-10-18
  • oracle 11g-R2安装
    f 附件:http://down.51cto.com/data/2367194...
    99+
    2022-10-18
  • rhel7 安装11g rac
    Installation walk-through - Oracle Grid/RAC 11.2.0.4 on Oracle Linux 7 (文档 ID 1951613.1) 在这个文档中,1...
    99+
    2022-10-18
  • Oracle 11g R2 安装和配置
    --=========== 0: XServer准备安装XServer,配置XShell--Xming,Xmanager,Vcxsrv--=========== 1: 磁盘分区和挂载cd /etc/yum....
    99+
    2022-10-18
  • OEL5.5如何安装Oracle 11g R2 RAC
    小编给大家分享一下OEL5.5如何安装Oracle 11g R2 RAC,希望大家阅读完这篇文章之后都有所收获,下面让我们一起去探讨吧! 1.安装前的准备: 操作系统:oracl...
    99+
    2022-10-19
  • CentOS7 终端静默安装 Oracle 11g R2
    一、环境准备安装包:linux.x64_11gR2_database_1of2.zip  linux.x64_11gR2_database_2of2.zip下载地址:http://downloa...
    99+
    2022-10-18
  • oracle 11g R2 64位 安装详细步骤
    (oracle 11g R2 64位 + PLSQLDeveloper安装说明以及PLSQL Developer+ ORCALE11-instantclient-basic-win32-11.2.0.1.0...
    99+
    2022-10-18
  • 关于安装oracle 11G R2 for Windows X64问题
    下载地址:http://www.oracle.com/technetwork/cn/articles/112010-win64soft-094461.html #*特殊说明*#关于下载工具的使用:千万千万不...
    99+
    2022-10-18
  • linux上安装Oracle 11g R2 标准版 64位
    一.Oracle 安装前的准备检查一下包,必须全部安装:binutils-2.20.51.0.2-5.43.el6.x86_64compat-libstdc++-296-2.96-144.el6.i686c...
    99+
    2022-10-18
  • 静默安装Oracle及创建数据库11G R2
    oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0 oracle.inst...
    99+
    2022-10-18
  • 怎么在Centos7中安装Oracle 11G R2数据库
    这篇文章主要讲解了“怎么在Centos7中安装Oracle 11G R2数据库”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“怎么在Centos7中安装Ora...
    99+
    2022-10-18
  • Oracle 11g R2 进程
    用户进程 ps –elf | grep oracleorcl|grep –v grep数据库进程 ps –elf |grep oracleorcl守护进程 Ps –elf |grep oha大池:在SGA中...
    99+
    2022-10-18
  • Oracle 11g R2 Snapshot Standby
    Oracle 11g引入Snapshot Standby,允许standby database以read-write模式打开。当切换回standby模式,所有在read-write模式的修改都丢失。它是通过...
    99+
    2022-10-18
  • Oracle 11g R2 视图
    视图是一个虚表,不占用物理空间,因为视图本身的定义语句存储在数据字典里。视图中的数据是从一个或多个实际的表中获得。 物化视图:也成实体化视图,含有实际数据,占用存储空间,在数据仓库中经常应用物化视图 创建视...
    99+
    2022-10-18
  • Oracle 11g R2 索引
    索引是oracle提供的一个对象,提供了一种快速访问数据的途径,提高了数据库的检索性能。索引使数据库程序无需对整个表进行全表扫描,就可以在其中找到所需要的数据,就想书的目录,可以通过他快速查找所需信息,无需...
    99+
    2022-10-18
  • Oracle 11g R2 ADG 运维
    --================ Oracle ADG 运维 ================--========测试日志传输========1.在primary上,查看最后归档的日志,强制日志切换AL...
    99+
    2022-10-18
  • Oracle 11g R2 ADG 搭建
    --============Oracle ADG搭建==============--==========准备阶段=========1.检查primary为archivelog模式。select l...
    99+
    2022-10-18
  • Oracle 11g R2 ADG 监控
    --===============在standby监控DG的恢复过程==================v$managed_standbyv$archived_standbyv$archive_desc_s...
    99+
    2022-10-18
  • oracle 11g r2 em 乱码
    我的系统是redhat 5.5 64位,oracle为11G R2oracle 11g使用的是jdk1.5,jdk1.5以后有了一个简便方法来解决这个问题,只需在$JAVA_HOME/jre/lib/fon...
    99+
    2022-10-18
  • 如何在Linux 7中使用脚本安装oracle 11g r2
    今天就跟大家聊聊有关如何在Linux 7中使用脚本安装oracle 11g r2,可能很多人都不太了解,为了让大家更加了解,小编给大家总结了以下内容,希望大家根据这篇文章可以有所收获。什么是Linux系统L...
    99+
    2022-10-18
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作