精华内容
下载资源
问答
  • 2021-05-17 15:46:24

    centos7.6安装Oracle11g

    实测安装成功,参考链接:https://blog.csdn.net/olengyuehun/article/details/88849948

    一 前期准备:

    1.root用户查看磁盘空间:选择较大的路径用于建立用户和数据库的安装(/home)

    # df –lh

     

    2.创建用户和文件路径:

    1创建安装Oracle程序用户组、DBA用户组,创建用户并授权:

    # groupadd oinstall 

    # groupadd dba

    # useradd -g oinstall -G dba oracle

    2修改用户密码:

    # passwd oracle

    3查看新建的用户:

    # id oracle

    4创建Oracle的主目录、配置目录:(可以通过Xftp工具手动创建,后续的配置文件需要按照自己建的目录调整)

    # mkdir -p /home/oracle/Oracle11G

    # mkdir -p /home/oracle/Inventory11G

    5先把下载好的Oracle文件传输到oracle目录下,切换到oracle目录下解压缩,自动生成database目录:

    # cd /home/oracle

    # unzip 对应的压缩文件名称(2)

    6给新建的三个目录授权:

    # chown -R oracle:oinstall /home/oracle/Oracle11G

    # chown -R oracle:oinstall /home/oracle/Inventory11G

    # chown -R oracle:oinstall /home/oracle/database

    3 检查软件包依赖

    输入以下命令:如果有提示未安装的软件包,用命令# yum -y install compat-libstdc++-33-3.2.3(软件包名称)安装对应的软件包即可,完成安装后的效果见下图

    # rpm -q binutils compat-libstdc++ elfutils-libelf elfutils-libelf-devel elfutils-libelf-devel-static gcc gcc-c++ glibc glibc-common glibc-devel glibc-headers kernel-headers ksh libaio libaio-devel libgcc libgomp libstdc++ libstdc++-devel make sysstat unixODBC unixODBC-devel

     

    4 配置核心参数

    1 关闭firewalld防火墙:

    a.查看firewalld防火墙状态:# systemctl status firewalld.service

    b.关闭firewalld防火墙:# systemctl stop firewalld.service

    c.禁止开机使用firewalld防火墙:# systemctl disable firewalld.service

    2 修改文件: /etc/selinux/config(可以手动通过Xftp修改,也可以通过命令:# vi /etc/selinux/config 修改,vi编辑器按i或者a进入编辑模式,修改后输入英文冒号(:)和wq保存退出即可)

    # This file controls the state of SELinux on the system.

    # SELINUX= can take one of these three values:

    #     enforcing - SELinux security policy is enforced.

    #     permissive - SELinux prints warnings instead of enforcing.

    #     disabled - No SELinux policy is loaded.

    SELINUX=disabled      # ********修改此行******

    # SELINUXTYPE= can take one of three two values:

    #     targeted - Targeted processes are protected,

    #     minimum - Modification of targeted policy. Only selected processes are protected.

    #     mls - Multi Level Security protection.

    SELINUXTYPE=targeted

    3 修改CentOS系统标识 (Oracle默认不支持CentOS)

    修改文件: /etc/redhat-release
    将文件所有内容替换为:redhat-7
    # mv redhat-release redhat-7

    4 修改文件:/etc/security/limits.conf

    在文件最后一行,追加以下内容

    oracle soft nproc 2047
    oracle hard nproc 16384
    oracle soft nofile 1024
    oracle hard nofile 65536

    5 修改文件:/etc/sysctl.conf

    将下列内容加入该文件,要使 /etc/sysctl.conf 更改立即生效,保存后执行# sysctl -p 

    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

    6 修改用户环境变量

    修改文件: /home/oracle/.bashrc(需要通过vi编辑模式修改,文件是隐藏的)

    添加一下内容,保存后执行# source /home/oracle/.bashrc

    export PATH

    export ORACLE_BASE=/home/oracle/Oracle11G(对应安装目录)

    export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1

    export ORACLE_SID=orcl

    export ORACLE_UNQNAME=orcl

    export PATH=$ORACLE_HOME/bin:/usr/sbin:$PATH

    export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib

    export LANG=C

    export NLS_LANG= “SIMPLIFIED CHINESE_CHINA”.ZHS16GBK

    7 最后重启系统:# reboot

    二 安装Oracle

    1 切换到oracle用户装数据库

    编辑数据库安装文件:/home/oracle/database/response/db_install.rsp

    将下面配置参数根据安装目录修改:

    oracle.install.option=INSTALL_DB_SWONLY       # 安装类型

    ORACLE_HOSTNAME=oracle.server               # 主机名称

    UNIX_GROUP_NAME=oinstall                    # 安装组

    INVENTORY_LOCATION=/home/oracle/Inventory11G            # INVENTORY目录

    SELECTED_LANGUAGES=en,zh_CN                            # 选择语言

    ORACLE_HOME=/home/oracle/Oracle11G/product/11.2.0/db_1    # oracle_home

    ORACLE_BASE=/home/oracle/Oracle11G                       # oracle_base

    oracle.install.db.InstallEdition=EE                        # oracle版本

    oracle.install.db.DBA_GROUP=dba                            # dba用户组

    oracle.install.db.OPER_GROUP=oinstall                      # oper用户组

    oracle.install.db.config.starterdb.type=GENERAL_PURPOSE    # 数据库类型

    oracle.install.db.config.starterdb.globalDBName=orcl       # globalDBName

    oracle.install.db.config.starterdb.SID=orcl                # SID

    oracle.install.db.config.starterdb.characterSet=AL32UTF8   # 默认数据库编码

    oracle.install.db.config.starterdb.memoryLimit=800         # 自动管理内存的最小内存(M)

    oracle.install.db.config.starterdb.password.ALL=oracle # 设定所有数据库用户使用同一个密码

    DECLINE_SECURITY_UPDATES=true                        # 设置安全更新

    修改完成后输入:# /home/oracle/database/runInstaller -silent -responseFile /home/oracle/database/response/db_install.rsp –ignorePrereq

    正式开始安装Oracle…

    安装成功后的截图:(如果有报错,可以根据具体的报错信息百度处理)

     

    2 切回到root用户运行脚本

    运行脚本:

    # /home/oracle/Inventory11G/orainstRoot.sh

    # /home/oracle/Oracle11G/product/11.2.0/db_1/root.sh

    3 切换到Oracle用户配置监听

    编辑监听配置文件:/home/oracle/database/response/netca.rsp

    根据下面的参数修改:

    INSTALL_TYPE=""custom""                               # 安装的类型

    LISTENER_NUMBER=1                                    # 监听器数量

    LISTENER_NAMES={"LISTENER"}                           # 监听器的名称列表

    LISTENER_PROTOCOLS={"TCP;1521"}                       # 监听器使用的通讯协议列表

    LISTENER_START=""LISTENER""                           # 监听器启动的名称

    保存后输入:# /home/oracle/Oracle11G/product/11.2.0/db_1/bin/netca /silent /responseFile /home/oracle/database/response/netca.rsp

    开启和关闭监听不用执行,上面安装好后,监听会自动开启

    开启监听:# /home/oracle/Oracle11G/product/11.2.0/db_1/bin/lsnrctl start

    关闭监听:# /home/oracle/Oracle11G/product/11.2.0/db_1/bin/lsnrctl stop

    4 添加数据库实例

    修改文件:/home/oracle/database/response/dbca.rsp

    按照参数修改:

    RESPONSEFILE_VERSION ="11.2.0"                              // 不要变

    OPERATION_TYPE ="createDatabase"                            // 操作为创建实例 

    GDBNAME ="orcl"                                             // 数据库实例名

    SID ="orcl"                                                 // 实例名字

    TEMPLATENAME = "General_Purpose.dbc"                        // 建库用的模板文件

    SYSPASSWORD = "oracle"                                      // SYS管理员密码

    SYSTEMPASSWORD = "oracle"                                   // SYSTEM管理员密码

    SYSMANPASSWORD= "oracle"

    DBSNMPPASSWORD= "oracle"

    DATAFILEDESTINATION =/home/oracle/Oracle11G/oradata             // 数据文件存放目录

    RECOVERYAREADESTINATION=/home/oracle/Oracle11G/flash_recovery_area// 恢复数据存放目录

    CHARACTERSET ="AL32UTF8"                                    // 字符集

    NATIONALCHARACTERSET= "AL16UTF16"                           // 字符集

    TOTALMEMORY ="1638"                              // 1638MB,物理内存2G*80%

    保存后输入:# /home/oracle/Oracle11G/product/11.2.0/db_1/bin/dbca -silent -responseFile /home/oracle/database/response/dbca.rsp

    显示如下图:

     

    查看实例是否运行:

    ps -ef | grep ora_ | grep -v grep

     

    5 修改启动和关闭实例的程序

    修改文件: /data/oracle/product/11.2.0/db_1/bin/dbstart
         /data/oracle/product/11.2.0/db_1/bin/dbshut


    ORACLE_HOME_LISTNER=$1
    修改为
    ORACLE_HOME_LISTNER=/home/oracle/Oracle11G/product/11.2.0/db_1

    修改文件: /etc/oratab


    orcl:/home/oracle/Oracle11G/product/11.2.0:N
    修改为
    orcl: /home/oracle/Oracle11G /product/11.2.0:Y

    三 设置开启启动

    输入命令:

    # chmod +x /etc/rc.d/rc.local

    修改文件 /etc/rc.d/rc.local

    添加如下内容:

    su oracle -lc "/home/oracle/Oracle11G/product/11.2.0/db_1/bin/lsnrctl start"

    su oracle -lc "/home/oracle/Oracle11G/11.2.0/db_1/bin/dbstart"

     

    更多相关内容
  • linux无图形化界面安装oracle
  • Centos7.6安装Oracle11g_2020年3月13日更新.pdf,附件地址https://download.csdn.net/download/Feng_5CF0/12246431
  • centos7.6系统安装Oracle数据库

    未特殊说明,操作用户即为root用户。

    1、安装依赖包

    yum -y install gcc gcc-c++ make binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel elfutils-libelf-devel-static glibc glibc-common glibc-devel ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel numactl-devel sysstat unixODBC unixODBC-devel kernelheaders pdksh pcre-devel readline

    2、创建用户组
    groupadd oinstall 
    groupadd dba 

    3、创建用户并添加到用户组
    useradd -g oinstall -G dba oracle 

    4、设置密码
    echo "123456" | passwd --stdin oracle 

    5、创建安装目录及权限
    mkdir -p /data/u01/app/oracle/product/11.2.0/dbhome_1 
    mkdir /data/u01/app/oracle/{oradata,inventory,fast_recovery_area} 
    chown -R oracle:oinstall /data/u01/app/oracle 
    chmod -R 775 /data/u01/app/oracle 

    6、静默安装Oracle11G数据库,上传数据库安装包并解压

    6.1、创建一个目录存放安装包
    mkdir -p /data/u01/software 

    6.2、将安装包(linux-64_1of7.zip,linux-64_2of7.zip)上传到software目录
    cd /data/u01/software 
    unzip linux-64_1of7.zip 
    unzip linux-64_2of7.zip 
    解压完如下图所示:

    6.3、修改配置文件
    修改内核文件:
    vim /etc/sysctl.conf 
    添加如下内容:
    fs.aio-max-nr = 1048576
    fs.file-max = 6815744
    kernel.shmall = 2097152
    kernel.shmmax = 1073741824
    kernel.shmmni = 4096
    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 = 1048576
    kernel.msgmni = 1000
    kernel.msgmax = 81920
    kernel.msgmnb = 163840

      

    保存后退出。

    6.4、执行如下命令使配置生效
    sysctl -p 

    6.5、修改用户限制
    vim /etc/security/limits.conf 
    添加如下内容:
    oracle soft nproc 2047
    oracle hard nproc 16384
    oracle soft nofile 1024
    oracle hard nofile 65536
    oracle soft stack 10240

     

    保存后退出。

    6.6、修改/etc/pam.d/login文件
    vim /etc/pam.d/login 
    添加如下内容:
    session required /lib64/security/pam_limits.so
    session required pam_limits.so

     

    保存后退出。

    6.7、修改/etc/profile文件
    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

     

    保存后退出。

    7、设置oracle 用户环境变量
    7.1、切换到oracle用户
    su - oracle

    7.2、编辑
    cd ~
    vim .bash_profile 
    添加如下内容:
    export ORACLE_BASE=/data/u01/app/oracle
    export ORACLE_HOME=/data/u01/app/oracle/product/11.2.0/dbhome_1
    export ORACLE_SID=orcl
    export ORACLE_UNQNAME=$ORACLE_SID
    export PATH=$ORACLE_HOME/bin:$PATH
    export NLS_LANG=american_america.AL32UTF8
    #alias sqlplus='rlwrap sqlplus'
    #alias rman='rlwrap rman'
    并修改最后一行:
    export PATH=$ORACLE_HOME/bin:$PATH

     

    保存后退出。

    7.3、执行如下命令使配置生效
    source .bash_profile 

    7.4、修改静默安装响应文件
    cp -r /data/u01/software/database/response/ /home/oracle 
    cd /home/oracle/response/ 
    vim db_install.rsp 
    修改如下11个地方(注意不要修改错地方):
    oracle.install.option=INSTALL_DB_SWONLY 
    ORACLE_HOSTNAME=自己的主机名
    主机名查询方法:hostname -f 
    UNIX_GROUP_NAME=oinstall 
    INVENTORY_LOCATION=/data/u01/app/oracle/inventory 
    SELECTED_LANGUAGES=en,zh_CN 
    ORACLE_HOME=/data/u01/app/oracle/product/11.2.0/dbhome_1 
    ORACLE_BASE=/data/u01/app/oracle 
    oracle.install.db.InstallEdition=EE 
    oracle.install.db.DBA_GROUP=dba 
    oracle.install.db.OPER_GROUP=dba 
    DECLINE_SECURITY_UPDATES=true 


    保存后退出。

     

     

     保存后退出

    执行以下命令
    cd /data/u01/software/database/ 
    ./runInstaller -silent -responseFile /home/oracle/response/db_install.rsp -ignorePrereq 
    出现Successfully Setup Software后再执行以下操作

    再开一个窗口,root用户操作,执行如下两个命令:
    sh /data/u01/app/oracle/inventory/orainstRoot.sh 
    sh /data/u01/app/oracle/product/11.2.0/dbhome_1/root.sh 


    继续执行如下命令
    sqlplus / as sysdba

     

    注:出现该页面后,再执行接下来操作。

    8、创建一个数据库实例

    8.1、配置响应文件(oracle用户):
    vim /home/oracle/response/dbca.rsp 

    修改如下9个地方(注意不要修改错地方。前面有注释的,一定要去掉“#”)
    SID = "orcl" 
    SYSPASSWORD = "123456"
    SYSTEMPASSWORD = "123456" 
    SYSMANPASSWORD = "123456" 
    DBSNMPPASSWORD = "123456" 
    DATAFILEDESTINATION =/data/u01/app/oracle/oradata 
    RECOVERYAREADESTINATION=/data/u01/app/oracle/fast_recovery_area 
    CHARACTERSET = "AL32UTF8" 
    TOTALMEMORY = "6144" (注意:此处数字依机器A物理内存而定,一般为物理内存的1.5-2倍,单位为MB。)


    保存后退出。

    8.2、检查配置(oracle用户):
    egrep -v "(^#|^$)" /home/oracle/response/dbca.rsp 

    8.3、安装创建(oracle用户):
    cd /data/u01/software/database/ 
    dbca -silent -responseFile /home/oracle/response/dbca.rsp

    8.4、查看默认实例(oracle用户):
    env|grep ORACLE_UNQNAME 

    8.5、进入sqlplus 启动实例(oracle用户):
    sqlplus / as sysdba
    shutdown 
    startup 

     

    8.6、启动侦听器(oracle用户):
    lsnrctl start

    8.7、查看侦听器状态(oracle用户):
    lsnrctl status 

     

    注:出现该页面后,再执行接下来操作。

    9、oracle库和监听开机自启设置

    9.1、添加信息格式(oracle用户):
    vim /etc/oratab 
    如下图所示修改内容:

    保存后退出。

    root用户执行如下命令:
    vim /etc/rc.d/rc.local 
    添加如下内容:
    su - oracle -c "dbstart"
    su - oracle -c "lsnrctl start"
    su - oracle -c "lsnrctl start listenerl"

    保存后退出。

    root用户执行如下命令:
    chmod +x /etc/rc.d/rc.local 
    sync 
    reboot 


    10、开放端口(root用户):
    firewall-cmd --zone=public --add-port=1521/tcp --permanent 
    systemctl restart firewalld.service

    11、修改oracle配置文件(root用户)
    11.1、创建tnsnames.ora
    vim /data/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora 
    添加如下内容:
    ORCL =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = ORCL)
        )
      )

    保存后退出。

    11.2、创建listener.ora
    vim /data/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
    添加如下内容:
    SID_LIST_LISTENER =
      (SID_LIST =
        (SID_DESC =
          (SID_NAME = PLSExtProc)
          (ORACLE_HOME = /data/u01/app/oracle/product/11.2.0/dbhome_1)
          (PROGRAM = extproc)
        )

       (SID_DESC =
        (GLOBAL_DBNAME = ORCL)
        (ORACLE_HOME = /data/u01/app/oracle/product/11.2.0/dbhome_1)
        (SID_NAME = ORCL)
        )
      )

    LISTENER =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
          (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
        )
    )

    保存后退出。

    4.13连接测试
    用数据库连接工具(以Navicat为例)
    用户名:system
    密码:123456

    至此,oracle数据库已成功安装。

    展开全文
  • 系统 CentOS7.6 CPU 4H 内存 4G 硬盘 128G GUI 有 ????安装前准备 ????更换yum源(root) # 安装wget yum install wget -y # 备份自带的yum源 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/...

    1. 虚拟机配置

    • 系统 CentOS7.6

    • CPU 4H

    • 内存 4G

    • 硬盘 128G

    • GUI 有

    2. 安装前准备

    2.1 配置静态IP(root)

    # 我们是安装服务,一个服务的主机IP地址不应该是变化的,所以设置为静态
    vim /etc/sysconfig/network-scripts/ifcfg-ens33
    # 修改后重启网卡
    systemctl restart network
    

    image-20210814165355980

    2.2 检查网络连接是否正常(root)

    # 检查是否能ping通IP
    ping 114.114.114.114
    # 检查是否能ping通域名
    ping www.baidu.com
    

    2.3 更换yum源(root)

    # 安装wget
    yum install wget -y
    # 备份自带的yum源
    mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
    # 下载新的CentOS-Base.repo到/etc/yum.repos.d/
    wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
    # 生成yum缓存
    yum makecache
    

    2.4 安装vim(root)

    yum install vim -y
    

    2.5 安装lrzsz(root)

    # lrzsz是一个文件上传下载程序,在Xshell中可以通过rz上传文件,通过sz下载文件
    yum install lrzsz -y
    

    2.6 关闭防火墙(root)

    # 因为是开发环境,为了避免出现安装什么服务后忘记开放端口造成服务无法访问,可以关闭防火墙
    # 查看防火墙状态
    systemctl status firewalld
    # 关闭防火墙
    systemctl stop firewalld
    # 再次查看防火墙状态
    systemctl status firewalld
    # 永久关闭防火墙
    systemctl disable firewalld
    

    3. 安装Oracle

    3.1 创建oracle用户和oinstall用户组(root)

    # 创建oracle用户
    useradd oracle
    # 为oracle用户添加sudo权限,方便之后通过oracle执行root命令
    yum install sudo -y
    vim /etc/sudoers
    chmod u+w /etc/sudoers # /etc/sudoers不可写,先给修改权限
    vim /etc/sudoers
    # 输入/ALL找到root ALL=(ALL) ALL,在下面添加下面内容
    oracle ALL=(ALL) ALL
    chmod u-w /etc/sudoers # 恢复/etc/sudoers的默认权限
    # 为oracle设置密码 密码起码要包含字母大小写和数字,否则不通过
    passwd oracle
    # 此处开始可切换成xshell工具连接
    

    3.2 创建安装位置(root)

    # 创建/u01
    sudo mkdir /u01
    # 将/u01的权限赋给oracle用户
    sudo chown -R oracle:oracle /u01
    

    3.3 上传安装包(oracle)

    # 进入/home/oracle
    cd /home/oracle
    # 创建install目录存放软件安装包
    mkdir install
    # 进入install/上传安装包
    cd install
    rz -e # -e防止上传乱码
    

    3.4 解压安装包

    # 安装unzip(root)
    sudo yum install unzip -y
    # 解压安装包(oracle)
    unzip linuxx64_12201_database.zip
    

    3.5 执行runInstaller开始安装(oracle)

    # 进入linuxx64_12201_database/database/
    cd linuxx64_12201_database/database/
    

    进入后发现oracle对runInstaller没有执行权限

    image-20210814151655520

    # 通过root给oracle授权 744代表给文件所有者读写执行的权限,给其他用户读的权限,-R ./*代表给当前目录下所有文件授予该权限,预估安装过程中会使用其他文件
    chmod 744 -R ./*
    

    image-20210720122809084

    # 执行runInstaller(oracle)
    ./runInstaller # 如果提示需要安装Xmanager来转发x11请求,可以直接在虚拟机里运行
    

    4. 图形安装

    image-20210720123418775

    image-20210720123443683

    image-20210720123609910

    image-20210720123653667

    image-20210720123854501

    image-20210814154430700

    image-20210814154500290

    image-20210720133401755

    image-20210720133545580

    image-20210720133737822

    sudo /tmp/CVU_12.2.0.1.0_oracle/runfixup.sh
    

    image-20210720134014501

    还有一个最大堆栈大小限制以及程序包缺失需要修复

    # 修复程序包缺失(root)
    sudo yum install gcc-c++ ksh compat-libcap1 libaio-devel -y
    
    # 检查/etc/security/limits.conf
    cat /etc/security/limits.conf
    

    image-20210720134343042

    重新检查,如果还是显示失败即可勾选忽略

    image-20210720135114199

    image-20210720135159681

    image-20210720135802704

    image-20210814155539295

    image-20210720141439672

    5. 配置环境变量(oracle)

    vim /home/oracle/.bash_profile
    

    image-20210814160955808

    # 使配置生效
    source /home/oracle/.bash_profile
    # 查看配置
    echo $ORACLE_HOME
    

    image-20210720142502704

    6. 验证安装是否成功(oracle)

    # 开启监听
    
    # 使用sqlplus 登录sys用户
    sqlplus sys as sysdba
    

    image-20210814161218663

    image-20210720143725681

    image-20210720143805636

    pl/sql远程连接成功

    7. 创建oracle新用户

    一般不会通过sys去操作数据库,所以需要创建新的用户

    7.1 创建CDB用户

    # 用户名为c##osb 密码为oracle
    sql>create user c##osb identified by oracle
    # 授权 
    sql>grant dba to c##osb container=all;
    

    navicat连接

    image-20210814171506962

    7.2 创建PDB用户

    # 用户名为c##osb 密码为oracle
    sql>create user c##osb identified by oracle
    # 授权 
    sql>grant dba to c##osb;
    

    navicat连接

    image-20210814171656286

    8. 结尾

    8.1 启动oracle(oracle)

    虚拟机重启后重新启动oracle

    # 登录数据库
    sqlplus sys as sysdba
    # 启动数据库
    sql>startup;
    # 打开orclpdb
    sql>alter pluggable database orclpdb open;
    # 启动oracle监听
    lsnrctl start
    

    8.2 CDB和PDB

    image-20210720144244739

    展开全文
  • Centos7.6 安装Oracle RAC 12.2.0.1

    前言

    前言
    第一次在CSDN上写博客,周末抽空在vsphere环境下,搭建学习centos7.6下安装oracle rac12.2.0.1,操作系统centos7.6安装过程就省略了。

    📢 注意:12C R2相比前一版本,OCR的磁盘占用需求有了明显增长。
    为了方便操作,设置如下:
    External: 1个卷x40G
    Normal: 3个卷x30G
    Hight: 5个卷x25G
    Flex: 3个卷x30G
    OCR+VOLTING+MGMT存储通常放到一个磁盘组,且选择Normal的冗余方式,也即最少3块asm磁盘80G空间。

    一、安装环境准备

    1、网络规划

    #public
    192.168.0.61       db1
    192.168.0.62       db2
    #private
    111.111.111.111    db1-priv
    111.111.111.112    db2-priv
    #vip
    192.168.0.63       db1-vip
    192.168.0.64       db2-vip
    #scan-ip
    192.168.0.65       scan-ip
    

    2、配置yum仓库

    mkdir -p /etc/yum.repos.d/yum_bak
    mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/yum_bak
    cat >/etc/yum.repos.d/centos7u6.repo <<-EOF
    [rhel-media]
    name=CentOs Linux 
    baseurl=file:///mnt/ 
    enabled=1 
    gpgcheck=0
    EOF
    

    3、安装依赖包

    yum install binutils -y
    yum install compat-libstdc++-33 -y
    yum install compat-libstdc++-33.i686 -y
    yum install gcc -y
    yum install gcc-c++ -y
    yum install glibc -y
    yum install glibc.i686 -y
    yum install glibc-devel -y
    yum install glibc-devel.i686 -y
    yum install ksh -y
    yum install libgcc -y
    yum install libgcc.i686 -y
    yum install libstdc++ -y
    yum install libstdc++.i686 -y
    yum install libstdc++-devel -y
    yum install libstdc++-devel.i686 -y
    yum install libaio -y
    yum install libaio.i686 -y
    yum install libaio-devel -y
    yum install libaio-devel.i686 -y
    yum install libXext -y
    yum install libXext.i686 -y
    yum install libXtst -y
    yum install libXtst.i686 -y
    yum install libX11 -y
    yum install libX11.i686 -y
    yum install libXau -y
    yum install libXau.i686 -y
    yum install libxcb -y
    yum install libxcb.i686 -y
    yum install libXi -y
    yum install libXi.i686 -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 zlib-devel.i686 -y
    yum install compat-libcap1.x86_64 -y
    yum install binutils.x86_64 compat-libcap1.x86_64  e2fsprogs.x86_64 libaio* libXau* libXi* libXtst* libstdc*  -y
    yum install tigervnc* -y
    

    4、关闭防火墙

    systemctl status firewalld
    systemctl stop firewalld
    systemctl disable firewalld
    systemctl is-enabled firewalld
    systemctl status firewalld
    

    5、设置selinux

    cp -rf /etc/selinux/config /etc/selinux/config.bk
    sed 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config.bk > /etc/selinux/config
    

    6、关闭关闭透明大页和NUMA

    sed -i 's/quiet/quiet transparent_hugepage=never numa=off/' /etc/default/grub
    grub2-mkconfig -o /boot/grub2/grub.cfg
    

    📢 注意:重启生效

    7、系统参数

    vi /etc/sysctl.conf

    fs.aio-max-nr = 1048576
    fs.file-max = 6815744
    kernel.shmall = 2097152
    kernel.shmmax = 8369610751
    kernel.shmmni = 4096
    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 = 1048576
    net.ipv4.conf.ens192.rp_filter = 1
    net.ipv4.conf.ens224.rp_filter = 2
    

    sysctl -p

    vi /etc/pam.d/login

    echo "session required pam_limits.so" >> /etc/pam.d/login
    

    vi /etc/sysconfig/network

    NOZEROCONF=yes
    

    8、资源限制

    vi /etc/security/limits.conf

    oracle soft nofile 2048
    oracle hard nofile 65536
    oracle soft nproc 16384
    oracle hard nproc 16384
    oracle soft stack 10240
    oracle hard stack 32768
    oracle hard memlock 134217728
    oracle soft memlock 134217728
    grid soft nofile 2048
    grid hard nofile 65536
    grid soft nproc 16384
    grid hard nproc 16384
    grid soft stack 10240
    grid hard stack 32768
    grid hard memlock 134217728
    grid soft memlock 134217728
    

    9、创建用户和组

    groupadd -g 60001 oinstall
    groupadd -g 60002 dba
    groupadd -g 60003 oper
    groupadd -g 60004 backupdba
    groupadd -g 60005 dgdba
    groupadd -g 60006 kmdba
    groupadd -g 60007 asmdba
    groupadd -g 60008 asmoper
    groupadd -g 60009 asmadmin
    useradd -u 61001 -g oinstall -G asmadmin,asmdba,dba,asmoper grid
    useradd -u 61002 -g oinstall -G dba,backupdba,dgdba,kmdba,asmadmin,oper,asmdba oracle
    
    echo "grid" | passwd --stdin grid
    echo "oracle" | passwd --stdin oracle
    

    10、创建目录

    mkdir -p /u01/app/12.2.0/grid
    mkdir -p /u01/app/grid
    mkdir -p /u01/app/oracle/product/12.2.0/db
    mkdir -p /u01/app/oraInventory
    chown -R grid:oinstall /u01
    chown -R grid:oinstall /u01/app/grid
    chown -R grid:oinstall /u01/app/12.2.0/grid
    chown -R grid:oinstall /u01/app/oraInventory
    chown -R oracle:oinstall /u01/app/oracle
    chmod -R 775 /u01
    

    11、用户环境参数

    su - grid
    vi .bash_profile
    export ORACLE_BASE=/u01/app/grid
    export ORACLE_HOME=/u01/app/12.2.0/grid
    export ORACLE_SID=+ASM1
    export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH
    export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
    

    📢 注意:节点2:ORACLE_SID=+ASM2

    su - oracle
    vi .bash_profile
    export ORACLE_BASE=/u01/app/oracle
    export ORACLE_HOME=/u01/app/oracle/product/12.2.0/db
    export ORACLE_SID=orcl1
    export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
    export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH
    export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
    

    📢 注意:节点2:ORACLE_SID=orcl2

    vi /etc/profile
    if [ $USER = "oracle" ] || [ $USER = "grid" ]; then
    if [ $SHELL = "/bin/ksh" ]; then
    ulimit -p 16384
    ulimit -n 65536
    else
    ulimit -u 16384 -n 65536
    fi
    umask 022
    fi
    

    12、连接存储

    yum -y install iscsi-initiator-utils
    iscsiadm -m discovery -t st -p 192.168.0.250:3260
    iscsiadm -m node -T iqn.2007-09.jp.ne.peach.istgt:disk0 -l
    iscsiadm -m node -T iqn.2007-09.jp.ne.peach.istgt:disk1 -l
    

    13、配置多链路

    vi /etc/multipath.conf
    blacklist {
            devnode "^sda"
    }
    defaults {
            polling_interval        30
            failback                immediate
            no_path_retry           5
            rr_min_io               100
            path_checker            tur
            user_friendly_names     yes
    }
    multipaths {
            multipath {
                    wwid  330000000eeafaaf9
                    alias   asmdiskocr
                     }
            multipath {
                    wwid  330000000019fc1e0
                    alias   asmdiskdata
                      }                 
    }
    devices {
            device {
                    vendor                  "IBM"
                    product                 "2145"
                    path_grouping_policy    group_by_prio
                    prio    alua    #failover
            }
    }
    

    14、权限设置

    vi /etc/udev/rules.d/99-oracle-asmdevices.rules

    options=--whitelisted --replace-whitespace
    KERNEL=="dm-*",ENV{DEVTYPE}=="disk",SUBSYSTEM=="block",PROGRAM=="/usr/lib/udev/scsi_id -g -u -d $devnode",RESULT=="330000000eeafaaf9", RUN+="/bin/sh -c 'mknod /dev/asmdiskocr b  $major $minor; chown grid:asmadmin /dev/dm-2; chmod 0660 /dev/dm-2'"
    KERNEL=="dm-*",ENV{DEVTYPE}=="disk",SUBSYSTEM=="block",PROGRAM=="/usr/lib/udev/scsi_id -g -u -d $devnode",RESULT=="330000000019fc1e0", RUN+="/bin/sh -c 'mknod /dev/asmdiskdata b  $major $minor; chown grid:asmadmin /dev/dm-3; chmod 0660 /dev/dm-3'"
    

    15、avahi-daemon 配置

    yum -y install avahi-daemon
    systemctl stop avahi-daemon
    systemctl disable avahi-daemon
    systemctl is-enabled avahi-daemon
    systemctl status avahi-daemon
    

    16、NTP参数

    systemctl stop ntpd
    systemctl disable ntpd
    mv /etc/ntp.conf /etc/ntp.conf.bak
    rm -rf /var/run/ntpd.pid
    systemctl stop chronyd
    systemctl disable chronyd
    mv /etc/chrony.conf /etc/chrony.conf.bak
    rm -rf /var/run/chronyd.pid
    

    17、上传安装包

    上传安装包到/soft

    linuxx64_12201_database.zip
    linuxx64_12201_grid_home.zip
    

    18、解压安装包

    chmod -R 755 /soft
    chown -R grid:oinstall /soft
    su - grid -c "unzip -q /soft/linuxx64_12201_grid_home.zip -d /u01/app/12.2.0/grid/"
    

    19、安装cvuqdisk

    rpm -ivh /u01/app/12.2.0/grid/cv/rpm/cvuqdisk-1.0.10-1.rpm
    

    二、grid集群安装

    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述

    [root@db1 ~]# /u01/app/oraInventory/orainstRoot.sh
    Changing permissions of /u01/app/oraInventory.
    Adding read,write permissions for group.
    Removing read,write,execute permissions for world.
    
    Changing groupname of /u01/app/oraInventory to oinstall.
    The execution of the script is complete.
    
    [root@db2 ~]# /u01/app/oraInventory/orainstRoot.sh
    Changing permissions of /u01/app/oraInventory.
    Adding read,write permissions for group.
    Removing read,write,execute permissions for world.
    
    Changing groupname of /u01/app/oraInventory to oinstall.
    The execution of the script is complete.
    
    [root@db1 ~]# /u01/app/12.2.0/grid/root.sh
    Performing root user operation.
    
    The following environment variables are set as:
        ORACLE_OWNER= grid
        ORACLE_HOME=  /u01/app/12.2.0/grid
    
    Enter the full pathname of the local bin directory: [/usr/local/bin]: 
       Copying dbhome to /usr/local/bin ...
       Copying oraenv to /usr/local/bin ...
       Copying coraenv to /usr/local/bin ...
    
    
    Creating /etc/oratab file...
    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 script.
    Now product-specific root actions will be performed.
    Relinking oracle with rac_on option
    Using configuration parameter file: /u01/app/12.2.0/grid/crs/install/crsconfig_params
    The log of current session can be found at:
      /u01/app/grid/crsdata/db1/crsconfig/rootcrs_db1_2022-01-08_10-10-17PM.log
    2022/01/08 22:10:19 CLSRSC-594: Executing installation step 1 of 19: 'SetupTFA'.
    2022/01/08 22:10:19 CLSRSC-4001: Installing Oracle Trace File Analyzer (TFA) Collector.
    2022/01/08 22:10:43 CLSRSC-4002: Successfully installed Oracle Trace File Analyzer (TFA) Collector.
    2022/01/08 22:10:43 CLSRSC-594: Executing installation step 2 of 19: 'ValidateEnv'.
    2022/01/08 22:10:47 CLSRSC-363: User ignored prerequisites during installation
    2022/01/08 22:10:47 CLSRSC-594: Executing installation step 3 of 19: 'CheckFirstNode'.
    2022/01/08 22:10:48 CLSRSC-594: Executing installation step 4 of 19: 'GenSiteGUIDs'.
    2022/01/08 22:10:49 CLSRSC-594: Executing installation step 5 of 19: 'SaveParamFile'.
    2022/01/08 22:10:55 CLSRSC-594: Executing installation step 6 of 19: 'SetupOSD'.
    2022/01/08 22:10:55 CLSRSC-594: Executing installation step 7 of 19: 'CheckCRSConfig'.
    2022/01/08 22:10:55 CLSRSC-594: Executing installation step 8 of 19: 'SetupLocalGPNP'.
    2022/01/08 22:11:11 CLSRSC-594: Executing installation step 9 of 19: 'ConfigOLR'.
    2022/01/08 22:11:17 CLSRSC-594: Executing installation step 10 of 19: 'ConfigCHMOS'.
    2022/01/08 22:11:17 CLSRSC-594: Executing installation step 11 of 19: 'CreateOHASD'.
    2022/01/08 22:11:21 CLSRSC-594: Executing installation step 12 of 19: 'ConfigOHASD'.
    2022/01/08 22:11:37 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.service'
    2022/01/08 22:12:04 CLSRSC-594: Executing installation step 13 of 19: 'InstallAFD'.
    2022/01/08 22:12:08 CLSRSC-594: Executing installation step 14 of 19: 'InstallACFS'.
    CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'db1'
    CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'db1' has completed
    CRS-4133: Oracle High Availability Services has been stopped.
    CRS-4123: Oracle High Availability Services has been started.
    2022/01/08 22:12:28 CLSRSC-594: Executing installation step 15 of 19: 'InstallKA'.
    2022/01/08 22:12:32 CLSRSC-594: Executing installation step 16 of 19: 'InitConfig'.
    CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'db1'
    CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'db1' has completed
    CRS-4133: Oracle High Availability Services has been stopped.
    CRS-4123: Oracle High Availability Services has been started.
    CRS-2672: Attempting to start 'ora.evmd' on 'db1'
    CRS-2672: Attempting to start 'ora.mdnsd' on 'db1'
    CRS-2676: Start of 'ora.mdnsd' on 'db1' succeeded
    CRS-2676: Start of 'ora.evmd' on 'db1' succeeded
    CRS-2672: Attempting to start 'ora.gpnpd' on 'db1'
    CRS-2676: Start of 'ora.gpnpd' on 'db1' succeeded
    CRS-2672: Attempting to start 'ora.cssdmonitor' on 'db1'
    CRS-2672: Attempting to start 'ora.gipcd' on 'db1'
    CRS-2676: Start of 'ora.cssdmonitor' on 'db1' succeeded
    CRS-2676: Start of 'ora.gipcd' on 'db1' succeeded
    CRS-2672: Attempting to start 'ora.cssd' on 'db1'
    CRS-2672: Attempting to start 'ora.diskmon' on 'db1'
    CRS-2676: Start of 'ora.diskmon' on 'db1' succeeded
    CRS-2676: Start of 'ora.cssd' on 'db1' succeeded
    
    Disk groups created successfully. Check /u01/app/grid/cfgtoollogs/asmca/asmca-220108PM101318.log for details.
    
    
    2022/01/08 22:13:49 CLSRSC-482: Running command: '/u01/app/12.2.0/grid/bin/ocrconfig -upgrade grid oinstall'
    CRS-2672: Attempting to start 'ora.crf' on 'db1'
    CRS-2672: Attempting to start 'ora.storage' on 'db1'
    CRS-2676: Start of 'ora.storage' on 'db1' succeeded
    CRS-2676: Start of 'ora.crf' on 'db1' succeeded
    CRS-2672: Attempting to start 'ora.crsd' on 'db1'
    CRS-2676: Start of 'ora.crsd' on 'db1' succeeded
    CRS-4256: Updating the profile
    Successful addition of voting disk c01b8cdc9f6c4ffabf1e4113fb5eaf6f.
    Successfully replaced voting disk group with +OCR.
    CRS-4256: Updating the profile
    CRS-4266: Voting file(s) successfully replaced
    ##  STATE    File Universal Id                File Name Disk group
    --  -----    -----------------                --------- ---------
     1. ONLINE   c01b8cdc9f6c4ffabf1e4113fb5eaf6f (/dev/asmdiskocr) [OCR]
    Located 1 voting disk(s).
    CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'db1'
    CRS-2673: Attempting to stop 'ora.crsd' on 'db1'
    CRS-2677: Stop of 'ora.crsd' on 'db1' succeeded
    CRS-2673: Attempting to stop 'ora.storage' on 'db1'
    CRS-2673: Attempting to stop 'ora.crf' on 'db1'
    CRS-2673: Attempting to stop 'ora.gpnpd' on 'db1'
    CRS-2673: Attempting to stop 'ora.mdnsd' on 'db1'
    CRS-2677: Stop of 'ora.crf' on 'db1' succeeded
    CRS-2677: Stop of 'ora.gpnpd' on 'db1' succeeded
    CRS-2677: Stop of 'ora.storage' on 'db1' succeeded
    CRS-2673: Attempting to stop 'ora.asm' on 'db1'
    CRS-2677: Stop of 'ora.mdnsd' on 'db1' succeeded
    CRS-2677: Stop of 'ora.asm' on 'db1' succeeded
    CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'db1'
    CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'db1' succeeded
    CRS-2673: Attempting to stop 'ora.ctssd' on 'db1'
    CRS-2673: Attempting to stop 'ora.evmd' on 'db1'
    CRS-2677: Stop of 'ora.ctssd' on 'db1' succeeded
    CRS-2677: Stop of 'ora.evmd' on 'db1' succeeded
    CRS-2673: Attempting to stop 'ora.cssd' on 'db1'
    CRS-2677: Stop of 'ora.cssd' on 'db1' succeeded
    CRS-2673: Attempting to stop 'ora.gipcd' on 'db1'
    CRS-2677: Stop of 'ora.gipcd' on 'db1' succeeded
    CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'db1' has completed
    CRS-4133: Oracle High Availability Services has been stopped.
    2022/01/08 22:14:52 CLSRSC-594: Executing installation step 17 of 19: 'StartCluster'.
    CRS-4123: Starting Oracle High Availability Services-managed resources
    CRS-2672: Attempting to start 'ora.evmd' on 'db1'
    CRS-2672: Attempting to start 'ora.mdnsd' on 'db1'
    CRS-2676: Start of 'ora.mdnsd' on 'db1' succeeded
    CRS-2676: Start of 'ora.evmd' on 'db1' succeeded
    CRS-2672: Attempting to start 'ora.gpnpd' on 'db1'
    CRS-2676: Start of 'ora.gpnpd' on 'db1' succeeded
    CRS-2672: Attempting to start 'ora.gipcd' on 'db1'
    CRS-2676: Start of 'ora.gipcd' on 'db1' succeeded
    CRS-2672: Attempting to start 'ora.cssdmonitor' on 'db1'
    CRS-2676: Start of 'ora.cssdmonitor' on 'db1' succeeded
    CRS-2672: Attempting to start 'ora.cssd' on 'db1'
    CRS-2672: Attempting to start 'ora.diskmon' on 'db1'
    CRS-2676: Start of 'ora.diskmon' on 'db1' succeeded
    CRS-2676: Start of 'ora.cssd' on 'db1' succeeded
    CRS-2672: Attempting to start 'ora.cluster_interconnect.haip' on 'db1'
    CRS-2672: Attempting to start 'ora.ctssd' on 'db1'
    CRS-2676: Start of 'ora.ctssd' on 'db1' succeeded
    CRS-2676: Start of 'ora.cluster_interconnect.haip' on 'db1' succeeded
    CRS-2672: Attempting to start 'ora.asm' on 'db1'
    CRS-2676: Start of 'ora.asm' on 'db1' succeeded
    CRS-2672: Attempting to start 'ora.storage' on 'db1'
    CRS-2676: Start of 'ora.storage' on 'db1' succeeded
    CRS-2672: Attempting to start 'ora.crf' on 'db1'
    CRS-2676: Start of 'ora.crf' on 'db1' succeeded
    CRS-2672: Attempting to start 'ora.crsd' on 'db1'
    CRS-2676: Start of 'ora.crsd' on 'db1' succeeded
    CRS-6023: Starting Oracle Cluster Ready Services-managed resources
    CRS-6017: Processing resource auto-start for servers: db1
    CRS-6016: Resource auto-start has completed for server db1
    CRS-6024: Completed start of Oracle Cluster Ready Services-managed resources
    CRS-4123: Oracle High Availability Services has been started.
    2022/01/08 22:16:14 CLSRSC-343: Successfully started Oracle Clusterware stack
    2022/01/08 22:16:14 CLSRSC-594: Executing installation step 18 of 19: 'ConfigNode'.
    CRS-2672: Attempting to start 'ora.ASMNET1LSNR_ASM.lsnr' on 'db1'
    CRS-2676: Start of 'ora.ASMNET1LSNR_ASM.lsnr' on 'db1' succeeded
    CRS-2672: Attempting to start 'ora.asm' on 'db1'
    CRS-2676: Start of 'ora.asm' on 'db1' succeeded
    CRS-2672: Attempting to start 'ora.OCR.dg' on 'db1'
    CRS-2676: Start of 'ora.OCR.dg' on 'db1' succeeded
    2022/01/08 22:17:22 CLSRSC-594: Executing installation step 19 of 19: 'PostConfig'.
    2022/01/08 22:17:41 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ... succeeded
    
    [root@db2 ~]# /u01/app/12.2.0/grid/root.sh
    Performing root user operation.
    
    The following environment variables are set as:
        ORACLE_OWNER= grid
        ORACLE_HOME=  /u01/app/12.2.0/grid
    
    Enter the full pathname of the local bin directory: [/usr/local/bin]: 
       Copying dbhome to /usr/local/bin ...
       Copying oraenv to /usr/local/bin ...
       Copying coraenv to /usr/local/bin ...
    
    
    Creating /etc/oratab file...
    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 script.
    Now product-specific root actions will be performed.
    Relinking oracle with rac_on option
    Using configuration parameter file: /u01/app/12.2.0/grid/crs/install/crsconfig_params
    The log of current session can be found at:
      /u01/app/grid/crsdata/db2/crsconfig/rootcrs_db2_2022-01-08_10-18-54PM.log
    2022/01/08 22:18:57 CLSRSC-594: Executing installation step 1 of 19: 'SetupTFA'.
    2022/01/08 22:18:57 CLSRSC-4001: Installing Oracle Trace File Analyzer (TFA) Collector.
    2022/01/08 22:19:21 CLSRSC-4002: Successfully installed Oracle Trace File Analyzer (TFA) Collector.
    2022/01/08 22:19:21 CLSRSC-594: Executing installation step 2 of 19: 'ValidateEnv'.
    2022/01/08 22:19:22 CLSRSC-363: User ignored prerequisites during installation
    2022/01/08 22:19:22 CLSRSC-594: Executing installation step 3 of 19: 'CheckFirstNode'.
    2022/01/08 22:19:23 CLSRSC-594: Executing installation step 4 of 19: 'GenSiteGUIDs'.
    2022/01/08 22:19:23 CLSRSC-594: Executing installation step 5 of 19: 'SaveParamFile'.
    2022/01/08 22:19:25 CLSRSC-594: Executing installation step 6 of 19: 'SetupOSD'.
    2022/01/08 22:19:25 CLSRSC-594: Executing installation step 7 of 19: 'CheckCRSConfig'.
    2022/01/08 22:19:26 CLSRSC-594: Executing installation step 8 of 19: 'SetupLocalGPNP'.
    2022/01/08 22:19:27 CLSRSC-594: Executing installation step 9 of 19: 'ConfigOLR'.
    2022/01/08 22:19:29 CLSRSC-594: Executing installation step 10 of 19: 'ConfigCHMOS'.
    2022/01/08 22:19:29 CLSRSC-594: Executing installation step 11 of 19: 'CreateOHASD'.
    2022/01/08 22:19:30 CLSRSC-594: Executing installation step 12 of 19: 'ConfigOHASD'.
    2022/01/08 22:19:45 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.service'
    2022/01/08 22:20:10 CLSRSC-594: Executing installation step 13 of 19: 'InstallAFD'.
    2022/01/08 22:20:11 CLSRSC-594: Executing installation step 14 of 19: 'InstallACFS'.
    CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'db2'
    CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'db2' has completed
    CRS-4133: Oracle High Availability Services has been stopped.
    CRS-4123: Oracle High Availability Services has been started.
    2022/01/08 22:20:27 CLSRSC-594: Executing installation step 15 of 19: 'InstallKA'.
    2022/01/08 22:20:28 CLSRSC-594: Executing installation step 16 of 19: 'InitConfig'.
    CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'db2'
    CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'db2' has completed
    CRS-4133: Oracle High Availability Services has been stopped.
    CRS-4123: Oracle High Availability Services has been started.
    CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'db2'
    CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'db2' has completed
    CRS-4133: Oracle High Availability Services has been stopped.
    2022/01/08 22:20:46 CLSRSC-594: Executing installation step 17 of 19: 'StartCluster'.
    CRS-4123: Starting Oracle High Availability Services-managed resources
    CRS-2672: Attempting to start 'ora.evmd' on 'db2'
    CRS-2672: Attempting to start 'ora.mdnsd' on 'db2'
    CRS-2676: Start of 'ora.mdnsd' on 'db2' succeeded
    CRS-2676: Start of 'ora.evmd' on 'db2' succeeded
    CRS-2672: Attempting to start 'ora.gpnpd' on 'db2'
    CRS-2676: Start of 'ora.gpnpd' on 'db2' succeeded
    CRS-2672: Attempting to start 'ora.gipcd' on 'db2'
    CRS-2676: Start of 'ora.gipcd' on 'db2' succeeded
    CRS-2672: Attempting to start 'ora.cssdmonitor' on 'db2'
    CRS-2676: Start of 'ora.cssdmonitor' on 'db2' succeeded
    CRS-2672: Attempting to start 'ora.cssd' on 'db2'
    CRS-2672: Attempting to start 'ora.diskmon' on 'db2'
    CRS-2676: Start of 'ora.diskmon' on 'db2' succeeded
    CRS-2676: Start of 'ora.cssd' on 'db2' succeeded
    CRS-2672: Attempting to start 'ora.cluster_interconnect.haip' on 'db2'
    CRS-2672: Attempting to start 'ora.ctssd' on 'db2'
    CRS-2676: Start of 'ora.ctssd' on 'db2' succeeded
    CRS-2676: Start of 'ora.cluster_interconnect.haip' on 'db2' succeeded
    CRS-2672: Attempting to start 'ora.asm' on 'db2'
    CRS-2676: Start of 'ora.asm' on 'db2' succeeded
    CRS-2672: Attempting to start 'ora.storage' on 'db2'
    CRS-2676: Start of 'ora.storage' on 'db2' succeeded
    CRS-2672: Attempting to start 'ora.crf' on 'db2'
    CRS-2676: Start of 'ora.crf' on 'db2' succeeded
    CRS-2672: Attempting to start 'ora.crsd' on 'db2'
    CRS-2676: Start of 'ora.crsd' on 'db2' succeeded
    CRS-6017: Processing resource auto-start for servers: db2
    CRS-2672: Attempting to start 'ora.ASMNET1LSNR_ASM.lsnr' on 'db2'
    CRS-2672: Attempting to start 'ora.net1.network' on 'db2'
    CRS-2676: Start of 'ora.net1.network' on 'db2' succeeded
    CRS-2672: Attempting to start 'ora.ons' on 'db2'
    CRS-2676: Start of 'ora.ASMNET1LSNR_ASM.lsnr' on 'db2' succeeded
    CRS-2672: Attempting to start 'ora.asm' on 'db2'
    CRS-2676: Start of 'ora.ons' on 'db2' succeeded
    CRS-2676: Start of 'ora.asm' on 'db2' succeeded
    CRS-6016: Resource auto-start has completed for server db2
    CRS-6024: Completed start of Oracle Cluster Ready Services-managed resources
    CRS-4123: Oracle High Availability Services has been started.
    2022/01/08 22:22:10 CLSRSC-343: Successfully started Oracle Clusterware stack
    2022/01/08 22:22:10 CLSRSC-594: Executing installation step 18 of 19: 'ConfigNode'.
    2022/01/08 22:22:20 CLSRSC-594: Executing installation step 19 of 19: 'PostConfig'.
    2022/01/08 22:22:29 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ... succeeded
    

    在这里插入图片描述
    在这里插入图片描述

    [grid@db1 ~]$ crsctl stat res -t
    --------------------------------------------------------------------------------
    Name           Target  State        Server                   State details       
    --------------------------------------------------------------------------------
    Local Resources
    --------------------------------------------------------------------------------
    ora.ASMNET1LSNR_ASM.lsnr
                   ONLINE  ONLINE       db1                      STABLE
                   ONLINE  ONLINE       db2                      STABLE
    ora.DATA.dg
                   ONLINE  ONLINE       db1                      STABLE
                   ONLINE  ONLINE       db2                      STABLE
    ora.LISTENER.lsnr
                   ONLINE  ONLINE       db1                      STABLE
                   ONLINE  ONLINE       db2                      STABLE
    ora.OCR.dg
                   ONLINE  ONLINE       db1                      STABLE
                   ONLINE  ONLINE       db2                      STABLE
    ora.chad
                   ONLINE  ONLINE       db1                      STABLE
                   ONLINE  ONLINE       db2                      STABLE
    ora.net1.network
                   ONLINE  ONLINE       db1                      STABLE
                   ONLINE  ONLINE       db2                      STABLE
    ora.ons
                   ONLINE  ONLINE       db1                      STABLE
                   ONLINE  ONLINE       db2                      STABLE
    --------------------------------------------------------------------------------
    Cluster Resources
    --------------------------------------------------------------------------------
    ora.LISTENER_SCAN1.lsnr
          1        ONLINE  ONLINE       db1                      STABLE
    ora.MGMTLSNR
          1        ONLINE  ONLINE       db1                      169.254.34.153 111.1
                                                                 11.111.111,STABLE
    ora.asm
          1        ONLINE  ONLINE       db1                      Started,STABLE
          2        ONLINE  ONLINE       db2                      Started,STABLE
          3        OFFLINE OFFLINE                               STABLE
    ora.cvu
          1        ONLINE  ONLINE       db1                      STABLE
    ora.db1.vip
          1        ONLINE  ONLINE       db1                      STABLE
    ora.db2.vip
          1        ONLINE  ONLINE       db2                      STABLE
    ora.mgmtdb
          1        ONLINE  ONLINE       db1                      Open,STABLE
    ora.qosmserver
          1        ONLINE  ONLINE       db1                      STABLE
    ora.scan1.vip
          1        ONLINE  ONLINE       db1                      STABLE
    --------------------------------------------------------------------------------
                   
    

    三、创建ASM数据盘

    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述

    [grid@db1 ~]$ crsctl stat res -t
    --------------------------------------------------------------------------------
    Name           Target  State        Server                   State details       
    --------------------------------------------------------------------------------
    Local Resources
    --------------------------------------------------------------------------------
    ora.ASMNET1LSNR_ASM.lsnr
                   ONLINE  ONLINE       db1                      STABLE
                   ONLINE  ONLINE       db2                      STABLE
    ora.DATA.dg
                   ONLINE  ONLINE       db1                      STABLE
                   ONLINE  ONLINE       db2                      STABLE
    ora.LISTENER.lsnr
                   ONLINE  ONLINE       db1                      STABLE
                   ONLINE  ONLINE       db2                      STABLE
    ora.OCR.dg
                   ONLINE  ONLINE       db1                      STABLE
                   ONLINE  ONLINE       db2                      STABLE
    ora.chad
                   ONLINE  ONLINE       db1                      STABLE
                   ONLINE  ONLINE       db2                      STABLE
    ora.net1.network
                   ONLINE  ONLINE       db1                      STABLE
                   ONLINE  ONLINE       db2                      STABLE
    ora.ons
                   ONLINE  ONLINE       db1                      STABLE
                   ONLINE  ONLINE       db2                      STABLE
    --------------------------------------------------------------------------------
    Cluster Resources
    --------------------------------------------------------------------------------
    ora.LISTENER_SCAN1.lsnr
          1        ONLINE  ONLINE       db1                      STABLE
    ora.MGMTLSNR
          1        ONLINE  ONLINE       db1                      169.254.34.153 111.1
                                                                 11.111.111,STABLE
    ora.asm
          1        ONLINE  ONLINE       db1                      Started,STABLE
          2        ONLINE  ONLINE       db2                      Started,STABLE
          3        OFFLINE OFFLINE                               STABLE
    ora.cvu
          1        ONLINE  ONLINE       db1                      STABLE
    ora.db1.vip
          1        ONLINE  ONLINE       db1                      STABLE
    ora.db2.vip
          1        ONLINE  ONLINE       db2                      STABLE
    ora.mgmtdb
          1        ONLINE  ONLINE       db1                      Open,STABLE
    ora.qosmserver
          1        ONLINE  ONLINE       db1                      STABLE
    ora.scan1.vip
          1        ONLINE  ONLINE       db1                      STABLE
    --------------------------------------------------------------------------------
    

    四、db软件安装

    解压db软件

    chown -R oracle:oinstall /soft
    su - oracle -c "unzip -q /soft/linuxx64_12201_database.zip -d /soft/"
    

    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述

    [root@db1 soft]# /u01/app/oracle/product/12.2.0/db/root.sh
    Performing root user operation.
    
    The following environment variables are set as:
        ORACLE_OWNER= oracle
        ORACLE_HOME=  /u01/app/oracle/product/12.2.0/db
    
    Enter the full pathname of the local bin directory: [/usr/local/bin]: 
    The contents of "dbhome" have not changed. No need to overwrite.
    The contents of "oraenv" have not changed. No need to overwrite.
    The contents of "coraenv" have not changed. No need to overwrite.
    
    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 script.
    Now product-specific root actions will be performed.
    
    [root@db2 ~]# /u01/app/oracle/product/12.2.0/db/root.sh
    Performing root user operation.
    
    The following environment variables are set as:
        ORACLE_OWNER= oracle
        ORACLE_HOME=  /u01/app/oracle/product/12.2.0/db
    
    Enter the full pathname of the local bin directory: [/usr/local/bin]: 
    The contents of "dbhome" have not changed. No need to overwrite.
    The contents of "oraenv" have not changed. No need to overwrite.
    The contents of "coraenv" have not changed. No need to overwrite.
    
    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 script.
    Now product-specific root actions will be performed.
    

    在这里插入图片描述

    五、创建数据库实例

    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述

    [grid@db1 ~]$ crsctl stat res -t
    --------------------------------------------------------------------------------
    Name           Target  State        Server                   State details       
    --------------------------------------------------------------------------------
    Local Resources
    --------------------------------------------------------------------------------
    ora.ASMNET1LSNR_ASM.lsnr
                   ONLINE  ONLINE       db1                      STABLE
                   ONLINE  ONLINE       db2                      STABLE
    ora.DATA.dg
                   ONLINE  ONLINE       db1                      STABLE
                   ONLINE  ONLINE       db2                      STABLE
    ora.LISTENER.lsnr
                   ONLINE  ONLINE       db1                      STABLE
                   ONLINE  ONLINE       db2                      STABLE
    ora.OCR.dg
                   ONLINE  ONLINE       db1                      STABLE
                   ONLINE  ONLINE       db2                      STABLE
    ora.chad
                   ONLINE  ONLINE       db1                      STABLE
                   ONLINE  ONLINE       db2                      STABLE
    ora.net1.network
                   ONLINE  ONLINE       db1                      STABLE
                   ONLINE  ONLINE       db2                      STABLE
    ora.ons
                   ONLINE  ONLINE       db1                      STABLE
                   ONLINE  ONLINE       db2                      STABLE
    --------------------------------------------------------------------------------
    Cluster Resources
    --------------------------------------------------------------------------------
    ora.LISTENER_SCAN1.lsnr
          1        ONLINE  ONLINE       db1                      STABLE
    ora.MGMTLSNR
          1        ONLINE  ONLINE       db1                      169.254.34.153 111.1
                                                                 11.111.111,STABLE
    ora.asm
          1        ONLINE  ONLINE       db1                      Started,STABLE
          2        ONLINE  ONLINE       db2                      Started,STABLE
          3        OFFLINE OFFLINE                               STABLE
    ora.cvu
          1        ONLINE  ONLINE       db1                      STABLE
    ora.db1.vip
          1        ONLINE  ONLINE       db1                      STABLE
    ora.db2.vip
          1        ONLINE  ONLINE       db2                      STABLE
    ora.mgmtdb
          1        ONLINE  ONLINE       db1                      Open,STABLE
    ora.orcl.db
          1        ONLINE  ONLINE       db1                      Open,HOME=/u01/app/o
                                                                 racle/product/12.2.0
                                                                 /db,STABLE
          2        ONLINE  ONLINE       db2                      Open,HOME=/u01/app/o
                                                                 racle/product/12.2.0
                                                                 /db,STABLE
    ora.qosmserver
          1        ONLINE  ONLINE       db1                      STABLE
    ora.scan1.vip
          1        ONLINE  ONLINE       db1                      STABLE
    --------------------------------------------------------------------------------
    
    展开全文
  • 详细介绍了centos7.6_64位下安装操作系统和数据库oracle11g的安装方法。安装失败的原因主要是在操作系统rpm包是否补全的情况。认真按照步骤操作一般都可以安装成功。
  • CentOS7.6安装Oracle19C RAC.docx
  • Centos7.6 安装 Oracle 11g 实例

    千次阅读 2019-11-24 18:40:57
    文章目录环境准备操作系统配置...操作系统:CentOS Linux release 7.6.1810 (Core) 数据库版本:Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 数据库安装包:p13390677_112040_Linux-x86-64_1of7.zi...
  • 前言 吃的最大的亏是未考虑linux系统和oracle软件的兼容性 重要:Oracle Linux 7是生产版本,但是仅从Oracle Database 11g(11.2.0.4)起才...记一次oracle安装错误:INFO: //usr/lib64/libstdc++.so.5: undefined ref
  • Oracle19c RAC for Centos7.6
  • Centos7.6安装Oracle11gR2

    2021-07-04 18:55:46
    Centos7.6安装Oracle11gR2  Windows下安装Oracle比较容易,参考博客:https://www.cnblogs.com/ggll611928/p/5972816.html;但是在linux下就需要安装桌面环境。  安装环境:  系统:CentOS7.6 8核64G 磁盘1T...
  • Centos7.6安装oracle11g
  • 一、安装Oracle前准备 1.创建运行oracle数据库的系统用户和用户组 [humf@localhost ~]$ su root #切换到root Password: [root@localhost sonny]# groupadd oinstall #创建用户组oinstall [root@localhost ...
  • 创建Oracle安装目录 2.3.修改profile文件 2.4.图形化安装 3问题: 1、linux 不能进入系统 Failed to load SELinux policy. Freezing 2、shell提示符为-bash-4.2$ 3、limits报错 4、swap大小检查失败 5、增大linux...
  • 目录 原文链接:...Windows下安装Oracle比较容易,参考博客:https://www.cnblogs.com/ggll611928/p/5972816.html ;但是在linux下就需要安装桌面环境。 安装环境:...
  • Centos7.6.1810(或Asianux-7.3)操作系统中安装oracle19c数据库以及补丁安装过程
  • Centos7.6+Oracle19c.txt

    2021-08-30 16:34:15
    资源为虚拟机环境,已安装Centos7.6系统+Oracle19c数据库,下载后可直接打开使用,无需再进行安装,内含操作指导文档。注意:匹配VMware15/16版,如无虚拟机,需先安装虚拟机
  • 安装centos7.6 安装Oracle切换用户时变成bash-4.2$,如下图:同时在输入命令的时候,发现有的命令无法执行。简单说一下原因,这是因为在创建用户的时候,系统会给新的用户常见主目录,但是在新建用户过程中,用户...
  • kmod-oracleasm-2.0.8-26.el7.x86_64.rpm oracleasmlib-2.0.12-1.el7.x86_64.rpm oracleasm-support-2.1.8-3.el7.x86_64.rpm
  • CentOS7.6安装ORACLE 12C RAC + DATAGUARD

    千次阅读 2019-09-15 17:31:52
    解决 ORACLE 12.2 在CentOS7.6上的Bug bug: 2019/04/09 22:31:16 CLSRSC-400: A system reboot is required to continue installing. The command '/u01/app/12.2.0.1/grid/perl/bin/perl -I/u01/app/12.2.0.1/grid/...
  • CentOS7.6安装Oracle12cRelease2

    千次阅读 2019-10-31 22:29:34
    本文介绍如何在CentOS7.6上安装Oracle Database 12c Release 2 环境介绍 软件下载 Oracle下载 MobaXterm下载 Oracle安装 依赖包安装 内核参数设置 用户和组创建 系统资源参数 资源限制配置 资源限制检查 软件验证 ...
  • CentOS 7.6 安装Oracle 11g R2

    千次阅读 2019-04-17 22:44:13
    Oracle有Windows版,本人是开的虚拟机,Windows比较消耗资源,因此选择了Linux,Linux下安装...一、虚拟机安装CentOS 7.6 http://baijiahao.baidu.com/s?id=1599601257937774752&wfr=spider&for=pc 二、...
  • CentOS7.6 安装Oracle12C(上) 这篇博客将手把手的安装CentOS7.6,下篇将手把手安装Oracle 12C 安装CentOS7.6 1.准备ISO光盘镜像 链接:[https://share.weiyun.com/W1s6LugL](https://share.weiyun.com/W1s6LugL) ...
  • Oracle 11g R2 rac +centos7.7 +openfiler 静默安装教程,教程使用静默的形式安装grid软件和oracle databases 软件,全程无图形化
  • readline,rpm,附带安装方法
  • CentOS7.6安装Oracle12数据库,对数据库进行安装操作,配置过程非常详细,根据步骤能够搭建好; 后续继续搭建Dataguard
  • 本次针对Oracle数据库的RAC集群环境做安装部署,RAC集群是企业最在orale数据库中最常用的一种部署方案,通过RAC集群可实现oracle数据库实例级别的高可用。磁盘RAID、共享存储、DG、OGG及流技术可实现oracle集群架构...
  • centos6.5安装Oracle11g依赖包整理,此依赖包完全满足oracle11g安装。个人已经使用多次,没有发现问题

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 3,261
精华内容 1,304
关键字:

centos7.6安装oracle