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=
NEXT_SESSION_RESPONSE=
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=
b_acceptLicense=
b_useRegistration=
s_csiNumber=
s_metaLink=
s_countryName=
b_proxyused=
s_serverName=
s_portNumber=
s_userName=
s_proxyPassword=
b_authenticationused=
执行升级命令:
[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等相关的设置。