1. 程式人生 > >centos7中安裝oracle Linux-x86-64 11gR2

centos7中安裝oracle Linux-x86-64 11gR2

這是我的辛璐歷程,讓我吐槽一番,倒持這個太痛苦了,只是因為就是想在linux中安裝11g的oracle,下了很多資料,查了很多資源,翻了很多牆,用了一個星期才把它攻克。誠摯奉上,希望同路人少走彎路。

首先說下為什麼在vm中的linux中安裝oracle,我就覺得很爽啊,只要你的Virtual Machine不丟失,你就可以移植到其他的vm上了,上面安裝的oracle也都還在。沒有必要重做系統還要重灌oracle

  • 下面說下我的環境

    centos7 x86-64

  • 用到的包

    oracle 11gr2

  • 我參考的安裝的網站

    但是有個地方很重要
    不要按照上面的操作
    一定要選擇第一個去配置,過來人經驗,否則會吃很多苦頭。

    要選擇第一個配置

  • 安裝oracle需要下載的包

    yum install binutils-2.* compat-libstdc++-33* elfutils-libelf-0.* elfutils-libelf-devel-* gcc-4.* gcc-c++-4.* glibc-2.* glibc-common-2.* glibc-devel-2.* glibc-headers-2.* ksh-2* libaio-0.* libaio-devel-0.* libgcc-4.* libstdc++-4.* libstdc++-devel-4.* make-3.* sysstat-7.* unixODBC-2.* unixODBC-devel-2.*
    pdksh*
  • 驗證oracle需要下載的包

     rpm -qa binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel elfutils-libelf-devel-static gcc gcc-c++ glibc glibc-common glibc-devel glibc-headers glibc-static kernel-headers pdksh libaio libaio-devel libgcc libgomp libstdc++ libstdc++-devel libstdc++-static make numactl-devel
    sysstat unixODBC unixODBC-devel
  • 問題:安裝oracle時,如何指定jdk 或者如何解決提示框顯示不全

    解決方案:
    ./runInstaller -jreLoc JRE_LOCATION

    [oracle@localhost Desktop]$ ls -lrt /usr/bin/java
    lrwxrwxrwx. 1 root root 22 Nov 27 02:54 /usr/bin/java -> /etc/alternatives/java
    [oracle@localhost Desktop]$ ls -lrt /etc/alternatives/java
    lrwxrwxrwx. 1 root root 70 Nov 27 02:54 /etc/alternatives/java -> /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.65-3.b17.el7.x86_64/jre/bin/java

    JRE_LOCATION 使用這個地址 ./runInstaller -jreLoc /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.65-3.b17.el7.x86_64/jre

  • 問題:INFO: make[1]: Leaving directory
    `/u01/app/oracle/product/11.2.0.3/sysman/lib’ INFO: make: [emdctl]
    Error 2

    解決方法:

    vi $ORACLE_HOME/sysman/lib/ins_emagent.mk
    搜尋以下行:
    $(MK_EMAGENT_NMECTL)
    改變為:
    $(MK_EMAGENT_NMECTL) -lnnz11
    
  • 問題:ERROR: ORA-09925: Unable to create audit trail file Linux Error: 2:
    No such file or directory Additional information: 9925 ORA-01075: you
    are currently logged on

    解決方案:

    [oracle@Allen adump]$ ps -ef |grep smon
    oracle    2479    1  0 02:52 ?        00:00:00 ora_smon_allen
    oracle  27854    1  0 08:43 ?        00:00:00 ora_smon_prod
    oracle  27946 27885  0 08:48 pts/6    00:00:00 grep smon
    [oracle@Allen adump]$ kill -9 27854
  • 問題:ORA-00845: MEMORY_TARGET not supported on this system
    [root@aaaprod-db ~]# cat /etc/fstab | grep tmpfs
    tmpfs                  /dev/shm              tmpfs  defaults,size=8g      0 0
    [root@aaaprod-db ~]#
    [root@aaaprod-db ~]# mount -o remount,size=16G /dev/shm
    [root@aaaprod-db ~]#
    [root@aaaprod-db ~]# cat /etc/fstab | grep tmpfs
    tmpfs                  /dev/shm              tmpfs  defaults,size=8g      0 0
    [root@aaaprod-db ~]# vi /etc/fstab
    /dev/rootvg/LogVol02  /                      ext3  defaults      1 1
    /dev/rootvg/LogVol01  /tmp                  ext3  defaults      1 2
    /dev/rootvg/lvol0    /ebao                  ext3  defaults      1 2
    /dev/rootvg/lvol1    /backup                ext3  defaults      1 2
    LABEL=/boot            /boot                  ext3  defaults      1 2
    tmpfs                  /dev/shm              tmpfs  defaults,size=16g      0 0
    devpts                /dev/pts              devpts gid=5,mode=620 0 0
    sysfs                  /sys                  sysfs  defaults      0 0
    proc                  /proc                  proc  defaults      0 0
    /dev/rootvg/LogVol00  swap                  swap  defaults      0 0
    "/etc/fstab" 10L, 769C written
    [root@aaaprod-db ~]# df -h|grep shm
    tmpfs                16G    0  16G  0% /dev/shm