重庆思庄Oracle、Redhat认证学习论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 3455|回复: 0
打印 上一主题 下一主题

[升级] Centos7.8安装11G并升级至19C

[复制链接]
跳转到指定楼层
楼主
发表于 2020-5-22 16:51:10 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 windjack 于 2020-5-22 17:13 编辑

Centos7.8  安装11.2.0.4  并升级到19.3 完整测试文档

环境介绍
VM版本:VMware® Workstation 15 Pro
OS版本:CentOS Linux release 7.8.2003(Core) x86_64
ORACLE:11.2.0.4 UPGRADE TO 19.3.0
HOSTNAME:dbserver
HOST-IP:192.168.133.120
OS磁盘(boot和/):40G
ORACLE软件安装磁盘:/dev/sdb1,挂载点/u01,大小40G
ASM磁盘:oracleasm_lib(data01至data07,2G一块,共14G,其中4块用于数据盘,3块用于快速恢复区)
11g GI BASE:/u01/app/grid
11g GI HOME:/u01/app/grid/product/11.2.0/grid
11g DB BASE:/u01/app/oracle
11g DB HOME:/u01/app/oracle/product/11.2.0/db_1
19c GI BASE:/u01/app/grid
19c GI HOME:/u01/app/grid/product/19.3.0/grid
19c DB BASE:/u01/app/oracle
19c DB HOME:/u01/app/oracle/product/19.3.0/db_1
安装文件目录:/setup

上传所有需要的文件到/setup
oracleasmlib:kmod-oracleasm-2.0.8-21.0.1.el7.x86_64.rpm
      oracleasmlib-2.0.12-1.el7.x86_64.rpm
       oracleasm-support-2.1.11-2.el7.x86_64.rpm
11g db:      p13390677_112040_Linux-x86-64_1of7.zip
        p13390677_112040_Linux-x86-64_2of7.zip
11g gi:      p13390677_112040_Linux-x86-64_3of7.zip
11g gi补丁    p18370031_112040_Linux-x86-64.zip
11g PSU:     p30805461_112040_Linux-x86-64.zip
Opatch:      p6880880_112000_Linux-x86-64_3.25.zip
19C db:      LINUX.X64_193000_db_home.zip
19C gi:      LINUX.X64_193000_grid_home.zip

关闭防火墙
[root@dbserver ~]# systemctl stop firewalld.service
[root@dbserver ~]# systemctl disable firewalld.service     

关闭Selinux
[root@dbserver ~]# vim /etc/selinux/config
SELINUX=disabled

修改hosts
[root@dbserver ~]# vim /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4localhost4.localdomain4
::1         localhost localhost.localdomainlocalhost6 localhost6.localdomain6
192.168.133.120 dbserver

挂载ISO文件到/mnt
[root@dbserver yum.repos.d]#mount -t iso9660 /dev/sr0 /mnt
mount: /dev/sr0 iswrite-protected, mounting read-only
配置本地ISO YUM源
[root@dbserver yum.repos.d]# vim iso.repo
[base]
name=yum source
baseurl=file:///mnt
enabled=1
gpgcheck=0
[root@dbserver yum.repos.d]# yum makecache

磁盘分区
[root@dbserver ~]# fdisk /dev/sdb
创建文件系统
[root@dbserver ~]# mxfs -t xfs/dev/sdb1
创建挂载点
[root@dbserver ~]# mkdir /u01
设置永久挂载点:
[root@dbserver ~]# vim /etc/fstab
加入这一行:    /dev/sdb1 /u01  xfs defaults 0 0

创建组
[root@dbserver ~]# groupadd dba
[root@dbserver ~]# groupadd oinstall
[root@dbserver ~]# groupadd oper
[root@dbserver ~]# groupadd asmdba
[root@dbserver ~]# groupadd asmadmin
[root@dbserver ~]# groupadd asmoper
创建用户
[root@dbserver ~]# useradd -g oinstall -G dba,asmadmin,asmdba,asmoper grid
[root@dbserver ~]# useradd -g oinstall -G dba,oper,asmdba oracle
修改用户密码
[root@dbserver ~]# echo "oracle" |passwd --stdin oracle
[root@dbserver ~]# echo "grid" |passwd --stdin grid
创建目录
[root@dbserver ~]# mkdir -p/u01/app/grid
[root@dbserver ~]# mkdir -p/u01/app/grid/product/11.2.0/grid
[root@dbserver ~]# mkdir -p/u01/app/grid/product/19.3.0/grid
[root@dbserver ~]# mkdir -p/u01/app/oracle
[root@dbserver ~]# mkdir -p/u01/app/oracle/product/11.2.0/db_1
[root@dbserver ~]# mkdir -p/u01/app/oracle/product/19.3.0/db_1
分配权限
[root@dbserver ~]# chown -R grid:oinstall /u01/app
[root@dbserver ~]# chown -R oracle:oinstall /u01/app/oracle
[root@dbserver ~]# chmod -R 775/u01/app

设置grid用户环境变量
[root@dbserver ~]# su - grid
[grid@dbserver ~]$ vim .bash_profile
export ORACLE_SID=+ASM
export ORACLE_BASE=/u01/app/grid
exportORACLE_HOME=/u01/app/grid/product/11.2.0/grid
exportPATH=$ORACLE_HOME/bin:$PATH

设置oracle用户环境变量
[root@dbserver ~]# su - oracle
[grid@dbserver ~]$ vim .bash_profile
export ORACLE_SID=orcl
exportORACLE_BASE=/u01/app/oracle
exportORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
exportPATH=$ORACLE_HOME/bin:$PATH

安装oracleasmlib
[root@dbserver setup]# rpm -ivh oracleasmlib-2.0.12-1.el7.x86_64.rpm oracleasm-support-2.1.11-2.el7.x86_64.rpm kmod-oracleasm-2.0.8-26.0.1.el7.x86_64.rpm

初始化oracleasm
[root@dbserver u01]# oracleasm configure -i
Configuring the Oracle ASMlibrary driver.
This will configure the on-boot propertiesof the Oracle ASM library
driver.  The following questions will determinewhether the driver is
loaded on boot and whatpermissions it will have.  The currentvalues
will be shown in brackets('[]').  Hitting <ENTER> withouttyping an
answer will keep that currentvalue.  Ctrl-C will abort.
Default user to own the driverinterface []: grid
Default group to own the driverinterface []: asmadmin
Start Oracle ASM library driveron boot (y/n) [n]: y
Scan for Oracle ASM disks onboot (y/n) [y]: y
Writing Oracle ASM librarydriver configuration: done

[root@dbserver u01]# oracleasm init

ASM磁盘分区(每个磁盘分一个区)
[root@dbserver ~]# fdisk /dev/sdc
[root@dbserver ~]# fdisk /dev/sdd
[root@dbserver ~]# fdisk /dev/sde
[root@dbserver ~]# fdisk /dev/sdf
[root@dbserver ~]# fdisk /dev/sdg
[root@dbserver ~]# fdisk /dev/sdh
[root@dbserver ~]# fdisk /dev/sdi
分区生效
[root@dbserver ~]# partprobe

创建ASM盘
[root@dbserver ~]# oracleasm createdisk data01 /dev/sdc1
Writing disk header: done
Instantiating disk: done
[root@dbserver ~]# oracleasm createdisk data02 /dev/sdd1
Writing disk header: done
Instantiating disk: done
[root@dbserver ~]# oracleasm createdisk data03 /dev/sde1
Writing disk header: done
Instantiating disk: done
[root@dbserver ~]# oracleasm createdisk data04 /dev/sdf1
Writing disk header: done
Instantiating disk: done
[root@dbserver ~]# oracleasm createdisk data05 /dev/sdg1
Writing disk header: done
Instantiating disk: done
[root@dbserver ~]# oracleasm createdisk data06 /dev/sdh1
Writing disk header: done
Instantiating disk: done
[root@dbserver ~]# oracleasm createdisk data07 /dev/sdi1
Writing disk header: done
Instantiating disk: done
查看创建ASM盘信息:
[root@dbserver ~]# oracleasm listdisks
DATA01
DATA02
DATA03
DATA04
DATA05
DATA06
DATA07

安装相关的系统依赖包
yum -y install gcc gcc-c++ make binutils compat-libstdc++-33 glibc glbic-devel libaio libaio-devel libgcc libstdc++ libstdc++-devel unixODBC-devel sysstat ksh unzip compat-libcap*


解压目录的创建
[root@dbserver ~]# mkdir /setup/oracle/
[root@dbserver ~]# mkdir /setup/grid
[root@dbserver ~]# chown grid:oinstall /setup/grid
[root@dbserver ~]# chown oracle:oinstall /setup/oracle


安装11G GI
[root@dbserver ~]# su - grid
[grid@dbserver ~]unzip p13390677_112040_Linux-x86-64_3of7.zip -d /setup/grid/
设置DISPLAY环境变量
[grid@dbserver ~]$ expor tDISPLAY=192.168.133.1:0.0
开启Xmanager passsive
在WINDOWS宿主机安装了XMANAGER后,就有该工具
在WINDOWS宿主机命令行输入或者直接双击打开:Xmanager - Passive
[grid@dbserver ~]$ cd /u01/setup/grid/grid/
[grid@dbserver grid]$./runInstaller
...
...
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 支持支持 反对反对
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|手机版|小黑屋|重庆思庄Oracle、Redhat认证学习论坛 ( 渝ICP备12004239号-4 )

GMT+8, 2024-11-27 01:42 , Processed in 0.155877 second(s), 23 queries .

重庆思庄学习中心论坛-重庆思庄科技有限公司论坛

© 2001-2020

快速回复 返回顶部 返回列表