分享更有价值
被信任是一种快乐

如何通过克隆方式安装Oracle数据库软件

文章页正文上

这篇文章给大家分享的是有关如何通过克隆方式安装Oracle数据库软件的内容。小编觉得挺实用的,因此分享给大家做个参考,一起跟随小编过来看看吧。有时候,如果几个机器的配置相似,就不需要一遍又一遍地安装数据库软件了。这种情况下可以采用克隆安装的方式,比图形界面和静默安装更快捷。源主机:A机目标主机:B机1.B机创建用户和用户组#groupadd
–g 501 oinstall#groupadd
–g 502 dba#groupadd -g 503 oper#useradd -g oinstall -G dba,oper -u 501 -d /home/oracle oracle参数说明
-g
指定用户组-G
指定附加组-d
指定用户目录激活oracle用户(修改oracle用户密码)#passwd oracle2.B机创建数据库安装目录并分配权限# mkdir -p /u01/app/oracle/product/11.2.0/db_1# chown -R oracle:oinstall /u01# chown -R oracle:oinstall /oradata# chown -R oracle:oinstall /backup# chown -R oracle:oinstall /archivelog#chmod
–R 775 /u01#chmod
–R 775 /oradata#chmod
–R 775 /backup#chmod
–R 775 /archivelog注:在通常的生产环境中,我们将数据库软件(ORACLE_HOME)安装在本地,将数据(oradata/backup/archivelog)安装在存储中3.检查B机修改内核参数与A机一致# vi /etc/sysctl.conf4.检查B机修改用户限制文件与A机一致# vi /etc/security/limits.conf5.检查B机修改Oracle环境变量与A机一致(oracle用户)$ vi .bash_pfile6.B机安装相应需求包#yum install -y binutils compat* elfutils-libelf elfutils-libelf-devel glibc glibc-common glibc-devel gcc gcc-c++ libaio libgcc libstdc++ libstdc++-devel make sysstat unixODBC-devel libaio-devel kshA机操作:1.关闭数据库$ sqlplus / as sysdbaSQL> shutdown immediate;2.关闭监听$ lsnrctl stop3.打包/u01/app/oracle/product/目录$ cd /u01/app/oracle$ tar -cvf /u免费主机域名01/app/oracle/product.tar product/4.将打包传输到B机$ scp product.tar oracle@IP:/u01/app/oracleB机操作:1.解压tar包$ cd /u01/app/oracle$ tar -xvf product.tar2.检测$ORACLE_HOME/network/admin目录下listener.ora和tnsname.ora文件,修改HOST字段指向本机。3.运行runinstall$ cd $ORACLE_HOME/oui/bin$ ./runInstall -silent -clone ORACLE_BASE=’/u01/app/oracle’ORACLE_HOME=’/u01/app/oracle/product/11.2.0/db_1/’ORACLE_HOME_NAME=’ORACLE_HOME_1’(自定义名)Starting Oracle Universal Installer…Checking swap space: must be greater than 500 MB. Actual 3999 MB PassedPreparing to launch Oracle Universal Installer from /tmp/OraInstall2018-12-05_08-32-20AM. Please wait …[oracle@localhost bin]$ Oracle Universal Installer, Version 11.2.0.4.0 ProductionCopyright (C) 1999, 2013, Oracle. All rights reserved.You can find the log of this install session at:/u01/app/oraInventory/logs/cloneActions2018-12-05_08-32-20AM.log………………………………………………………………………………………. 100% Done.Installation in progress (Wednesday, December 5, 2018 8:32:30 AM EST)…………………………………………………………………… 78% Done.Install successfulLinking in progress (Wednesday, December 5, 2018 8:32:36 AM EST)Link successfulSetup in progress (Wednesday, December 5, 2018 8:33:04 AM EST)Setup successfulEnd of install phases.(Wednesday, December 5, 2018 8:33:27 AM EST)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./u01/app/oraInventory/orainstRoot.sh/u01/app/oracle/product/11.2.0/db_1/ro免费主机域名ot.shTo execute the configuration scripts:1. Open a terminal window2. Log in as “root”3. Run the scriptsThe cloning of ORACLE_HOME_1 was successful.Please check ‘/u01/app/oraInventory/logs/cloneActions2018-12-05_08-32-20AM.log’ for more details.此时,已经完成了Oracle数据库软件的安装4.开启监听$ lsnrctl start5.检验sqlplus功能$ sqlplus / as sysdba感谢各位的阅读!关于“如何通过克隆方式安装Oracle数据库软件”这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,让大家可以学到更多知识,如果觉得文章不错,可以把它分享出去让更多的人看到吧!

相关推荐: PostgreSQL中hash_search_with_hash_value函数有什么作用

本篇内容主要讲解“PostgreSQL中hash_search_with_hash_value函数有什么作用”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“PostgreSQL中hash_search_with_ha…

文章页内容下
赞(0) 打赏
版权声明:本站采用知识共享、学习交流,不允许用于商业用途;文章由发布者自行承担一切责任,与本站无关。
文章页正文下
文章页评论上

云服务器、web空间可免费试用

宝塔面板主机、支持php,mysql等,SSL部署;安全高速企业专供99.999%稳定,另有高防主机、不限制内容等类型,具体可咨询QQ:360163164,Tel同微信:18905205712

主机选购导航云服务器试用

登录

找回密码

注册