当前位置:Gxlcms > mysql > oraToolKit之一安装oraToolKit并检测安装Oracle环境

oraToolKit之一安装oraToolKit并检测安装Oracle环境

时间:2021-07-01 10:21:17 帮助过:19人阅读

oraToolKit是一个这么一个工具,用来支持和快速部署oracle的各个软件环境,支持各种不同版本的数据库和操作系统。这个工具包还包

oraToolKit是一个这么一个工具,用来支持和快速部署Oracle的各个软件环境,支持各种不同版本的数据库和操作系统。这个工具包还包含一个比较实用的东西rlwrap,大家都知道在linux环境下的sqlplus没办法像windows下一样使用上下箭头来翻页,那么使用这个工具就可以解决问题,安装步骤很简单,进入rlwrap目录,configure-make-make install,,然后在系统环境变量进行配置下即可,增加这么一行:alias sqlplus='rlwrap sqlplus'。

虽然它支持整个部署和管理过程,但是我这里并不打算使用整套功能来演示。想试用下整个工具只是出于一个简单的原因:前几天在虚拟机上安装11g的时候,出现了几个安装包的却是和内核参数的配置问题,现在回过头来,想整理一个系统刚安装完成的,同时满足oracle使用环境,但是不想上传软件包使用安装程序检测,于是就想到了这个工具。

1. 安装oraToolKit
[root@ ~]# cd /opt/oracle
[root@ oracle]# ls
oratoolkit-1.0.2.1.5-1.noarch.rpm prereq
[root@ oracle]# rpm -ivh oratoolkit-1.0.2.1.5-1.noarch.rpm
Preparing... ########################################### [100%]
1:oratoolkit ########################################### [100%]
[root@ oracle]# ls
oratoolkit-1.0.2.1.5-1.noarch.rpm otk prereq
[root@ oracle]# cd otk
[root@ otk]# ls
1.0 current envsetup home license
[root@ otk]#
上传之后就可以安装了,安装到/opt/oracle/otk。
2. 看看oraToolKit都有啥
[root@ otk]# pwd
/opt/oracle/otk
[root@ tools]# ls /opt/oracle/otk/current/tools
postinstall rlwrap sshKeysExchange sysInfo.sql
[root@ otk]# ./current/bin/installManager
Usage (revision 1.23):

installManager [ ]

Where:

is the target action of the dataPumpManager

The following actions are supported:

swReqCheck, osSetup, swInst, cssdConfig, asmSetup,
envSetup, dbSetup and setOsKernelParams

is a configuration file from /opt/oracle/otk/1.0/conf/installManager directory.

is the execution mode of installManager, either NORMAL (default) or FORCE

Available config files
osSetup10gR2.cfg
osSetup11gR1.cfg
osSetup11gR2.cfg
20110801_230429: Warning: KLK-00022: Parameter prerequisite not fulfilled
[root@ otk]#
installManager使用帮助,从上面我们可以看到它可以进行各项检测工作(action),支持osSetup10gR2、osSetup11gR1、osSetup11gR2这3个版本的数据库(configFile),还有就是执行模式默认情况下是NORMAL,还可以是暴力执行。
3. 使用oraToolKit进行检测安装包情况
我们开始用它来检测是否满足安装ora10gR2的环境,action选择的是swReqCheck,configFile选择的是osSetup10gR2.cfg,我们开始吧。
我们可以开始先汇总的看下是否满足条件,当你确信基本上你搭建的环境没上面问题的时候,就可以直接看汇总的情况了。
[root@ otk]# /opt/oracle/otk/current/bin/installManager swReqCheck osSetup10gR2.cfg|tail -2|head -1
20110801_231656: Info: Action swReqCheck of installManager ended with 3 WARNINGS
可以看到有3个警告,我们就深入的看详细的检测信息。
[root@ otk]# /opt/oracle/otk/current/bin/installManager swReqCheck osSetup10gR2.cfg
20110801_231759: Info: Action swReqCheck of installManager started
----------------------------------------------------------------------------------------------------
20110801_231759: Info: Listing environment information
20110801_231759: Info: ---------------------------------------------
20110801_231759: Info: Object/Name | Value/Version
20110801_231759: Info: ---------------------------------------------
20110801_231800: Info: hostname | gtlions
20110801_231800: Info: OS | RHEL
20110801_231800: Info: OS Version | 6
20110801_231800: Info: OS Release | 0
20110801_231800: Info: HW Architecture | x86
20110801_231800: Info: user | root
20110801_231800: Info: user shell | /bin/bash
20110801_231800: Info: OTK | OTK_1_0_2_1_5
20110801_231800: Info: installManager | 1.23
20110801_231800: Info: Process ID | 12612
20110801_231800: Info: libmiscellaneous.ksh | 1.24
20110801_231800: Info: libstring.ksh | 1.10
20110801_231801: Info: libfile.ksh | 1.2
20110801_231801: Info: libotk.ksh | 1.14
20110801_231801: Info: liberror.ksh | 1.24
20110801_231801: Info: libosadmin.ksh | 1.19
20110801_231801: Info: libinstallManager.ksh | 1.45
20110801_231801: Info: libnetwork.ksh | 1.8
20110801_231801: Info: libappctl.ksh | 1.21
20110801_231801: Info: libdynsql.ksh | 1.2
----------------------------------------------------------------------------------------------------
20110801_231801: Info: Executing libmiscellaneous.checkExecMode function
20110801_231801: Info: Executing installManager in NORMAL mode
20110801_231801: Info: Executing libfile.sourceConf function
20110801_231801: Info: Sourcing /opt/oracle/otk/1.0/conf/installManager/osSetup10gR2.cfg
----------------------------------------------------------------------------------------------------
20110801_231801: Info: Executing libinstallManager.setScriptVars function
20110801_231801: Info: export SYSDATE="20110801"
20110801_231801: Info: export EXEC_ACTION="swreqcheck"
20110801_231801: Info: export LOG_FILE="/var/opt/oracle/otk/1.0/log-old/installManager/swreqcheck-20110801_231801.log"
20110801_231801: Info: export PLATFORM="Linux"
20110801_231801: Info: export OS_DISTRIBUTION="RHEL"
20110801_231801: Info: export OS_VERSION="6"
20110801_231801: Info: export OS_RELEASE="0"
20110801_231801: Info: export RAM_MB="1007"
20110801_231801: Info: export HW_ARCH="x86"
----------------------------------------------------------------------------------------------------
20110801_231801: Info: Executing libinstallManager.doSwRequirementCheck function
20110801_231801: Info: Checking requirement file
20110801_231801: Info: export SW_REQUIREMENT_FILE="/opt/oracle/otk/1.0/conf/installManager/requirement/ora10gR2-RedHat-6-x86.pkg.lst"
20110801_231801: Info: Using default package requirement file /opt/oracle/otk/1.0/conf/installManager/requirement/ora10gR2-redhat-6-x86.pkg.lst
20110801_231801: Info: Checking if file /opt/oracle/otk/1.0/conf/installManager/requirement/ora10gR2-redhat-6-x86.pkg.lst exists
20110801_231802: Info: Checking 32-bit OS packages
20110801_231802: Info: export ARCH_PATTERN="i[356]86"
20110801_231802: Info: export SW_REQUIREMENT_EGREP_PATTERN="req|opt"
20110801_231802: Info: Correct version (2.20.51.0.2-5.11) of 32-bit binutils installed
20110801_231802: Info: Correct version (0.148-1) of 32-bit elfutils-libelf installed
20110801_231802: Info: Correct version (2.12-1.7) of 32-bit glibc installed
20110801_231802: Info: Correct version (2.12-1.7) of 32-bit glibc-common installed
20110801_231802: Info: Correct version (0.3.107-10) of 32-bit libaio installed
20110801_231802: Info: Correct version (4.4.4-13) of 32-bit libgcc installed
20110801_231802: Info: Correct version (4.4.4-13) of 32-bit libstdc++ installed
20110801_231803: Info: Correct version (3.81-19) of 32-bit make installed
20110801_231803: Warning: Required package ksh not found, installation of 32-bit version 20100621-2 or later recommended. Package is usually installed with default installation
20110801_231803: Info: Correct version (9.0.4-11) of 32-bit sysstat installed
20110801_231803: Info: Correct version (4.4.4-13) of 32-bit libstdc++-devel installed
20110801_231803: Info: Correct version (2.6.32-71) of 32-bit kernel-headers installed
20110801_231803: Info: Correct version (2.12-1.7) of 32-bit glibc-headers installed
20110801_231803: Info: Correct version (2.12-1.7) of 32-bit glibc-devel installed
20110801_231803: Info: Correct version (5.7-3.20090208) of 32-bit ncurses-devel installed
20110801_231803: Info: Correct version (0.148-1) of 32-bit elfutils-libelf-devel installed
20110801_231804: Warning: Required package libaio-devel not found, installation of 32-bit version 0.3.107-10 or later recommended. Package should be on CD/DVD
20110801_231804: Info: Correct version (3.4.6-19) of 32-bit compat-gcc-34 installed
20110801_231804: Info: Correct version (1.0.2-1) of 32-bit libXxf86misc installed
20110801_231804: Info: Correct version (1.1.0-1) of 32-bit libXxf86vm installed
20110801_231804: Info: Correct version (1.0.5-1) of 32-bit libXmu installed
20110801_231804: Info: Correct version (1.0.7-1) of 32-bit libXt installed
20110801_231804: Info: Correct version (2.4.1-6) of 32-bit mpfr installed
20110801_231804: Info: Correct version (4.4.4-13) of 32-bit cpp installed
20110801_231805: Info: Correct version (1.0.2-7.1) of 32-bit xorg-x11-xauth installed
20110801_231805: Info: Correct version (3.4.6-19) of 32-bit compat-gcc-34-c++ installed
20110801_231805: Info: Correct version (0.14-1) of 32-bit libdaemon installed
20110801_231805: Info: Correct version (0.6.25-8) of 32-bit avahi installed
20110801_231805: Info: Correct version (0.6.25-8) of 32-bit avahi-glib installed
20110801_231805: Info: Correct version (0.70-4) of 32-bit shared-mime-info installed
20110801_231805: Info: Correct version (0.8.13-2.1) of 32-bit libIDL installed
20110801_231805: Info: Correct version (2.14.17-3.1) of 32-bit ORBit2 installed
20110801_231805: Info: Correct version (2.28.0-6) of 32-bit GConf2 installed
20110801_231806: Info: Correct version (2.24.2-6) of 32-bit gnome-vfs2 installed
20110801_231806: Info: Correct version (2.24.2-4) of 32-bit libbonobo installed
20110801_231806: Info: Correct version (2.2.6-15.5) of 32-bit libtool-ltdl installed
20110801_231806: Info: Correct version (2.18.4-5) of 32-bit gtk2-engines installed
20110801_231806: Info: Correct version (2.2.14-11) of 32-bit unixODBC installed
20110801_231806: Info: Correct version (2.7.2-4.1) of 32-bit libmcpp installed
20110801_231806: Info: Correct version (2.7.2-4.1) of 32-bit mcpp installed
20110801_231806: Info: Correct version (0.4.1-3) of 32-bit ConsoleKit-x11 installed
20110801_231807: Info: Correct version (1.0.5-1) of 32-bit libXv installed
20110801_231807: Info: Correct version (7.4-15) of 32-bit xorg-x11-server-utils installed
20110801_231807: Info: Correct version (1.0.9-13) of 32-bit xorg-x11-xinit installed
20110801_231807: Info: Correct version (1.1.0-1) of 32-bit libdmx installed
20110801_231807: Info: Correct version (1.0.0-15.1) of 32-bit libXp installed
20110801_231807: Info: Correct version (1.1.1-1) of 32-bit libXxf86dga installed
20110801_231807: Info: Correct version (7.4-8) of 32-bit xorg-x11-utils installed
20110801_231807: Info: Correct version (4.2.52-15) of 32-bit compat-db42 installed
20110801_231808: Info: Correct version (4.3.29-15) of 32-bit compat-db43 installed
20110801_231808: Info: Correct version (0.15.7-1.2) of 32-bit cloog-ppl installed
20110801_231808: Info: Correct version (0.10.2-11) of 32-bit ppl installed
20110801_231808: Info: Correct version (4.4.4-13) of 32-bit gcc installed
20110801_231808: Info: Correct version (4.6.21-15) of 32-bit compat-db installed
20110801_231808: Info: Correct version (3.2.3-69) of 32-bit compat-libstdc++-33 installed
20110801_231808: Info: Correct version (4.4.4-13) of 32-bit gcc-c++ installed
20110801_231808: Info: Correct version (6.0-3) of 32-bit readline-devel installed
20110801_231808: Warning: Optional package unixODBC-devel not found, installation of 32-bit version 2.2.14-11 or later recommended. Package should be on CD/DVD
20110801_231809: Info: Correct version (2.28.0-11) of 32-bit libgnome installed
----------------------------------------------------------------------------------------------------
20110801_231809: Info: Executing libmiscellaneous.getFooter function
20110801_231809: Info: Terminating installManager execution
20110801_231809: Info: Summary log file: /var/opt/oracle/otk/1.0/log-old/installManager/../installManager.log
20110801_231809: Info: Detailed log file: /var/opt/oracle/otk/1.0/log-old/installManager/swreqcheck-20110801_231801.log
20110801_231809: Info: Action swReqCheck of installManager ended with 3 WARNINGS
----------------------------------------------------------------------------------------------------
[root@ otk]#
[root@ otk]# tail /var/opt/oracle/otk/1.0/log-old/installManager/swreqcheck-20110801_231801.log
20110801_231808: Info: Correct version (6.0-3) of 32-bit readline-devel installed
20110801_231808: Warning: Optional package unixODBC-devel not found, installation of 32-bit version 2.2.14-11 or later recommended. Package should be on CD/DVD
20110801_231809: Info: Correct version (2.28.0-11) of 32-bit libgnome installed
----------------------------------------------------------------------------------------------------
20110801_231809: Info: Executing libmiscellaneous.getFooter function
20110801_231809: Info: Terminating installManager execution
20110801_231809: Info: Summary log file: /var/opt/oracle/otk/1.0/log-old/installManager/../installManager.log
20110801_231809: Info: Detailed log file: /var/opt/oracle/otk/1.0/log-old/installManager/swreqcheck-20110801_231801.log
20110801_231809: Info: Action swReqCheck of installManager ended with 3 WARNINGS
----------------------------------------------------------------------------------------------------
[root@ otk]#
我们可以看到有3个包未安装不满足安装10gR2的数据库:ksh、libaio-devel、unixODBC-devel。
[root@ otk]# mount /dev/cdrom /mnt
mount: block device /dev/sr0 is write-protected, mounting read-only
[root@ mnt]# cd /mnt/Packages/
[root@ Packages]# rpm -ivh libaio-devel*.rpm unixODBC-devel*.rpm
warning: libaio-devel-0.3.107-10.el6.i686.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Preparing... ########################################### [100%]
1:unixODBC-devel ########################################### [ 50%]
2:libaio-devel ########################################### [100%]

linux

人气教程排行