资讯

精准传达 • 有效沟通

从品牌网站建设到网络营销策划,从策略到执行的一站式服务

oracle12crelease2如何安装

这篇文章主要介绍了oracle 12c release2如何安装,具有一定借鉴价值,感兴趣的朋友可以参考下,希望大家阅读完这篇文章之后大有收获,下面让小编带着大家一起了解一下。

创新互联建站是一家集网站建设,工布江达企业网站建设,工布江达品牌网站建设,网站定制,工布江达网站建设报价,网络营销,网络优化,工布江达网站推广为一体的创新建站企业,帮助传统企业提升企业形象加强企业竞争力。可充分满足这一群体相比中小企业更为丰富、高端、多元的互联网需求。同时我们时刻保持专业、时尚、前沿,时刻以成就客户成长自我,坚持不断学习、思考、沉淀、净化自己,让我们为更多的企业打造出实用型网站。

0.需要添加如下文件几内容 

    备注:/etc/oraInst.loc的内容为

                inventory_loc=/home/oracle/oraInventory

                inst_group=oinstall

1.    下载Oracle 12c 的压缩包,只有一个zip文件 

2.    添加用户组以及创建目录:

groupadd oinstall

groupadd dba

useradd -g oinstall -G dba oracle

passwd oracle

mkdir /u01; mkdir /u02; mkdir /u03;

mkdir -p /u01/app/oracle/product/12.2.0.1/db_1

chown -R oracle:oinstall /u01

chown -R oracle:oinstall /u02

chown -R oracle:oinstall /u03

3.    修改/etc/hosts文件

oracle 12c release2如何安装

127.0.0.1       localhost localhost.localdomain localhost4 localhost4.localdomain4

192.168.6.128   dbserver

4.    修改/etc/sysctl.conf

fs.file-max = 6815744

kernel.sem = 250 32000 100 128

kernel.shmmni = 4096

kernel.shmall = 1073741824

kernel.shmmax = 4398046511104

kernel.panic_on_oops = 1

net.core.rmem_default = 262144

net.core.rmem_max = 4194304

net.core.wmem_default = 262144

net.core.wmem_max = 1048576

net.ipv4.conf.all.rp_filter = 2

net.ipv4.conf.default.rp_filter = 2

fs.aio-max-nr = 1048576

net.ipv4.ip_local_port_range = 9000 65500

使参数生效

      sysctl -p

   5. 配置/etc/security/limits.d/oracle-rdbms-server-12cR2-preinstall.conf

    oracle   soft   nofile    1024

    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

  6. 修改/etc/pam.d/login

      session    required     pam_limits.so

  7. 安装oracle需要的缺少的 包

    yum install binutils -y

    yum install compat-libcap1 -y

    yum install compat-libstdc++-33 -y

    yum install compat-libstdc++-33.i686 -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 libaio -y

    yum install libaio.i686 -y

    yum install libaio-devel -y

    yum install libaio-devel.i686 -y

    yum install libX11 -y

    yum install libX11.i686 -y

    yum install libXau -y

    yum install libXau.i686 -y

    yum install libXi -y

    yum install libXi.i686 -y

    yum install libXtst -y

    yum install libXtst.i686 -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 libxcb -y

    yum install libxcb.i686 -y

    yum install make -y

    yum install nfs-utils -y

    yum install net-tools -y

    yum install smartmontools -y

    yum install sysstat -y

    yum install unixODBC -y

    yum install unixODBC-devel -y

    yum install gcc -y

    yum install gcc-c++ -y

    yum install libXext -y

    yum install libXext.i686 -y

    yum install zlib-devel -y

    yum install zlib-devel.i686 -y

    yum install e2fsprogs -y

    yum install e2fsprogs-libs -y

    yum install libs -y

    yum install libxcb.i686 -y

    yum install libxcb -y

  8. 修改/etc/selinux/config

      SELINUX=permissive

     修改完后保存执行如下

     # setenforce Permissive

9. 关闭防火墙

    # systemctl stop firewalld

    # systemctl disable firewalld

10.    添加环境变量

         #touch /etc/profile.d/setora.sh

        该文件添加如下内容:

        # Oracle Settings

        export TMP=/tmp

        export TMPDIR=$TMP

        #export oracle.install.db.config.starterdb.globalDBName=oracle.sunyard

        export ORACLE_HOSTNAME=dbserver

        export GLOBAL_NAME=odb

        export ORACLE_UNQNAME=hgs

        export ORACLE_BASE=/u01/app/oracle

        export ORACLE_HOME=$ORACLE_BASE/product/12.2.0.1/db_1

        export ORACLE_SID=hgs

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

        export PATH=$ORACLE_HOME/bin:$PATH

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

        export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

11.将linuxx64_12201_database.zip上传服务器,并解压,解压后目录为

       oracle 12c release2如何安装

        以静默方式安装需要配置responseFile

        配置目录下的database/response/db_install.rsp,关键修改一下配置,否则安装时会报错,按照自己着真实配置

        INVENTORY_LOCATION=/home/oracle/oraInventory

        ORACLE_HOME=/u01/app/oracle/product/12.2.0.1/db_1

        ORACLE_BASE=/u01/app/oracle

        oracle.install.db.OSDBA_GROUP=oinstall

        oracle.install.db.OSOPER_GROUP=oinstall

        oracle.install.db.OSBACKUPDBA_GROUP=oinstall

        oracle.install.db.OSDGDBA_GROUP=oinstall

        oracle.install.db.OSKMDBA_GROUP=oinstall

        oracle.install.db.OSRACDBA_GROUP=oinstall

        oracle.install.db.config.starterdb.globalDBName=orcle12c

        oracle.install.db.config.starterdb.SID=hgs

        oracle.install.db.config.starterdb.characterSet=AL32UTF8

        oracle.install.db.config.starterdb.memoryLimit=1024

        oracle.install.db.config.starterdb.password.SYS=HGShgs912122_

        oracle.install.db.config.starterdb.password.SYSTEM=HGShgs912122_

        oracle.install.db.config.starterdb.fileSystemStorage.dataLocation=/u02

        保存文件

12. 安装 

       oracle 12c release2如何安装

       图中标识的就是要运行的文件

       可以 ./runInstaller  --help 查看帮助

       运行如下安装

        ./runInstaller -silent -responseFile /u03/database/response/db_install.rsp -showProgress

        会有进度提示

13.创建数据库

        cd $ORACLE_HOME/dbs

        cp  init.ora  inithgs.ora

        chown oracle:oinstall  inithgs.ora

        将  inithgs.ora 修改如下 内存大小根据真实情况调整

        *.audit_file_dest='/u01/app/oracle/admin/orcl/adump'

        *.audit_trail='db'

        *.compatible='11.2.0'

        *.control_files='/u01/app/oracle/controls/ora_control1','/u01/app/oracle/controls/ora_control2'

        *.db_block_size=8192

        *.db_domain=''

        *.db_name='hgs'

        *.db_recovery_file_dest='/u01/app/oracle/fast_recovery_area'

        *.db_recovery_file_dest_size=2G

        *.diagnostic_dest=''

        *.dispatchers='(PROTOCOL=TCP) (SERVICE=ORCLXDB)'

        *.memory_target=3G

        *.open_cursors=300

        *.processes=150

        *.remote_login_passwordfile='EXCLUSIVE'

        #*.undo_tablespace='UNDOTBS1'

       切换到oracle用户

       su - oracle

        sqlplus / as sysdba

        startup nomount

         CREATE DATABASE hgs

           USER SYS IDENTIFIED BY sys_password

           USER SYSTEM IDENTIFIED BY system_password

           LOGFILE GROUP 1 ('/u01/app/oracle/oradata/hgs/redo01.log') SIZE 1000M,

                   GROUP 2 ('/u01/app/oracle/oradata/hgs/redo02.log') SIZE 1000M,

                   GROUP 3 ('/u01/app/oracle/oradata/hgs/redo03.log') SIZE 1000M

           MAXLOGFILES 16

           MAXLOGMEMBERS 2

           MAXLOGHISTORY 1

           MAXDATAFILES 100

           CHARACTER SET AL32UTF8

           NATIONAL CHARACTER SET AL16UTF16

           EXTENT MANAGEMENT LOCAL

           DATAFILE '/u01/app/oracle/oradata/hgs/system01.dbf' SIZE 1024M REUSE

           SYSAUX DATAFILE '/u01/app/oracle/oradata/hgs/sysaux01.dbf' SIZE 1024M REUSE

           DEFAULT TABLESPACE users

              DATAFILE '/u01/app/oracle/oradata/hgs/users01.dbf'

              SIZE 500M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED

           DEFAULT TEMPORARY TABLESPACE tempts1

              TEMPFILE '/u01/app/oracle/oradata/hgs/temp01.dbf'

              SIZE 500M REUSE

           UNDO TABLESPACE undotbs

              DATAFILE '/u01/app/oracle/oradata/hgs/undotbs01.dbf'

              SIZE 200M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;

        创建完成后需要执行几个sql脚本

        sys用户

        @?/rdbms/admin/catalog.sql

        @?/rdbms/admin/catproc.sql

     system 用户

        @?/sqlplus/admin/pupbld.sql

        至此,安装oracle以及创建数据库完毕

感谢你能够认真阅读完这篇文章,希望小编分享的“oracle 12c release2如何安装”这篇文章对大家有帮助,同时也希望大家多多支持创新互联,关注创新互联行业资讯频道,更多相关知识等着你来学习!


文章标题:oracle12crelease2如何安装
文章网址:http://cdkjz.cn/article/gddich.html
多年建站经验

多一份参考,总有益处

联系快上网,免费获得专属《策划方案》及报价

咨询相关问题或预约面谈,可以通过以下方式与我们联系

大客户专线   成都:13518219792   座机:028-86922220