zoukankan      html  css  js  c++  java
  • ubuntu16.04安装oracle12C

     Step 1 : Installation of Java8  for Linux

    Java 8 下载地址

    http://www.oracle.com/technetwork/java/javase/downloads/index.html

    创建解压缩目录

    sudo mkdir /usr/lib/jvm

    解压缩到该目录

    sudo tar -zxvf jdk-8u161-linux-x64.gz -C /usr/lib/jvm

    在/bin目录下创建java软链接

    cd /bin
    sudo ln -s /usr/lib/jvm/jdk1.8.0_161/bin/java java

    验证软件接的正确性

    java -version

    设置Java环境

    sudo gedit /etc/profile

    在文件末尾添加如下内容

    export JAVA_HOME=/usr/lib/jvm/jdk1.8.0_161
    export JRE_HOME=${JAVA_HOME}/jre
    export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
    export PATH=${JAVA_HOME}/bin:$PATH

    然后执行如下命令

    source /etc/profile

    echo $JAVA_HOME

    Step 2 : Oracle Installation Prerequisites

    运行以下命令来安装依赖项

    sudo apt-get update

    sudo apt-get dist-upgrade

    重启系统

    sudo init 6

    再次检查更新

    sudo apt-get dist-upgrade

    安装环境所需要的安装包

    sudo apt-get install automake

    sudo apt-get install autotools-dev

    sudo apt-get install binutils

    sudo apt-get install bzip2

    sudo apt-get install elfutils

    sudo apt-get install expat

    sudo apt-get install gawk

    sudo apt-get install gcc

    sudo apt-get install gcc-multilib

    sudo apt-get install g++-multilib

    sudo apt-get install ia32-libs

    sudo apt-get install ksh

    sudo apt-get install less

    sudo apt-get install lesstif2

    sudo apt-get install lesstif2-dev

    sudo apt-get install lib32z1

    sudo apt-get install libaio1

    sudo apt-get install libaio-dev

    sudo apt-get install libc6-dev

    sudo apt-get install libc6-dev-i386

    sudo apt-get install libc6-i386

    sudo apt-get install libelf-dev

    sudo apt-get install libltdl-dev

    sudo apt-get install libmotif4

    sudo apt-get install libodbcinstq4-1 libodbcinstq4-1:i386

    sudo apt-get install libpth-dev

    sudo apt-get install libpthread-stubs0

    sudo apt-get install libpthread-stubs0-dev

    sudo apt-get install libstdc++5

    sudo apt-get install lsb-cxx

    sudo apt-get install make

    sudo apt-get install openssh-server

    sudo apt-get install pdksh

    sudo apt-get install rlwrap

    sudo apt-get install rpm

    sudo apt-get install sysstat

    sudo apt-get install unixodbc

    sudo apt-get install unixodbc-dev

    sudo apt-get install unzip

    sudo apt-get install x11-utils

    sudo apt-get install zlibc

    Step 3 : Create user and groups

    sudo addgroup oinstall
    sudo addgroup dba
    sudo addgroup nobody
    sudo usermod -g nobody nobody
    sudo useradd -g oinstall -G dba -p password -d /home/oracle -s /bin/bash oracle
    sudo mkdir /home/oracle
    sudo chown -R oracle:dba /home/oracle
    sudo mkdir -p /u01/app/oracle
    sudo mkdir -p /u01/binaries
    sudo chown -R oracle:dba /u01

    为oracle用户创建密码:输入两次

    sudo passwd oracle

    Step 4 : Symbolic link, Kernel parameters and shell configuration as per the Oracle 12c Documentation

    运行以下命令进行伪装Ubuntu系统

    echo 'Red Hat Linux release 6' | sudo tee -a /etc/redhat-release

    运行以下命令为启动环境所需的安装包创建链接

    sudo mkdir /usr/lib64
    sudo ln -s /etc /etc/rc.d
    sudo ln -s /lib/x86_64-linux-gnu/libgcc_s.so.1 /lib64/
    sudo ln -s /usr/bin/awk /bin/awk
    sudo ln -s /usr/bin/basename /bin/basename
    sudo ln -s /usr/bin/rpm /bin/rpm
    sudo ln -s /usr/lib/x86_64-linux-gnu/libc_nonshared.a /usr/lib64/
    sudo ln -s /usr/lib/x86_64-linux-gnu/libpthread_nonshared.a /usr/lib64/
    sudo ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6 /lib64/
    sudo ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6 /usr/lib64/

    配置全局环境变量

    sudo /etc/profile
    在文件末尾添加如下内容

    export ORACLE_BASE=/u01/app/oracle
    export ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1
    export ORACLE_OWNR=oracle
    export PATH=$PATH:$ORACLE_HOME/bin
    export ORACLE_SID=orcl

    然后执行如下命令
    source /etc/profile

    运行以下为oracle用户改变一些系统参数

    sudo cp /etc/security/limits.conf /etc/security/limits.conf.original
    echo "#Oracle 12C shell limits:" | sudo tee -a /etc/security/limits.conf
    echo "oracle soft nproc 2048" | sudo tee -a /etc/security/limits.conf
    echo "oracle hard nproc 16384"| sudo tee -a /etc/security/limits.conf
    echo "oracle soft nofile 1024" | sudo tee -a /etc/security/limits.conf
    echo "oracle hard nofile 65536" | sudo tee -a /etc/security/limits.conf
    echo "oracle soft stack 10240" | sudo tee -a /etc/security/limits.conf
    echo "oracle hard stack 32768" | sudo tee -a /etc/security/limits.conf

    运行以下命令改变内核参数

    echo "#" | sudo tee -a /etc/sysctl.conf
    echo "# Oracle 12C entries" | sudo tee -a /etc/sysctl.conf
    echo "fs.aio-max-nr=1048576" | sudo tee -a /etc/sysctl.conf
    echo "fs.file-max=6815744" | sudo tee -a /etc/sysctl.conf
    echo "kernel.shmall=2097152" | sudo tee -a /etc/sysctl.conf
    echo "kernel.shmmni=4096" | sudo tee -a /etc/sysctl.conf
    echo "kernel.sem=250 32000 100 128" | sudo tee -a /etc/sysctl.conf
    echo "net.ipv4.ip_local_port_range=9000 65500" | sudo tee -a /etc/sysctl.conf
    echo "net.core.rmem_default=262144" | sudo tee -a /etc/sysctl.conf
    echo "net.core.rmem_max=4194304" | sudo tee -a /etc/sysctl.conf
    echo "net.core.wmem_default=262144" | sudo tee -a /etc/sysctl.conf
    echo "net.core.wmem_max=1048586" | sudo tee -a /etc/sysctl.conf
    echo "kernel.shmmax=1073741824" | sudo tee -a /etc/sysctl.conf

    为使改变数据生效,执行:

    sudo sysctl -p

    创建启动脚本
    mkdir /etc/rc.d
    for i in 0 1 2 3 4 5 6 S
    do sudo ln -s /etc/rc$i.d /etc/rc.d/rc$i.d 
    done

    重启后用oracle用户登录。

    Step 5 : Download Oracle 12C database for Linux

    下载oracle文件

    linuxamd64_12102_database_1of2.zip

    linuxamd64_12102_database_2of2.zip

    创建安装路径

    sudo mkdir -p /home/oracle/orainst/12.1.0.2

    把下载好的文件移动到安装路径

    sudo mv linuxamd64_12102_database_1of2.zip /home/oracle/orainst/12.1.0.2

    sudo mv linuxamd64_12102_database_2of2.zip /home/oracle/orainst/12.1.0.2

    使用unzip命令依次进行解压缩两个zip文件

    cd /home/oracle/orainst/12.1.0.2

    sudo unzip  linuxamd64_12102_database_1of2

    sudo unzip  linuxamd64_12102_database_2of2

    解压完成后,执行ls命令查看是否有database文件夹

    Step 6 : Installation of Oracle 12C database for Linux

    改变文件路径所属的用户组为oracle用户的dba组
    chown -Rf oracle:dba /home/oracle/orainst/12.1.0.2 

    执行以下命令解决安装界面乱码

    export LANG=US

    执行以下命令开始安装

    /home/oracle/orainst/12.1.0.2/database/runInstaller -ignoreSysPrereqs

     安装过程如下:

    As the Ubuntu is not supported OS we need to we are seeing the below error, just click on Yes button to go ahead.

    In Selection Installation Option choose Create and configure a databaseand click on Next to go further

    In System Class screen select Server Class and click on Next to go further

    In Grid Installation Option screen select Single instance database installation and click on Next to go further

    In Select Install Type screen select Advanced install and click on Next to go further

    In Select Product Language screen select appropriate language and and click on Next to go further

    In Select Database Edition screen I am selecting Enterprise Edition due to space issue. Click Next to go further.

    In Specify Installation Location screen, I kept it as default and click Next to go further

    In Select Configuration Type screen, select General Purpose / Transaction Processing and click Next to proceed further.

    In Specify Database Identifiers screen, let it be default and click Next to go further. Here we need to remember the Oracle system identifier (SID)

     

    In Specify Configuration Options configure as below:
    Under Memory select Enable Automatic Memory Management: TRUE
    Under Character sets select Use Unicode (AL32UTF8)

    Leave default settings under Specify Database Storage Options and clickNext to go further.

    Leave default settings under Specify Management Options and click Next to go further.

    Leave default settings under Specify Recovery Options and click Next to go further.

    In Specify Schema Passwords screen I choose Use the same password for all accounts because of laziness. Click Next to go further.

     

    Skip the warning by clicking Yes

    Leave the default option under Privileged Operating System group and clickNext to go further.

    Save the summary for future use and click Install to go further.

     

     安装过程中出现错误

     Oops we got “all_no_orcl” error

    In the logs for above error I have observed following line

    INFO: /usr/bin/ld: /u01/app/oracle/product/12.1.0/dbhome_1/lib//libclntsh.so: undefined reference to symbol 'ztucxtb'
    /u01/app/oracle/product/12.1.0/dbhome_1/lib//libnnz12.so: error adding symbols: DSO missing from command line
    collect2: error: ld returned 1 exit status

    INFO: /u01/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/ins_rdbms.mk:878: recipe for target '/u01/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/orapwd' failed

    INFO: make: *** [/u01/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/orapwd] Error 1

    INFO: End output from spawned process.
    INFO: ----------------------------------
    INFO: Exception thrown from action: make
    Exception Name: MakefileException
    Exception String: Error in invoking target 'all_no_orcl' of makefile '/u01/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/ins_rdbms.mk'. See '/u01/app/oraInventory/logs/installActions2018-03-08_09-48-00AM.log' for details.
    Exception Severity: 1

    So I checked the ldd output of /u01/app/oracle/product/12.1.0/dbhome_1/lib/libnnz12.so file.

    Run following command to rectify this

       sudo ln -s /u01/app/oracle/product/12.1.0/dbhome_1/lib/libclntshcore.so.12.1 /usr/lib/

    Now see the linking agai

    Further do following
    Take a backup of /u01/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/ins_rdbms.mk

    Open /u01/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/ins_rdbms.mk and search for Linking password utility (orapwd), you will see following lines

    $(ORAPWD) : $(ALWAYS) $(ORAPWD_DEPS)
    $(SILENT)$(ECHO)
    $(SILENT)$(ECHO) " - Linking password utility (orapwd)"
    $(RMF) $@
    $(ORAPWD_LINKLINE)

    Now change it to as follows

    $(ORAPWD) : $(ALWAYS) $(ORAPWD_DEPS)
    $(SILENT)$(ECHO)
    $(SILENT)$(ECHO) " - Linking password utility (orapwd)"
    $(RMF) $@
    $(ORAPWD_LINKLINE) -lnnz12

    Click on retry to go further.Again you will see error for all_no_orcl.

    In the logs for above error I have observed following line

    INFO: /usr/bin/ld: /u01/app/oracle/product/12.1.0/dbhome_1/lib//libagtsh.so: undefined reference to symbol 'ssMemRealloc'
    /u01/app/oracle/product/12.1.0/dbhome_1/lib//libclntshcore.so: error adding symbols: DSO missing from command line
    collect2: error: ld returned 1 exit status

    INFO: /u01/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/ins_rdbms.mk:954: recipe for target '/u01/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/hsots' failed

    INFO: make: *** [/u01/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/hsots] Error 1

    INFO: End output from spawned process.
    INFO: ----------------------------------
    INFO: Exception thrown from action: make
    Exception Name: MakefileException
    Exception String: Error in invoking target 'all_no_orcl' of makefile '/u01/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/ins_rdbms.mk'. See '/u01/app/oraInventory/logs/installActions2018-03-08_09-48-00AM.log' for details.
    Exception Severity: 1

    So I have run ldd /u01/app/oracle/product/12.1.0/dbhome_1/lib//libagtsh.so

    To rectify run following

    sudo ln -s /u01/app/oracle/product/12.1.0/dbhome_1/lib/libclntsh.so.12.1 /usr/lib/

    Check the linking again

    Further you need to do changes in /u01/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/ins_rdbms.mk file. Open the file using file editor and search for Linking HS OTS agent. You will see following lines.

    $(HSOTS) : $(ALWAYS) $(HSOTS_DEPS)
            $(SILENT)$(ECHO)
            $(SILENT)$(ECHO) " - Linking HS OTS agent"
            $(RMF) $@
            $(HSOTS_LINKLINE)

    Change it to as follows

    $(HSOTS) : $(ALWAYS) $(HSOTS_DEPS)
            $(SILENT)$(ECHO)
            $(SILENT)$(ECHO) " - Linking HS OTS agent"
            $(RMF) $@
            $(HSOTS_LINKLINE) -lagtsh

    Also you need to do changes in /u01/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/env_rdbms.mk file.
    First take the backup of file using following command

    Now open /u01/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/env_rdbms.mk using file editor and search for HSOTS_LINKLINE.

    You will see following lines in the file.

    HSOTS_LINKLINE=$(LINK) $(OPT) $(HSOTSMAI) $(HSALIB_SUBSET1) 
            $(HS_OTS_DRIVER) $(HS_XASWITCH_ORA) $(RDBMSLIB)$(XAD_OFF) 
            $(HSALIB_SUBSET2)

    Change it to as follows

    HSOTS_LINKLINE=$(LINK) $(OPT) -Wl,--no-as-needed $(HSOTSMAI) $(HSALIB_SUBSET1) 
            $(HS_OTS_DRIVER) $(HS_XASWITCH_ORA) $(RDBMSLIB)$(XAD_OFF) 
            $(HSALIB_SUBSET2)

    Click on retry to go further.Again you will see error for all_no_orcl.

    In the logs for above error I have observed following line

    INFO: /usr/bin/ld: /u01/app/oracle/product/12.1.0/dbhome_1/lib//libagtsh.so: undefined reference to symbol 'ssMemRealloc'
    /u01/app/oracle/product/12.1.0/dbhome_1/lib//libclntshcore.so: error adding symbols: DSO missing from command line
    collect2: error: ld returned 1 exit status

    INFO: /u01/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/ins_rdbms.mk:948: recipe for target '/u01/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/hsdepxa' failed

    INFO: make: *** [/u01/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/hsdepxa] Error 1

    INFO: End output from spawned process.
    INFO: ----------------------------------
    INFO: Exception thrown from action: make
    Exception Name: MakefileException
    Exception String: Error in invoking target 'all_no_orcl' of makefile '/u01/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/ins_rdbms.mk'. See '/u01/app/oraInventory/logs/installActions2018-03-08_09-48-00AM.log' for details.
    Exception Severity: 1

    For above error we need to do changes in /u01/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/env_rdbms.mk. Search for HSDEPXA_LINKLINE and you will see following lines in the file.

    HSDEPXA_LINKLINE=$(LINK) $(OPT) $(HSDEPMAI) $(HSALIB_SUBSET1) 
            $(HS_DEP_DRIVER) $(RDBMSLIB)$(XAD_OFF) 
            $(HSALIB_SUBSET2)

    Change it to as follows

    HSDEPXA_LINKLINE=$(LINK) $(OPT) -Wl,--no-as-needed $(HSDEPMAI) $(HSALIB_SUBSET1) 
            $(HS_DEP_DRIVER) $(RDBMSLIB)$(XAD_OFF) 
            $(HSALIB_SUBSET2)

    Click on retry to go further.Again you will see error for all_no_orcl.

    In the logs for above error I have observed following line

    INFO: 0/dbhome_1/lib//libasmclntsh12.so: undefined reference to `clsCredInit'
    collect2: error: ld returned 1 exit status
    make: *** [/u01/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/amdu] Error 1

    INFO: End output from spawned process.
    INFO: ----------------------------------
    INFO: Exception thrown from action: make
    Exception Name: MakefileException
    Exception String: Error in invoking target 'all_no_orcl' of makefile '/u01/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/ins_rdbms.mk'. See '/u01/app/oraInventory/logs/installActions2018-03-08_09-48-00AM.log' for details.
    Exception Severity: 1

    For above error we need to do changes in /u01/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/env_rdbms.mk. Search for AMDU_LINKLINE and you will see following lines in the file.

    AMDU_LINKLINE=$(LINK) $(S0MAIN) $(SSKFMUED) $(SKFMUPT) $(LLIBCLNTSH) 
            $(LLIBDBTOOLS) $(LLIBCORE) $(LLIBGENERIC) $(LLIBUNLSRTL) 
            $(LLIBNLSRTL) $(LLIBCORE) $(LLIBSAGE) $(LLIBSKGXP) 
            $(LLIBNLSRTL) $(CSSCLNTLIBS) $(LLIBASMCLNT) $(LINKTTLIBS)

    Change it to as follows

    AMDU_LINKLINE=$(LINK) $(S0MAIN) -Wl,--no-as-needed $(SSKFMUED) $(SKFMUPT) $(LLIBCLNTSH) 
            $(LLIBDBTOOLS) $(LLIBCORE) $(LLIBGENERIC) $(LLIBUNLSRTL) 
            $(LLIBNLSRTL) $(LLIBCORE) $(LLIBSAGE) $(LLIBSKGXP) 
            $(LLIBNLSRTL) $(CSSCLNTLIBS) $(LLIBASMCLNT) $(LINKTTLIBS)

    Click on retry to go further.Again you will see error for all_no_orcl.

     

    In the logs for above error I have observed following line

    INFO: /u01/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/ins_rdbms.mk:1140: recipe for target '/u01/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/kfed' failed

    INFO: make: *** [/u01/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/kfed] Error 1

    INFO: End output from spawned process.
    INFO: ----------------------------------
    INFO: Exception thrown from action: make
    Exception Name: MakefileException
    Exception String: Error in invoking target 'all_no_orcl' of makefile '/u01/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/ins_rdbms.mk'. See '/u01/app/oraInventory/logs/installActions2018-03-08_03-18-38PM.log' for details.
    Exception Severity: 1

    For above error we need to do changes in /u01/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/env_rdbms.mk. Search for KFED_LINKLINE and you will see following lines in the file.

    KFED_LINKLINE=$(LINK) $(S0MAIN) $(SSKFEDED) $(SKFEDPT)  
                  $(LLIBDBTOOLS) $(LLIBSAGE) 
                  $(LLIBSKGXP) $(CSSCLNTLIBS_SERVER) $(LLIBASMCLNT) $(LINKTTLIBS)

    Change it to as follows

    KFED_LINKLINE=$(LINK) $(S0MAIN) -Wl,--no-as-needed $(SSKFEDED) $(SKFEDPT)  
                  $(LLIBDBTOOLS) $(LLIBSAGE) 
                  $(LLIBSKGXP) $(CSSCLNTLIBS_SERVER) $(LLIBASMCLNT) $(LINKTTLIBS)

    Click on retry to go further.Again you will see error for all_no_orcl.

     

    In the logs for above error I have observed following line

    INFO: product/12.1.0/dbhome_1/lib//libasmclntsh12.so: undefined reference to `procr_get_last_error'
    /u01/app/oracle/product/12.1.0/dbhome_1/lib//libasmclntsh12.so: undefined reference to `clsCredInit'
    collect2: error: ld returned 1 exit status
    make: *** [/u01/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/renamedg] Error 1

    INFO: End output from spawned process.
    INFO: ----------------------------------
    INFO: Exception thrown from action: make
    Exception Name: MakefileException
    Exception String: Error in invoking target 'all_no_orcl' of makefile '/u01/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/ins_rdbms.mk'. See '/u01/app/oraInventory/logs/installActions2018-03-08_03-18-38PM.log' for details.
    Exception Severity: 1

    For above error we need to do changes in /u01/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/env_rdbms.mk. Search for renamedg  and you will see following lines in the file.

    KFED=$(RDBMSBIN)kfed$(EXE_SUFFIX)
    KFOD=$(RDBMSBIN)kfod$(EXE_SUFFIX)
    AMDU=$(RDBMSBIN)amdu$(EXE_SUFFIX)
    KFNDG=$(RDBMSBIN)renamedg$(EXE_SUFFIX)

    Further Search for KFNDG_LINKLINE  and you will see following lines in the file.

    KFNDG_LINKLINE=$(LINK) $(S0MAIN) $(SSKFNDGED) $(SKFNDGPT) $(KFNDGOBJ) 
                   $(LLIBCLNTSH) $(LIBGENERIC) $(DEF_OPT) $(LLIBDBTOOLS) $(LIBGENERIC)
                   $(LIBCORE) $(CSSCLNTLIBS) $(ASMCLNT_LIBS) $(LINKTTLIBS

    Change it to as follows

    KFNDG_LINKLINE=$(LINK) $(S0MAIN) -Wl,--no-as-needed $(SSKFNDGED) $(SKFNDGPT) $(KFNDGOBJ) 
                   $(LLIBCLNTSH) $(LIBGENERIC) $(DEF_OPT) $(LLIBDBTOOLS) $(LIBGENERIC)
                   $(LIBCORE) $(CSSCLNTLIBS) $(ASMCLNT_LIBS) $(LINKTTLIBS

    Click retry to go further.Again I got error for utilities.

    In the logs for above error I have observed following line.

    INFO: /usr/bin/ld: /u01/app/oracle/product/12.1.0/dbhome_1/lib//libagtsh.so: undefined reference to symbol 'nsdisc'
    /u01/app/oracle/product/12.1.0/dbhome_1/lib//libclntsh.so: error adding symbols: DSO missing from command line
    collect2: error: ld returned 1 exit status

    INFO: /u01/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/ins_rdbms.mk:927: recipe for target '/u01/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/extproc' failed

    INFO: make: *** [/u01/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/extproc] Error 1

    INFO: End output from spawned process.
    INFO: ----------------------------------
    INFO: Exception thrown from action: make
    Exception Name: MakefileException
    Exception String: Error in invoking target 'utilities' of makefile '/u01/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/ins_rdbms.mk'. See '/u01/app/oraInventory/logs/installActions2018-03-08_03-18-38PM.log' for details.
    Exception Severity: 1

    For above error we need to do changes in /u01/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/ins_rdbms.mk. Search for

    Linking external procedure agent and you will see following lines in the file.

    $(EXTPROC): $(ALWAYS) $(EXTPROC_DEPS)
            $(SILENT)$(ECHO)
            $(SILENT)$(ECHO) "Linking external procedure agent ($@)"
            $(RMF) $@
            $(EXTPROC_LINKLINE)

    Change it to as follows

    $(EXTPROC): $(ALWAYS) $(EXTPROC_DEPS)
            $(SILENT)$(ECHO)
            $(SILENT)$(ECHO) "Linking external procedure agent ($@)"
            $(RMF) $@
            $(EXTPROC_LINKLINE) -lagtsh

    Click retry to go further.Again I got error for utilities

    In the logs for above error I have observed following line.

    INFO: /usr/bin/ld: /u01/app/oracle/product/12.1.0/dbhome_1/lib//libagtsh.so: undefined reference to symbol 'nsdisc'
    /u01/app/oracle/product/12.1.0/dbhome_1/lib//libclntsh.so: error adding symbols: DSO missing from command line

    INFO: /u01/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/ins_rdbms.mk:927: recipe for target '/u01/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/extproc' failed

    INFO: collect2: error: ld returned 1 exit status
    make: *** [/u01/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/extproc] Error 1

    INFO: End output from spawned process.
    INFO: ----------------------------------
    INFO: Exception thrown from action: make
    Exception Name: MakefileException
    Exception String: Error in invoking target 'utilities' of makefile '/u01/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/ins_rdbms.mk'. See '/u01/app/oraInventory/logs/installActions2018-03-08_03-18-38PM.log' for details.
    Exception Severity: 1

    For above error we need to do changes in /u01/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/ins_rdbms.mk. Search for

    Linking external procedure agent and you will see following lines in the file.

    $(EXTPROC): $(ALWAYS) $(EXTPROC_DEPS)
            $(SILENT)$(ECHO)
            $(SILENT)$(ECHO) "Linking external procedure agent ($@)"
            $(RMF) $@
            $(EXTPROC_LINKLINE)

    Change it to as follows

    $(EXTPROC): $(ALWAYS) $(EXTPROC_DEPS)
            $(SILENT)$(ECHO)
            $(SILENT)$(ECHO) "Linking external procedure agent ($@)"
            $(RMF) $@
            $(EXTPROC_LINKLINE) -lagtsh

    Further we also need to do changes in /u01/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/env_rdbms.mk file. Open the file with text editor and search for EXTPROC_LINKLINE and you will see following lines in the file.

    EXTPROC_LINKLINE=$(LINK) $(OPT) $(EXTPMAI) $(PROD_EXTPROC_OPT) 
            $(HSALIB_SUBSET1) $(HSALIB_SUBSET2)

    Change it to as follows

    EXTPROC_LINKLINE=$(LINK) $(OPT) -Wl,--no-as-needed $(EXTPMAI) $(PROD_EXTPROC_OPT) 
            $(HSALIB_SUBSET1) $(HSALIB_SUBSET2)

    Click retry to go further.This time I got error in install.

     

    In the logs for above error I have observed following line

    INFO: /usr/bin/ld: /u01/app/oracle/product/12.1.0/dbhome_1/lib//libclntsh.so: undefined reference to symbol 'ztcr2rnd'
    /u01/app/oracle/product/12.1.0/dbhome_1/lib//libnnz12.so: error adding symbols: DSO missing from command line
    collect2: error: ld returned 1 exit status

    INFO: make: *** [tnslsnr] Error 1

    INFO: /u01/app/oracle/product/12.1.0/dbhome_1/network/lib/ins_net_server.mk:27: recipe for target 'tnslsnr' failed

    INFO: End output from spawned process.
    INFO: ----------------------------------
    INFO: Exception thrown from action: make
    Exception Name: MakefileException
    Exception String: Error in invoking target 'install' of makefile '/u01/app/oracle/product/12.1.0/dbhome_1/network/lib/ins_net_server.mk'. See '/u01/app/oraInventory/logs/installActions2018-03-08_03-18-38PM.log' for details.
    Exception Severity: 1

    For above error we need to do changes in /u01/app/oracle/product/12.1.0/dbhome_1/network/lib/ins_net_server.mk.
    First take the backup of the file using following command.

    cp -rip /u01/app/oracle/product/12.1.0/dbhome_1/network/lib/ins_net_server.mk 
    /u01/app/oracle/product/12.1.0/dbhome_1/network/lib/ins_net_server.mk.orig

    Open /u01/app/oracle/product/12.1.0/dbhome_1/network/lib/ins_net_server.mk file and search for TNSLSNR and you will see following lines in the file.

    tnslsnr: $(S0NSGL) $(SNSGLP) $(NSGLPNP)
            $(SILENT)$(ECHO) " - Linking $(TNSLSNR)"
            $(RMF) $@
            $(TNSLSNR_LINKLINE)

    Change it to as follows

    tnslsnr: $(S0NSGL) $(SNSGLP) $(NSGLPNP)
            $(SILENT)$(ECHO) " - Linking $(TNSLSNR)"
            $(RMF) $@
            $(TNSLSNR_LINKLINE) -lnnz12 -lons

    Click retry to go further.This time I got error in irman_oracle.

    In the logs for above error I have observed following line

    INFO: - Linking Oracle

    INFO: rm -f /u01/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/oracle

    INFO: /u01/app/oracle/product/12.1.0/dbhome_1/bin/orald -o /u01/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/oracle -m64 -z noexecstack -Wl,--disable-new-dtags -L/u01/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/ -L/u01/app/oracle/product/12.1.0/dbhome_1/lib/ -L/u01/app/oracle/product/12.1.0/dbhome_1/lib/stubs/ -Wl,-E /u01/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/opimai.o /u01/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/ssoraed.o /u01/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/ttcsoi.o -Wl,--whole-archi
    INFO: ve -lperfsrv12 -Wl,--no-whole-archive /u01/app/oracle/product/12.1.0/dbhome_1/lib/nautab.o /u01/app/oracle/product/12.1.0/dbhome_1/lib/naeet.o /u01/app/oracle/product/12.1.0/dbhome_1/lib/naect.o /u01/app/oracle/product/12.1.0/dbhome_1/lib/naedhs.o /u01/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/config.o -lserver12 -lodm12 -lcell12 -lnnet12 -lskgxp12 -lsnls12 -lnls12 -lcore12 -lsnls12 -lnls12 -lcore12 -lsnls12 -lnls12 -lxml12 -lcore12 -lunls12 -lsnls12 -lnls12 -lcore12 -lnls12 -lclient12 -lvsn12 -lcommo
    INFO: n12 -lgeneric12 -lknlopt `if /usr/bin/ar tv /u01/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/libknlopt.a | grep xsyeolap.o > /dev/null 2>&1 ; then echo "-loraolap12" ; fi` -lskjcx12 -lslax12 -lpls12 -lrt -lplp12 -lserver12 -lclient12 -lvsn12 -lcommon12 -lgeneric12 `if [ -f /u01/app/oracle/product/12.1.0/dbhome_1/lib/libavserver12.a ] ; then echo "-lavserver12" ; else echo "-lavstub12"; fi` `if [ -f /u01/app/oracle/product/12.1.0/dbhome_1/lib/libavclient12.a ] ; then echo "-lavclient12" ; fi` -lknlopt -ls
    INFO: lax12 -lpls12 -lrt -lplp12 -ljavavm12 -lserver12 -lwwg `cat /u01/app/oracle/product/12.1.0/dbhome_1/lib/ldflags` -lncrypt12 -lnsgr12 -lnzjs12 -ln12 -lnl12 -lnro12 `cat /u01/app/oracle/product/12.1.0/dbhome_1/lib/ldflags` -lncrypt12 -lnsgr12 -lnzjs12 -ln12 -lnl12 -lnnzst12 -lzt12 -lztkg12 -lmm -lsnls12 -lnls12 -lcore12 -lsnls12 -lnls12 -lcore12 -lsnls12 -lnls12 -lxml12 -lcore12 -lunls12 -lsnls12 -lnls12 -lcore12 -lnls12 -lztkg12 `cat /u01/app/oracle/product/12.1.0/dbhome_1/lib/ldflags` -lncrypt1
    INFO: 2 -lnsgr12 -lnzjs12 -ln12 -lnl12 -lnro12 `cat /u01/app/oracle/product/12.1.0/dbhome_1/lib/ldflags` -lncrypt12 -lnsgr12 -lnzjs12 -ln12 -lnl12 -lnnzst12 -lzt12 -lztkg12 -lsnls12 -lnls12 -lcore12 -lsnls12 -lnls12 -lcore12 -lsnls12 -lnls12 -lxml12 -lcore12 -lunls12 -lsnls12 -lnls12 -lcore12 -lnls12 `if /usr/bin/ar tv /u01/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/libknlopt.a | grep "kxmnsd.o" > /dev/null 2>&1 ; then echo " " ; else echo "-lordsdo12 -lserver12"; fi` -L/u01/app/oracle/product/12.1.0/dbho
    INFO: me_1/ctx/lib/ -lctxc12 -lctx12 -lzx12 -lgx12 -lctx12 -lzx12 -lgx12 -lordimt12 -lclsra12 -ldbcfg12 -lhasgen12 -lskgxn2 -lnnzst12 -lzt12 -lxml12 -locr12 -locrb12 -locrutl12 -lhasgen12 -lskgxn2 -lnnzst12 -lzt12 -lxml12 -lgeneric12 -loraz -llzopro -lorabz2 -lipp_z -lipp_bz2 -lippdcemerged -lippsemerged -lippdcmerged -lippsmerged -lippcore -lippcpemerged -lippcpmerged -lsnls12 -lnls12 -lcore12 -lsnls12 -lnls12 -lcore12 -lsnls12 -lnls12 -lxml12 -lcore12 -lunls12 -lsnls12 -lnls12 -lcore12 -lnls12 -lsnls12 -lu
    INFO: nls12 -lsnls12 -lnls12 -lcore12 -lsnls12 -lnls12 -lcore12 -lsnls12 -lnls12 -lxml12 -lcore12 -lunls12 -lsnls12 -lnls12 -lcore12 -lnls12 -lasmclnt12 -lcommon12 -lcore12 -laio -lons `cat /u01/app/oracle/product/12.1.0/dbhome_1/lib/sysliblist` -Wl,-rpath,/u01/app/oracle/product/12.1.0/dbhome_1/lib -lm `cat /u01/app/oracle/product/12.1.0/dbhome_1/lib/sysliblist` -ldl -lm -L/u01/app/oracle/product/12.1.0/dbhome_1/lib

    INFO: /u01/app/oracle/product/12.1.0/dbhome_1/lib//libocrb12.so: undefined reference to `kgfoCreateCtxExt2'
    /u01/app/oracle/product/12.1.0/dbhome_1/lib//libocrb12.so: undefined reference to `kgfoCloseFile'
    /u01/app/oracle/product/12.1.0/dbhome_1/lib//libocrb12.so: undefined reference to `kgfoShrinkFile'
    /u01/app/oracle/product/12.1.0/dbhome_1/lib//libocrb12.so: undefined reference to `kgfoCommit2P'
    /u01/app/oracle/product/12.1.0/dbhome_1/lib//libocrb12.so: undefined reference to `kgfoErrorMessage'
    /u01/app/oracle
    INFO: /product/12.1.0/dbhome_1/lib//libocrb12.so: undefined reference to `kgfoGetSize'
    /u01/app/oracle/product/12.1.0/dbhome_1/lib//libocrb12.so: undefined reference to `kgfoOpenDirty'
    /u01/app/oracle/product/12.1.0/dbhome_1/lib//libocrb12.so: undefined reference to `kgfoIO'
    /u01/app/oracle/product/12.1.0/dbhome_1/lib//libocrb12.so: undefined reference to `kgfoCreate2P'
    /u01/app/oracle/product/12.1.0/dbhome_1/lib//libocrb12.so: undefined reference to `kgfoCheckHdl'
    /u01/app/oracle/product/12.1.0/dbhome_1/lib//lib
    INFO: ocrb12.so: undefined reference to `kgfoGetOCRName'
    /u01/app/oracle/product/12.1.0/dbhome_1/lib//libocrb12.so: undefined reference to `kgfoDestroyCtx'
    /u01/app/oracle/product/12.1.0/dbhome_1/lib//libocrb12.so: undefined reference to `kgfoRenameFile'
    /u01/app/oracle/product/12.1.0/dbhome_1/lib//libocrb12.so: undefined reference to `kgfoCreateFile'
    /u01/app/oracle/product/12.1.0/dbhome_1/lib//libocrb12.so: undefined reference to `kgfoDeleteFile'
    /u01/app/oracle/product/12.1.0/dbhome_1/lib//libocrb12.so: undefi
    INFO: ned reference to `kgfoFnameMax'
    /u01/app/oracle/product/12.1.0/dbhome_1/lib//libocrb12.so: undefined reference to `kgfoCheckMount'
    /u01/app/oracle/product/12.1.0/dbhome_1/lib//libocrb12.so: undefined reference to `kgfoControl'
    /u01/app/oracle/product/12.1.0/dbhome_1/lib//libocrb12.so: undefined reference to `kgfoOpenFile'
    /u01/app/oracle/product/12.1.0/dbhome_1/lib//libocrutl12.so: undefined reference to `lfieno'
    collect2: error: ld returned 1 exit status
    make: *** [/u01/app/oracle/product/12.1.0/dbhome_1/r
    INFO: dbms/lib/oracle] Error 1

    INFO: /u01/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/ins_rdbms.mk:788: recipe for target '/u01/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/oracle' failed

    INFO: End output from spawned process.
    INFO: ----------------------------------
    INFO: Exception thrown from action: make
    Exception Name: MakefileException
    Exception String: Error in invoking target 'irman ioracle' of makefile '/u01/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/ins_rdbms.mk'. See '/u01/app/oraInventory/logs/installActions2018-03-08_03-18-38PM.log' for details.
    Exception Severity: 1

    So I have run ldd against file /u01/app/oracle/product/12.1.0/dbhome_1/lib//libocrb12.so

    To resolve above we need to run following

    sudo ln -s /u01/app/oracle/product/12.1.0/dbhome_1/lib/libocrutl12.so /usr/lib

    Check the linking again

    Further we need to do changes in /u01/app/oracle/product/12.1.0/dbhome_1/rdbms/lib/env_rdbms.mk. Open the file and search for ORACLE_LINKLINE and you will see following lines in the file.

    ORACLE_LINKLINE=$(ORACLE_LINKER) $(PL_FLAGS) $(ORAMAI) $(SSORED) $(TTCSOI) 
                    $(ORACLE_KERNEL_LIBS) $(LINKLDLIBS)

    Change it to as follows

    ORACLE_LINKLINE=$(ORACLE_LINKER) -Wl,--no-as-needed $(PL_FLAGS) $(ORAMAI) $(SSORED) $(TTCSOI) 
                    $(ORACLE_KERNEL_LIBS) $(LINKLDLIBS)

    Click retry to go further.Hush atleast we have almost finished the linking issues.

    Now as per the instructions run the following commands with root user:

     /u01/app/oracle/product/12.1.0/dbhome_1/root.sh

    Wait for some time

    Now setup will start the Database Configuration Assistant.

    Finally you will see following screens which confirms the successful installation. Remember the EM Database Express URL.

    This is the final screen which shows that installation is completed successfully.

     

    Step 7 : Accessing the EM console of Oracle 12C database for Linux
    As show earlier open a browser and type following URL in it

    https://db_ip:5500/em

     You will see following screen.

    Now specify the user as sys and select as sysdba. Specify the password which we have entered during the installation process.
    After inserting correct password you will see following screen.

     Step 8 : Starting / stopping Oracle 12C database in Linux
    First find the SID by reading /etc/oratab
    Sample output is as follows

     

    In above orcl is SID

    To start listener run following as oracle user

    $ORACLE_HOME/bin/lsnrctl start

     To start database run following
    sqlplus /nolog

    connect sys as sysdba

    STARTUP;

    EXIT;

    To stop the database run following

    sqlplus /nolog

    connect sys as sysdba

    SHUTDOWN;

    EXIT;

    To stop listener run following

    $ORACLE_HOME/bin/lsnrctl stop

  • 相关阅读:
    android 显示自定义视图对话框
    android为按钮事件进行监听过程
    实验三
    实验二
    实验一
    第五次作业
    第四次作业
    第三次作业
    第二次作业
    第一次作业
  • 原文地址:https://www.cnblogs.com/sunsiyuan/p/8527520.html
Copyright © 2011-2022 走看看