CentOS 7 Installation Oracle 11g

Source: Internet
Author: User
Tags chmod dba

The new cloud host environment, the system is CentOS 7 x86_64, needs to be installed on the installation of oracle11.2g. Groping for a long time, finally toss the fix.

Download Oracle
    1. : Oracle 11.2.0.2 (only download 11.2.0.2 because it is not a paid user, cannot download the latest 11.2.0.4. 囧

After downloading, there are two compressed packages:

    • Linux.x64_11gR2_database_1of2.zip
    • Linux.x64_11gR2_database_2of2.zip

    • Extract

      Unzip Linux.x64_11gR2_database_1of2.zip
      Unzip Linux.x64_11gR2_database_2of2.zip

Configuring additional Oracle Users and related user groups
    1. Switch to root user

      Su-root

    2. Adding user groups

      --required groups
      /USR/SBIN/GROUPADD-G 501 Oinstall
      /USR/SBIN/GROUPADD-G 502 DBA
      /USR/SBIN/GROUPADD-G 503 Oper

    3. Add Users

      /usr/sbin/useradd-u 502-g oinstall-g Dba,oper Oracle

    4. Set the password for an Oracle user

      passwd Oracle

      Then enter the password you want to set.

System Configuration
  1. Modify/etc/sysctl.conf

    Vim/etc/sysctl.conf

    Add the following content:

    4096  kernel.shmmax = 4398046511104 kernel.shmall = 1073741824 kernel.sem = 250 32000 100 128 fs.aio-max-nr = 1048576 fs.file-max = 6815744 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

    Make the changes effective:

    /sbin/sysctl-p

  2. Modify /etc/security/limits.conf

    vim/etc/security/limits.conf

    Add the following

     Oracle soft nproc 131 072 Oracle Hard Nproc 131072 Oracle soft nofile 131072 or Acle hard Nofile 131072 Oracle Soft Core Unlimited Oracle Hard Core Unlimi Ted Oracle Soft Memlock 50000000 Oracle hard Memlock 50000000       
  3. Make sure that /etc/hosts contains the server machine name, like this (skip this step if it already contains):

    <IP-address> < Fully-qualified-machine-name> <machine-name>

    For example, the server name is centos7-001, which could have been configured like this:

    blockquote>

    127.0.0.1 centos7-001 localhost localhost.localdomain

    And then ping it, try it:

    Ping-c 1 centos7-001

    The correct result:

    ---CENTOS7 ping statistics---1 Packets Transmitted, 1 received, 0% packet loss, time 0ms      
  4. Modify/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
  5. Modifying an Oracle User environment variable

    Switch to Oracle User

    Su-oracle

    Modify .bash_profile , add the following content:

    # Oracle Settings export TMP=/tmp umask 022 export ORACLE_BASE=/data2/oracle/app # 安装路径根据实际情况修改 export ORACLE_BASE ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1 # 安装路径根据实际情况修改 export ORACLE_HOME PATH=$PATH:$ORACLE_HOME/bin export PATH

    To make it effective:

    source. bash_profile

  6. Creating an installation path and authorizing it to an Oracle user

     su - root  mkdir -p /data2/oracle/app chown oracle:oinstall /data2/oracle/app chmod 775 /data2/oracle/app mkdir -p /data2/oracle/app/oracle chown oracle:oinstall /data2/oracle/app/oracle chmod 775 /data2/oracle/app/oracle mkdir -p /data2/oracle/app/oracle/product/11.2.0/db_1 chown oracle:oinstall -R /data2/oracle/app/oracle
Installation dependencies
>Yum-YInstallBinutilsCompat-libcap1Compat-libstdc++-33Compat-libstdc++-33*. i686Elfutils-libelf-develGccGcc-c++glibc*. i686glibcGlibc-develglibc-devel*. i686Kshlibgcc*. i686 libgcc libstdc++ libstdc++*. i686 libstdc++ -devel libstdc++-devel*. i686 Libaio libaio*. i686 libaio-devel libaio-devel*. i686 make sysstat  UnixODBC unixodbc*. i686 unixodbc-devel unixodbc-devel*. i686    libxp  
Installing the Graphical interface
  1. CentOS 7 Installation GNOME graphical interface

    Yum Groupinstall "GNOME Desktop" "Graphical administration Tools"

  2. Installing the Gnome GUI using the Times error:

    TransactionCheckErrorfile/usr/lib/systemd/system/blk-Availability.serviceFromInstallof device-mapper-7:1.02.107-5.el7.x86_64 conflictsWithFileFromPackage lvm2-7:2.02.105-14.el7.x86_64File/usr/sbin/blkdeactivateFromInstallof device-mapper-7:1.02.107-5.el7.x86_64 conflictsWithFileFromPackage lvm2-7:2.02.105-14.el7.x86_64 file/usr/share/man/man8/blkdeactivate.8. GZ from install of device-mapper- 7:1.02.107- 5.el7.x86_64 conflicts with file Span class= "Hljs-keyword" >from package lvm2-7:2.02.105-14.el7.x86_64 error Summary -------------      

    Workaround, upgrade lvm2 first:

    Yum-y Install LVM2

Installing Oracle
    1. Because I'm using a remote host, I'm using VNC as a remote Linux graphics desktop.

      To install VNC on a remote host:

      Yum-y Install Vnc-server

      Set Password:

      vncpasswd

      Start Vncserver:

      Vncserver

      Set Display:

      Export Display=:1

      Set graphical desktop access rights

      Xhost +

      Vncserver default port is 5900 + serial number, the first one is 5901 .

      Install and run the VNC client in a local Windows environment: https://www.realvnc.com/download/vnc/

    2. Using VNC to connect to a remote host, right-click on the command line on the desktop, go to the path where Oracle is located, and then:

      CD Database
      Export Display=:1
      ./runinstaller

      You can then start the Oracle GUI Installation Wizard.

Problems encountered
  1. Installing the Gnome GUI using the Times error:

    TransactionCheckErrorfile/usr/lib/systemd/system/blk-Availability.serviceFromInstallof device-mapper-7:1.02.107-5.el7.x86_64 conflictsWithFileFromPackage lvm2-7:2.02.105-14.el7.x86_64File/usr/sbin/blkdeactivateFromInstallof device-mapper-7:1.02.107-5.el7.x86_64 conflictsWithFileFromPackage lvm2-7:2.02.105-14.el7.x86_64 file/usr/share/man/man8/blkdeactivate.8. GZ from install of device-mapper- 7:1.02.107- 5.el7.x86_64 conflicts with file Span class= "Hljs-keyword" >from package lvm2-7:2.02.105-14.el7.x86_64 error Summary -------------      

    Workaround, upgrade lvm2 first:

    Yum-y Install LVM2

  2. Installing the Oracle times error [email protected]_2.14 not found:

     INFO: /lib64/libstdc++.so.5: undefined reference to `[email protected]_2.14‘ collect2: error: ld returned 1 exit status INFO: make: *** [ctxhx] Error 1 INFO: End output from spawned process.

    Workaround, first see if the/USR/LIB64/LIBC.A exists:

    ls/usr/lib64 | grep LIBC.A

    If you do not find the installation first: Glibc-static, if any, skip this step

    Yum-y Install Glibc-static

    Modify the ORACLE installation directory $ORACLE _home/ctx/lib/ins_ctx.mk
    Will

         ctxhx: $(CTXHXOBJ)         $(LINK_CTXHX) $(CTXHXOBJ) $(INSO_LINK)

    Modified to:

         ctxhx: $(CTXHXOBJ)         -static $(LINK_CTXHX) $(CTXHXOBJ) $(INSO_LINK) /usr/lib64/libc.a

    Then click Retry to pass

  3. Install the Oracle times Error error in invoking target ' agent NMHS ':

    Error in invoking target ‘agent nmhs‘ of makefile ‘/data2/oracle/app/oracle/product/11.2.0/dbhome_1/sysman/lib/ins_emagent.mk‘

    Workaround: Modify$ORACLE_HOME/sysman/lib/ins_emagent.mk
    Will

    $ (MK_EMAGENT_NMECTL)

    Revision changed to

    $ (MK_EMAGENT_NMECTL)-lnnz11

    Then click Retry to pass

  4. At this point, you can use clients such as Sqldevelper to connect to Oracle



Wen/cpthiro (author of Jane's book)
Original link: http://www.jianshu.com/p/2fda26a7edf1
Copyright belongs to the author, please contact the author to obtain authorization, and Mark "book author". Ext.: Http://www.jianshu.com/p/2fda26a7edf1?nomobile=yes

CentOS 7 Installation Oracle 11g

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.