zoukankan      html  css  js  c++  java
  • Oracle Enterprise linux 7 安装Oracle11gR2

    一、修改主机名和IP地址:

    [root@localhost Desktop]# cat /etc/hosts
    127.0.0.1 localhost.localdomain localhost
    192.168.1.203 rusky-oel.com rusky-oel
    [root@localhost Desktop]# cat /etc/hostname
    rusky-oel.com

    [root@localhost VH-share]# vi /etc/sysconfig/network-scripts/ifcfg-eno16777736
    TYPE=Ethernet
    BOOTPROTO=static
    DEFROUTE=yes
    IPV4_FAILURE_FATAL=no
    IPV6INIT=yes
    IPV6_AUTOCONF=yes
    IPV6_DEFROUTE=yes
    IPV6_FAILURE_FATAL=no
    NAME=eth0
    UUID=7ca2767c-872e-4e2b-aac4-40e075b64f31
    ONBOOT=yes
    HWADDR=00:0C:29:AE:DB:8A
    IPADDR0=192.168.1.205
    PREFIX0=24
    GATEWAY0=192.168.1.1
    DNS1=222.172.200.68
    IPV6_PEERDNS=yes
    IPV6_PEERROUTES=yes

    二、修改SElinux,Firewall,SSH
    •If the OS is to be used for an Oracle installation, it is easier if Secure Linux (SELinux) is disabled or switched to

    permissive. To do this edit the "/etc/selinux/config" file, making sure the SELINUX flag is set as follows.

    SELINUX=permissive 或者:SELINUX=disabled
    If SELinux is configured after installation, the server will need a reboot for the change to take effect.

    Firewall
    •If the OS is to be used for an Oracle installation, it is easier if the firewall is disabled. This can be done by issuing

    the following commands from a terminal window as the "root" user.

    # systemctl stop firewalld
    # systemctl disable firewalld

    SSH
    •Make sure the SSH daemon is started using the following commands.
    # systemctl start sshd.service
    # systemctl enable sshd.service

    三、修改内核参数
    Set Kernel Parameters

    Add or amend the following lines in the "/etc/sysctl.conf" file.

    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
    Run the following command to change the current kernel parameters.

    /sbin/sysctl -p
    Add the following lines to the "/etc/security/limits.conf" file.

    oracle              soft    nproc   2047
    oracle              hard    nproc   16384
    oracle              soft    nofile  4096
    oracle              hard    nofile  65536
    oracle              soft    stack   10240
    Add the following line to the "/etc/pam.d/login" file, if it does not already exist.

    session    required     pam_limits.so


    四、安装环境检查及设置
    Setup
    1、检查所需包是否安装
    The following packages are listed as required, including the 32-bit version of some of the packages. Many of the packages

    should be installed already.

    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 elfutils-libelf-devel -y
    Create the new groups and users.

    2、创建用户及组
    groupadd -g 54321 oinstall
    groupadd -g 54322 dba
    groupadd -g 54323 oper
    #groupadd -g 54324 backupdba
    #groupadd -g 54325 dgdba
    #groupadd -g 54326 kmdba
    #groupadd -g 54327 asmdba
    #groupadd -g 54328 asmoper
    #groupadd -g 54329 asmadmin

    useradd -g oinstall -G dba,oper oracle
    passwd oracle
    Note. We are not going to use the extra groups, but include them if you do plan on using them.

    3、创建安装目录
    Create the directories in which the Oracle software will be installed.

    mkdir -p /u01/app/oracle/product/11.2.0.4/db_1
    chown -R oracle:oinstall /u01
    chmod -R 775 /u01
    If you are using X Emulation, login as root and issue the following command.

    xhost +<machine-name>

    4、oracle用户环境变量修改
    Login as the oracle user and add the following lines at the end of the "/home/oracle/.bash_profile" file.
    以oracle用户登录添加如下内容到这个文件:/home/oracle/.bash_profile
    # Oracle Settings
    TMP=/tmp; export TMP
    TMPDIR=$TMP; export TMPDIR

    ORACLE_HOSTNAME=rusky-oel.com; export ORACLE_HOSTNAME
    ORACLE_UNQNAME=DB11G; export ORACLE_UNQNAME
    ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
    ORACLE_HOME=$ORACLE_BASE/product/11.2.0.4/db_1; export ORACLE_HOME
    ORACLE_SID=orcl; export ORACLE_SID
    ORACLE_TERM=xterm; export ORACLE_TERM
    PATH=/usr/sbin:$PATH; export PATH
    PATH=$ORACLE_HOME/bin:$PATH; export PATH

    LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
    CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH

    if [ $USER = "oracle" ]; then
      if [ $SHELL = "/bin/ksh" ]; then
        ulimit -p 16384
        ulimit -n 65536
      else
        ulimit -u 16384 -n 65536
      fi
    fi


    五、执行安装
    installation

    Log into the oracle user. If you are using X emulation then set the DISPLAY environmental variable.

    DISPLAY=192.168.1.203:0.0; export DISPLAY
    Start the Oracle Universal Installer (OUI) by issuing the following command in the database directory.

    ./runInstaller                          DISPLAY报错处理:http://www.cnblogs.com/rusking/p/4232835.html 

    《参数文档: http://oracle-base.com/articles/11g/oracle-db-11gr2-installation-on-oracle-linux-7.php

    =========

    安装过程中报错,处理方法:

    1、检查安装环境时,缺少pdksh包,忽略即可。

    Proceed with the installation of your choice. You can see type of installation I performed by clicking on the links below to see screen shots of each stage. The "pdksh" package will be listed as missing, which can be ignored because we installed the "ksh" package instead.

    2、ins_emagent.mk报错

    During the link phase you will encounter an error invoking the "ins_emagent.mk" file. To fix this, edit the "$ORACLE_HOME/sysman/lib/ins_emagent.mk", doing a search and replace for the line shown below.

    FROM:
    $(MK_EMAGENT_NMECTL)
    TO  :
    $(MK_EMAGENT_NMECTL) -lnnz11

    Click the "Retry" button.

  • 相关阅读:
    async和await
    Promise
    初始flexbox
    制作一个slider动画
    初探React编程逻辑(结合业务需求)
    原型(prototype)和继承(inherit)
    什么是词法环境(lexical scope)
    typeScript是什么
    typeScript基础类型
    原型,原型链,call/apply
  • 原文地址:https://www.cnblogs.com/rusking/p/4253835.html
Copyright © 2011-2022 走看看