一客户升级系统,准备把数据库升级到12C,操作系统切换到Redhat 7,而他们家系统管理员不但不熟Oracle数据库,还不熟Linux。只好请客户开了个Teamview连接,远程帮他们安装系统。因为连Linux都是供应商帮忙装了,没有装X window,只能选择静默安装了。开搞。
要说安装包最方便的方式,莫过于利用Oracle官方的源了。
# cd /etc/yum.repos.d
# wget http://yum.oracle.com/public-yum-ol7.repo
#vim public-yum-ol7.repo
把文件按如下修改:
[ol7_latest]然后运行oracle-database-server-12cR2-preinstall安装依赖包。
#yum install oracle-database-server-12cR2-preinstall
如果有问题可以采用以下方式。
#vim req-rpm.txt
在文件输入以下包名。
binutils保存退出后,运行以下命令安装。
#yum install `awk ‘{print $1}’ req-rpm.txt`
#vim /etc/sysctl.conf
增加以下内容:
–kernel parameters for 12C installation使用内核参数生效
#/sbin/sysctl -p
#vim /etc/security/limits.conf
–shell limits for users oracle 12C
oracle soft nofile 1024#cat /etc/selinux/config
确认SELINUX设置如下:
SELINUX=permissive#service iptables stop
#chkconfig iptables off
#groupadd -g 54321 oinstall
#groupadd -g 54322 dba
#groupadd -g 54323 oper
#useradd –u 54321 –g oinstall –G dba,oracle,oper
#passwd oracle
#mkdir –p /u01
#chown oracle:dba /u01
#chmod 775 /u01
#su oracle
#unzip linuxx64_12201_database.zip
在解压文件夹的/database/response目录下,复制db_install.rsp文件到/home/oracle/oinstall/oracle/database目录下。
#vim db_install.rsp
oracle.install.option=INSTALL_DB_SWONLY#./runInstaller -silent -responseFile
/home/oracle/oinstall/database/db_install.rsp
完成数据库软件安装,切到root用户,运行以下脚本。
# /u01/app/oraInventory/orainstRoot.sh
#/u01/app/oracle/product/12.2.0.1/dbhome_1/root.sh
完成数据库软件安装。
类似上面步骤,复制dbca.rsp到当前目录。
#vim dbca.rsp
gdbName=orcl#export ORACLE_HOME=/u01/app/oracle/product/12.2.0.1/dbhome_1
#export PATH=$ORACLE_HOME/bin:$PATH.
#dbca -silent -createDatabase -responseFile dbca.rsp
完成数据库创建。
类似上面步骤,复制netca.rsp到当前目录。
#netca -silent -responseFile netca.rsp
完成安装后,验证监听器状态正常。
#lsnrctl status
Leave A Comment