centos 7.5靜默安裝oracle10.2.0.4

 

1.當前OS信息

[root@qht174 ~]# cat /etc/redhat-release
CentOS Linux release 7.5.1804 (Core)
[root@qht174 ~]# uname -a
Linux qht174 3.10.0-862.el7.x86_64 #1 SMP Fri Apr 20 16:44:24 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

2.關閉防火牆

 默認是打開的,需要關閉

[root@qht174 ~]# firewall-cmd --state    #查看默認防火牆狀態
running
[root@qht174 ~]# systemctl stop firewalld.service     #停止firewall
[root@qht174 ~]# systemctl disable firewalld.service  #禁止firewall開機啓動
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
[root@qht174 ~]# firewall-cmd --state
not running

iptables防火牆也檢查一下

[root@qht174 ~]# service iptables status
Redirecting to /bin/systemctl status iptables.service
Unit iptables.service could not be found.

3.接下來修改SELINUX=disabled

[root@qht174 ~]# cat /etc/selinux/config

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three two values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected.
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted

4.編寫關閉服務腳本

[root@qht174 ~]# cat serverstop.sh
chkconfig iptables off
chkconfig ip6tables off
chkconfig cups off
chkconfig firstboot off
chkconfig wpa_supplicant off
chkconfig postfix off
sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
sed -i 's/^GSSAPIAuthentication yes$/GSSAPIAuthentication no/' /etc/ssh/sshd_config
sed -i 's/#UseDNS yes/UseDNS no/' /etc/ssh/sshd_config

執行一下,關閉掉這些服務

[root@qht174 ~]# chmod a+x serverstop.sh
[root@qht174 ~]# sh serverstop.sh

5.安裝所需要的包

安裝常用包

[root@qht174 ~]#yum -y install autoconf automake binutils-devel bison cpp dos2unix ftp gcc gcc-c++ lrzsz python-devel elfutils-libelf elfutils-libelf-devel

確保這些包已安裝

[root@qht174 yum.repos.d]# rpm -q autoconf automake binutils-devel bison cpp dos2unix ftp gcc gcc-c++ lrzsz python-devel
autoconf-2.69-11.el7.noarch
automake-1.13.4-3.el7.noarch
binutils-devel-2.27-28.base.el7_5.1.x86_64
bison-3.0.4-1.el7.x86_64
cpp-4.8.5-28.el7_5.1.x86_64
dos2unix-6.0.3-7.el7.x86_64
ftp-0.17-67.el7.x86_64
gcc-4.8.5-28.el7_5.1.x86_64
gcc-c++-4.8.5-28.el7_5.1.x86_64
lrzsz-0.12.20-36.el7.x86_64
python-devel-2.7.5-69.el7_5.x86_64

安裝oracle所需要的包 

另外compat-gcc也是需要的,注意的是:

centos 6的包是compat-gcc-34 compat-gcc-34-c++

centos7需要改成:compat-gcc-44 compat-gcc-44-c++ 

 libXp.so.6 libXt.so.6 libXtst.so.6 libgcc_s.so.1換成libXp libXt libXtst libgcc

[root@qht174 ~]# yum -y install  binutils compat-libcap1 compat-db compat-gcc-44 compat-gcc-44-c++ compat-libstdc++-33 gcc gcc-c++ glibc-* glibc-devel libXpm-*.i686 libXp libXt libXtst libgcc ksh libgcc libstdc++ libstdc++-devel libXp libaio libaio-devel numactl numactl-devel unixODBC.i686 unixODBC-devel.i686 unixODBC unixODBC-devel make sysstat

 所有的包都已安裝:

[root@qht174 orcl]# rpm -q binutils compat-libcap1 compat-db compat-gcc-44 compat-gcc-44-c++ compat-libstdc++-33 gcc gcc-c++ glibc-* glibc-devel libXpm-*.i686 libXp libXt libXtst libgcc ksh libgcc libstdc++ libstdc++-devel libXp libaio libaio-devel numactl numactl-devel unixODBC.i686 unixODBC-devel.i686 unixODBC unixODBC-devel make sysstat
binutils-2.27-28.base.el7_5.1.x86_64
compat-libcap1-1.10-7.el7.x86_64
compat-db-4.7.25-28.el7.x86_64
compat-gcc-44-4.4.7-8.el7.x86_64
compat-gcc-44-c++-4.4.7-8.el7.x86_64
compat-libstdc++-33-3.2.3-72.el7.x86_64
compat-libstdc++-33-3.2.3-72.el7.i686
gcc-4.8.5-28.el7_5.1.x86_64
gcc-c++-4.8.5-28.el7_5.1.x86_64
glibc-2.17-222.el7.x86_64
glibc-2.17-222.el7.i686
glibc-devel-2.17-222.el7.x86_64
glibc-devel-2.17-222.el7.i686
libXpm-3.5.12-1.el7.i686
libXp-1.0.2-2.1.el7.x86_64
libXp-1.0.2-2.1.el7.i686
libXt-1.1.5-3.el7.x86_64
libXt-1.1.5-3.el7.i686
libXtst-1.2.3-1.el7.x86_64
libXtst-1.2.3-1.el7.i686
libgcc-4.8.5-28.el7_5.1.x86_64
libgcc-4.8.5-28.el7_5.1.i686
ksh-20120801-137.el7.x86_64
libgcc-4.8.5-28.el7_5.1.x86_64
libgcc-4.8.5-28.el7_5.1.i686
libstdc++-4.8.5-28.el7_5.1.x86_64
libstdc++-4.8.5-28.el7_5.1.i686
libstdc++-devel-4.8.5-28.el7_5.1.x86_64
libstdc++-devel-4.8.5-28.el7_5.1.i686
libXp-1.0.2-2.1.el7.x86_64
libXp-1.0.2-2.1.el7.i686
libaio-0.3.109-13.el7.x86_64
libaio-0.3.109-13.el7.i686
libaio-devel-0.3.109-13.el7.x86_64
libaio-devel-0.3.109-13.el7.i686
numactl-2.0.9-7.el7.x86_64
numactl-devel-2.0.9-7.el7.x86_64
unixODBC-2.3.1-11.el7.x86_64
unixODBC-devel-2.3.1-11.el7.x86_64
make-3.82-23.el7.x86_64
sysstat-10.1.5-13.el7.x86_64

 或者一起安裝(推薦再執行一次,以免遺漏,不費力)

yum install -y binutils compat-libcap1 compat-db compat-gcc-44 compat-gcc-44-c++ compat-libstdc++-33 gcc gcc-c++ glibc glibc-common glibc-devel  glibc-headers libXpm-*.i686 libXp libXt libXtst libgcc ksh libgcc libstdc++ libstdc++-devel libXp libaio libaio-devel numactl numactl-devel unixODBC unixODBC-devel make sysstat autoconf automake binutils-devel bison cpp dos2unix ftp gcc gcc-c++ lrzsz python-devel elfutils-libelf elfutils-libelf-devel

確保這些包都已安裝好:

[root@qht174 orcl]# rpm -q binutils compat-libcap1 compat-db compat-gcc-44 compat-gcc-44-c++ compat-libstdc++-33 gcc gcc-c++ glibc-* glibc-devel libXpm-*.i686 libXp libXt libXtst libgcc ksh libgcc libstdc++ libstdc++-devel libXp libaio libaio-devel numactl numactl-devel unixODBC unixODBC-devel make sysstat
binutils-2.27-28.base.el7_5.1.x86_64
compat-libcap1-1.10-7.el7.x86_64
compat-db-4.7.25-28.el7.x86_64
compat-gcc-44-4.4.7-8.el7.x86_64
compat-gcc-44-c++-4.4.7-8.el7.x86_64
compat-libstdc++-33-3.2.3-72.el7.x86_64
compat-libstdc++-33-3.2.3-72.el7.i686
gcc-4.8.5-28.el7_5.1.x86_64
gcc-c++-4.8.5-28.el7_5.1.x86_64
glibc-2.17-222.el7.x86_64
glibc-2.17-222.el7.i686
glibc-devel-2.17-222.el7.x86_64
glibc-devel-2.17-222.el7.i686
libXpm-3.5.12-1.el7.i686
libXp-1.0.2-2.1.el7.x86_64
libXp-1.0.2-2.1.el7.i686
libXt-1.1.5-3.el7.x86_64
libXt-1.1.5-3.el7.i686
libXtst-1.2.3-1.el7.x86_64
libXtst-1.2.3-1.el7.i686
libgcc-4.8.5-28.el7_5.1.x86_64
libgcc-4.8.5-28.el7_5.1.i686
ksh-20120801-137.el7.x86_64
libgcc-4.8.5-28.el7_5.1.x86_64
libgcc-4.8.5-28.el7_5.1.i686
libstdc++-4.8.5-28.el7_5.1.x86_64
libstdc++-4.8.5-28.el7_5.1.i686
libstdc++-devel-4.8.5-28.el7_5.1.x86_64
libstdc++-devel-4.8.5-28.el7_5.1.i686
libXp-1.0.2-2.1.el7.x86_64
libXp-1.0.2-2.1.el7.i686
libaio-0.3.109-13.el7.x86_64
libaio-0.3.109-13.el7.i686
libaio-devel-0.3.109-13.el7.x86_64
libaio-devel-0.3.109-13.el7.i686
numactl-2.0.9-7.el7.x86_64
numactl-devel-2.0.9-7.el7.x86_64
unixODBC-2.3.1-11.el7.x86_64
unixODBC-devel-2.3.1-11.el7.x86_64
make-3.82-23.el7.x86_64
sysstat-10.1.5-13.el7.x86_64

##centos5的話則是這些包:

rpm -q binutils compat-db compat-libstdc++-33 control-center \
  gcc gcc-c++ glibc glibc-common libgnome libstdc++ \
  libstdc++-devel make ksh sysstat gnome-screensaver setarch libXp

6.增加組和用戶

[root@qht174 ~]#groupadd oinstall
[root@qht174 ~]#groupadd dba
[root@qht174 ~]#useradd –g oinstall –G dba oracle 
[root@qht174 ~]#passwd oracle 

7.創建目錄,更改權限

[root@qht174 ~]# mkdir -p /u01/app/oracle/product/10201/
[root@qht174 ~]# mkdir -p /u01/app/oracle/admin/
[root@qht174 ~]# mkdir -p /u01/oradata/
[root@qht174 ~]# chown -R oracle.oinstall /u01

8.配置內核參數文件/etc/sysctl.conf

# vi /etc/sysctl.conf

並輸入以下內容:

fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152  //表示系統一次可以使用的共享內存總量(以頁爲單位)。缺省值就是2097152,通常不需要修改
kernel.shmmax = 2147483648  //定義了共享內存段的最大尺寸(以字節爲單位)。缺省爲32M,對於oracle來說,該缺省值太低了,通常將其設置爲2G
kernel.shmmni = 4096  //用於設置系統範圍內共享內存段的最大數量。該參數的默認值是 4096 。通常不需要更改
kernel.sem = 250 32000 100 128  //表示設置的信號量
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 262144  //默認的接收窗口大小
net.core.rmem_max = 4194304  //接收窗口的最大大小
net.core.wmem_default = 262144  //默認的發送窗口大小
net.core.wmem_max = 1048586  //發送窗口的最大大小
vm.hugetlb_shm_group = 1002  //這裏1002是oracle用戶組dba的gid,將dba組添加到系統內核中,給予創建共享內存的權限

使設置立即生效: 

[root@qht174 ~]# sysctl -p

9.編輯/etc/security/limits.conf

加下以下內容:

# For Oracle10g
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536

10.編輯/etc/pam.d/login

加以下內容:

session required /lib64/security/pam_limits.so
session required pam_limits.so

11.修改Linux發行版本信息

由於Oracle 10g發行的時候,CentOS 6和7都沒有發行,所以Oracle 10g並沒有對CentOS 6確認支持,需要修改文件讓Oracle 10g支持CentOS 6 和7。
我們需要手工修改Linux的發行註記,讓Oracle 10g支持CentOS 6和7。

[root@qht174 ~]# cat /etc/redhat-release
redhat 4
#CentOS Linux release 7.5.1804 (Core)

12.修改/home/oracle/.bash_profile環境變量

[oracle@qht174 ~]$ cat .bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/.local/bin:$HOME/bin

export PATH

ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/10201
ORACLE_SID=orcl
OADMIN=$ORACLE_BASE/admin/$ORACLE_SID
ORACLE_TERM=vt100
BDUMP=$OADMIN/bdump
UDUMP=$OADMIN/udump
TERM=vt100
TNS_ADMIN=$ORACLE_HOME/network/admin
NLS_LANG=AMERICAN_AMERICA.WE8MSWIN1252

export ORACLE_BASE
export ORACLE_HOME
export ORACLE_SID
export OADMIN
export ODATA
export OARCH
export OSCRIPTS
export ORACLE_TERM
export BDUMP
export UDUMP
export TERM
export TNS_ADMIN
export NLS_LANG

# Set PATH variable with Oracle and Veritas NetBackup Parameters:
PATH=.:$HOME:$ORACLE_HOME/bin:/bin:/usr/ccs/bin:/usr/bin:/usr:/usr/local/bin:/usr/sbin:/usr/openv/netbackup/bin:$ORACLE_HOME/OPatch
export PATH

# Set LD_LIBRARY_PATH variable
LD_LIBRARY_PATH=/u01/app/oracle/product/10201/lib:/u01/app/oracle/product/10201/ctx/lib:/usr/openwin/lib:/usr/dt/lib:/usr/ccs/lib:/usr/lib:/usr/ucblib:
export LD_LIBRARY_PATH

# Set CLASSPATH variable
CLASSPATH=$ORACLE_HOME/JRE/lib:$ORACLE_HOME/jlib:$ORACLE_HOME/network/jlib:$ORACLE_HOME/rdbms/jlib:$ORACLE_HOME/assistants/jlib:$ORACLE_HOME/owm/jlib
export CLASSPATH

unset USERNAME

13.解壓縮源文件

[oracle@qht174 resource]$ zcat 10201_database_linux_x86_64.cpio.gz | cpio -idmv

14.開始安裝數據庫軟件

準備的響應文件如下:

[oracle@qht174 database]$ cat /home/oracle/resource/database/response/enterprise01.rsp
RESPONSEFILE_VERSION=2.2.1.0.0
FROM_LOCATION="../stage/products.xml"
ORACLE_HOME="/u01/app/oracle/product/10201"
ORACLE_HOME_NAME="OraDbHome1"
TOPLEVEL_COMPONENT={"oracle.server","10.2.0.1.0"}
DEINSTALL_LIST={"oracle.server","10.2.0.1.0"}
SHOW_SPLASH_SCREEN=false
SHOW_WELCOME_PAGE=false
SHOW_COMPONENT_LOCATIONS_PAGE=false
SHOW_CUSTOM_TREE_PAGE=false
SHOW_SUMMARY_PAGE=false
SHOW_INSTALL_PROGRESS_PAGE=false
SHOW_REQUIRED_CONFIG_TOOL_PAGE=false
SHOW_CONFIG_TOOL_PAGE=false
SHOW_RELEASE_NOTES=false
SHOW_ROOTSH_CONFIRMATION=false
SHOW_END_SESSION_PAGE=false
SHOW_EXIT_CONFIRMATION=false
NEXT_SESSION=false
NEXT_SESSION_ON_FAIL=false
SHOW_DEINSTALL_CONFIRMATION=false
SHOW_DEINSTALL_PROGRESS=false
ACCEPT_LICENSE_AGREEMENT=true
COMPONENT_LANGUAGES={"en"}
CLUSTER_NODES=
INSTALL_TYPE="EE"
s_nameForDBAGrp=dba
s_nameForOPERGrp=dba
b_oneClick=false
SHOW_DATABASE_CONFIGURATION_PAGE=false
b_createStarterDB=false
[oracle@qht174 database]$ ./runInstaller -silent -responseFile /home/oracle/resource/database/response/enterprise01.rsp

不過安裝結束時出現了錯誤:

Installation in progress (Thu Sep 27 14:42:32 CST 2018)
...............................................................  10% Done.
...............................................................  20% Done.
...............................................................  30% Done.
...............................................................  40% Done.
...............................................................  50% Done.
................................................                 57% Done.
Install successful

Linking in progress (Thu Sep 27 14:43:08 CST 2018)
.                                                                57% Done.
Link successful

Setup in progress (Thu Sep 27 14:45:05 CST 2018)
.........................                                       100% Done.
Setup successful

End of install phases.(Thu Sep 27 14:45:05 CST 2018)
Starting to execute configuration assistants
Configuration assistant "Oracle Net Configuration Assistant" succeeded
Configuration assistant "Oracle Database Configuration Assistant" failed
SEVERE:OUI-10104:Some of the configuration assistants failed. It is strongly recommended that you retry the configuration assistants at this time. Not successfully running any "Recommended" assistants means your system will not be correctly configured. Select the failed assistants and click the 'Retry' button to retry them.
--------------------------------------
The "/u01/app/oracle/product/10201/cfgtoollogs/configToolFailedCommands" script contains all commands that failed, were skipped or were cancelled. This file may be used to run these configuration assistants outside of OUI. Note that you may have to update this script with passwords (if any) before executing the same.
The "/u01/app/oracle/product/10201/cfgtoollogs/configToolAllCommands" script contains all commands to be executed by the configuration assistants. This file may be used to run the configuration assistants outside of OUI. Note that you may have to update this script with passwords (if any) before executing the same.

--------------------------------------
The installation of Oracle Database 10g was successful, but some optional configuration assistants failed, were cancelled or skipped.
Please check '/u01/app/oracle/oraInventory/logs/silentInstall2018-09-27_02-42-25PM.log' for more details.

查看日誌文件如下:

silentInstall2018-09-27_02-42-25PM.log
Error in invoking target 'all_no_orcl' of makefile '/u01/app/oracle/product/10201/rdbms/lib/ins_rdbms.mk'. See '/u01/app/oracle/oraInventory/logs/installActions2018-09-27_02-42-25PM.log' for details.
Error in invoking target 'collector' of makefile '/u01/app/oracle/product/10201/sysman/lib/ins_emdb.mk'. See '/u01/app/oracle/oraInventory/logs/installActions2018-09-27_02-42-25PM.log' for details.
SEVERE:OUI-10104:Some of the configuration assistants failed. It is strongly recommended that you retry the configuration assistants at this time. Not successfully running any "Recommended" assistants means your system will not be correctly configured. Select the failed assistants and click the 'Retry' button to retry them.
A new inventory has been created in this session. However, it has not yet been registered as the central inventory of this system.
To register the new inventory please run the script '/u01/app/oracle/oraInventory/orainstRoot.sh' with root privileges.
If you do not register the inventory, you may not be able to update or patch the products you installed.

The following configuration scripts
/u01/app/oracle/product/10201/root.sh
need to be executed as root for configuring the system. If you skip the execution of the configuration tools, the configuration will not be complete and the product wont function properly. In order to get the product to function properly, you will be required to execute the scripts and the configuration tools after exiting the OUI.

The installation of Oracle Database 10g was successful, but some optional configuration assistants failed, were cancelled or skipped.

第一個錯誤Error in invoking target 'all_no_orcl' of makefile '/u01/app/oracle/product/10201/rdbms/lib/ins_rdbms.mk'有可能是缺少包的原因,不過已檢查過了所有的包,有點奇怪。不過經過測試這個錯誤不影響後面的安裝。

第二個錯誤Error in invoking target 'collector' of makefile '/u01/app/oracle/product/10201/sysman/lib/ins_emdb.mk'.這個可以直接忽略,不影響後面的安裝。

下面這些包是網上找的需要的完整的包,不過有幾個無法從yum下載安裝,暫且忽略這個錯誤,試着繼續安裝。

[root@qht174 orcl]#  rpm -q autoconf  binutils.x86_64 compat-db.x86_64 compat-gcc-44-c++ compat-gcc-44.x86_64  compat-libstdc++-33-3.2.3-72.el7.i686  compat-libstdc++-33.i686  compat-libstdc++-33.x86_64  elfutils-libelf-devel.x86_64  elfutils-libelf.x86_64  gcc-c++.x86_64 gcc.x86_64  gdb  gdbm  glibc-common.x86_64  glibc-devel.i686  glibc-devel.x86_64  glibc-headers.x86_64  glibc.x86_64  glibc.i686  libaio-devel.x86_64  libaio.x86_64  libaio.i686 libgcc.x86_64  libgcc.i686  libgomp.x86_64  libstdc++.x86_64  libstdc++-devel.x86_64  libXp.x86_64  libXp.i686  libXtst.i686  make  libgnome.x86_64   libgnomeui.x86_64  openmotif  openssl.i686  openssh-clients  openssh  pdksh  screen  setarch  sysstat.x86_64  unixODBC  unixODBC-devel  unixODBC.i686  unixODBC-devel.i686  unzip  util-linux.x86_64  vim-enhanced  xdpyinfo  xorg-x11-server-Xorg  xorg-x11-xinit |grep not
package openmotif is not installed
package openssl.i686 is not installed
package pdksh is not installed
package setarch is not installed
package xdpyinfo is not installed

繼續安裝之前不要忘記root用戶執行這兩個腳本:

sh /u01/app/oracle/oraInventory/orainstRoot.sh
sh /u01/app/oracle/product/10201/root.sh

 12.先忽略這個錯誤,升級到10.2.0.4 

由於10.2.0.1安裝好後會自動開啓listener,在升級前需要先關閉listener:

[oracle@qht174 Disk1]$ lsnrctl stop

生成升級的響應文件:

[root@qht174 ~]# sed '/^ *#/d'   /home/oracle/resource/Disk1/response/10204_patch.rsp | sed '/^$/d'
RESPONSEFILE_VERSION=2.2.1.0.0
UNIX_GROUP_NAME="oinstall"
FROM_LOCATION=<Value Required>
NEXT_SESSION_RESPONSE=<Value Unspecified>
ORACLE_HOME="/u01/app/oracle/product/10201"
ORACLE_HOME_NAME="OraDbHome1"
TOPLEVEL_COMPONENT={"oracle.patchset.db","10.2.0.4.0"}
SHOW_SPLASH_SCREEN=false
SHOW_WELCOME_PAGE=false
SHOW_COMPONENT_LOCATIONS_PAGE=false
SHOW_CUSTOM_TREE_PAGE=false
SHOW_SUMMARY_PAGE=false
SHOW_INSTALL_PROGRESS_PAGE=true
SHOW_REQUIRED_CONFIG_TOOL_PAGE=false
SHOW_OPTIONAL_CONFIG_TOOL_PAGE=false
SHOW_CONFIG_TOOL_PAGE=false
SHOW_XML_PREREQ_PAGE=false
SHOW_RELEASE_NOTES=false
SHOW_END_OF_INSTALL_MSGS=true
SHOW_ROOTSH_CONFIRMATION=true
SHOW_END_SESSION_PAGE=false
SHOW_EXIT_CONFIRMATION=false
NEXT_SESSION=false
NEXT_SESSION_ON_FAIL=false
SHOW_DEINSTALL_CONFIRMATION=false
SHOW_DEINSTALL_PROGRESS=false
ACCEPT_LICENSE_AGREEMENT=true
RESTART_SYSTEM=false
CLUSTER_NODES={}
OUI_HOSTNAME=qht174
REMOVE_HOMES={}
COMPONENT_LANGUAGES={"en"}
sl_userNodeList=<Value Unspecified>
b_acceptLicense=<Value Unspecified>
b_useRegistration=<Value Unspecified>
s_csiNumber=<Value Unspecified>
s_metaLink=<Value Unspecified>
s_countryName=<Value Unspecified>
b_proxyused=<Value Unspecified>
s_serverName=<Value Unspecified>
s_portNumber=<Value Unspecified>
s_userName=<Value Unspecified>
s_proxyPassword=<Value Unspecified>
b_authenticationused=<Value Unspecified>

執行升級命令: 

[oracle@qht174 Disk1]$ ./runInstaller -silent -force -ignoreSysPrereqs -responseFile /home/oracle/resource/Disk1/response/10204_patch.rsp

Deinstall in progress (Friday, October 5, 2018 4:03:47 PM CST)
...............................................................   0% Done.
...............................................................  14% Done.
...............................................................  29% Done.
...............................................................  44% Done.
...............................................................  59% Done.
...............................................................  74% Done.
..............................................                  100% Done.

Deinstall successful

Installation in progress (Friday, October 5, 2018 4:03:47 PM CST)
...............................................................  14% Done.
...............................................................  29% Done.
...............................................................  44% Done.
...............................................................  59% Done.
...............................................................  74% Done.
......................................................           87% Done.
Install successful

Linking in progress (Friday, October 5, 2018 4:04:19 PM CST)
...                                                              87% Done.
Link successful

Setup in progress (Friday, October 5, 2018 4:06:35 PM CST)
.........                                                       100% Done.
Setup successful

End of install phases.(Friday, October 5, 2018 4:06:36 PM CST)
WARNING:A new inventory has been created in this session. However, it has not yet been registered as the central inventory of this system.
To register the new inventory please run the script '/u01/app/oraInventory/orainstRoot.sh' with root privileges.
If you do not register the inventory, you may not be able to update or patch the products you installed.
The following configuration scripts need to be executed as the "root" user.
#!/bin/sh
#Root script to run
/u01/app/oraInventory/orainstRoot.sh
/u01/app/oracle/product/10201/root.sh
To execute the configuration scripts:
    1. Open a terminal window
    2. Log in as "root"
    3. Run the scripts

The installation of Oracle Database 10g Release 2 Patch Set 3 was successful.
Please check '/u01/app/oraInventory/logs/silentInstall2018-10-05_04-03-40PM.log' for more details.

登入root用戶,執行這兩個腳本完成升級。

[root@qht174 ~]# sh /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory to 770.
Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete
[root@qht174 ~]# sh /u01/app/oracle/product/10201/root.sh
Running Oracle10 root.sh script...

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/app/oracle/product/10201

Enter the full pathname of the local bin directory: [/usr/local/bin]: y
Creating y directory...
   Copying dbhome to y ...
   Copying oraenv to y ...
   Copying coraenv to y ...

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.

12.接着安裝數據庫

修改響應文件如下:

[oracle@qht174 response]$ sed '/^ *#/d' /home/oracle/resource/database/response/dbca.rsp | sed '/^$/d'
[GENERAL]
RESPONSEFILE_VERSION = "10.0.0"
OPERATION_TYPE = "createDatabase"
[CREATEDATABASE]
GDBNAME = "orcl"
SID = "orcl"
TEMPLATENAME = "New_Database.dbt"
SYSPASSWORD = "sys"
SYSTEMPASSWORD = "sys"
DATAFILEDESTINATION = "/u01/oradata/"
RECOVERYAREADESTINATION="/u01/app/oracle/flash_recovery_area"
CHARACTERSET = "WE8MSWIN1252"
MEMORYPERCENTAGE = "40"

 通過dbca調用上面的響應文件建立數據庫:

[oracle@qht174 response]$ $ORACLE_HOME/bin/dbca -silent -responseFile /home/oracle/resource/database/response/dbca.rsp
Creating and starting Oracle instance
1% complete
4% complete
Creating database files
8% complete
Creating data dictionary views
9% complete
10% complete
12% complete
13% complete
14% complete
15% complete
17% complete
18% complete
20% complete
21% complete
Adding Oracle JVM
22% complete
28% complete
34% complete
40% complete
42% complete
Adding Oracle Data Mining
43% complete
44% complete
46% complete
Adding Oracle Text
47% complete
49% complete
50% complete
Adding Oracle XML DB
52% complete
53% complete
54% complete
58% complete
Adding Oracle Intermedia
59% complete
60% complete
71% complete
Adding Oracle OLAP
72% complete
73% complete
74% complete
75% complete
Adding Oracle Spatial
76% complete
77% complete
78% complete
83% complete
Adding Enterprise Manager Repository
84% complete
86% complete
88% complete
Completing Database Creation
89% complete
90% complete
91% complete
95% complete
99% complete
100% complete
Look at the log file "/u01/app/oracle/product/10201/cfgtoollogs/dbca/orcl/orcl2.log" for further details.

 數據庫的版本是10.2.0.4,已正常打開:

[oracle@qht174 ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.4.0 - Production on Fri Oct 5 16:29:38 2018

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select open_mode from v$database;

OPEN_MODE
----------
READ WRITE

至此,cnetos7安裝Oracle10.2.0.4完成,後續配置listener等相關的設置。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章