当前位置:  数据库>oracle

Oracle 11g Clone安装方法

    来源: 互联网  发布时间:2017-06-19

    本文导语: 如果你需要安装的数据库服务器比较多,使用图形化方式安装数据库软件的速度还是很慢,而且也比较麻烦。Oracle 11g 提供了Clone安装的方法。 步骤如下: 使用正常方法在服务器A上安装好Oracle。 将A机器上的$ORACLE_HOME打包,db_ho...

如果你需要安装的数据库服务器比较多,使用图形化方式安装数据库软件的速度还是很慢,而且也比较麻烦。Oracle 11g 提供了Clone安装的方法。

步骤如下:

  • 使用正常方法在服务器A上安装好Oracle。
  • 将A机器上的$ORACLE_HOME打包,db_home1.zip 。
  • 将B机器的环境准备好,如建立用户、建立用户、修改内核参数,修改环境变量等等。
  • 将zip包copy到B服务器,解压到任意目录。
  • 执行Clone命令

1.A机器上打包

[root@localhost oracle]# zip -r db_1.zip /u01/app/oracle/product/11.2.0/db_1/

2. 准备B机器环境

[root@localhost inst_env_scripts]# ./1preusers.sh

[root@localhost inst_env_scripts]# ./2predir.sh

[root@localhost inst_env_scripts]# ./3prelimits.sh

[root@localhost inst_env_scripts]# ./4presysctl.sh

脚本内容如下

[root@localhost inst_env_scripts]# cat 1preusers.sh

#!/bin/bash

#Purpose:Create 3 groups named 'oinstall','dba','oper', plus 1 users named 'oracle'.

#Also setting the Environment

#variable for oracle user.

#variable for grid user.

#Usage:Log on as the superuser('root'),and then execute the command:#./1preusers.sh

#Author:ding liqing

 

echo "Now create 3 groups named 'oinstall','dba','oper'"

echo "Plus 1 users named 'oracle',Also setting the Environment"

groupadd -g 1000 oinstall

groupadd -g 1300 dba

groupadd -g 1301 oper

useradd -u 1101 -g oinstall -G dba,oper -d /home/oracle -s /bin/bash -c "Oracle Software Owner" oracle

echo "oracle" | passwd --stdin oracle

echo "export TMP=/tmp">> /home/oracle/.bash_profile 

echo 'export TMPDIR=$TMP'>>/home/oracle/.bash_profile

echo "export ORACLE_SID=orcl">> /home/oracle/.bash_profile

echo "export ORACLE_BASE=/u01/app/oracle">> /home/oracle/.bash_profile

echo 'export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1'>> /home/oracle/.bash_profile

echo 'export TNS_ADMIN=$ORACLE_HOME/network/admin'  >> /home/oracle/.bash_profile

echo 'export PATH=/usr/sbin:$PATH'>> /home/oracle/.bash_profile

echo 'export PATH=$ORACLE_HOME/bin:$PATH'>> /home/oracle/.bash_profile

echo 'export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib'>> /home/oracle/.bash_profile

echo 'export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib'>> /home/oracle/.bash_profile

echo "export EDITOR=vi" >> /home/oracle/.bash_profile

echo "export LANG=en_US" >> /home/oracle/.bash_profile

echo "export NLS_LANG=american_america.AL32UTF8" >> /home/oracle/.bash_profile

echo "export NLS_DATE_FORMAT='yyyy/mm/dd hh24:mi:ss'" >> /home/oracle/.bash_profile

echo "umask 022">> /home/oracle/.bash_profile

 

echo "The Groups and users has been created"

echo "The Environment for oracle also has been set successfully"

 

[root@localhost inst_env_scripts]# cat 2predir.sh

#!/bin/bash

#Purpose:Create the necessary directory for oracle users and change the authention to oracle users.

#Usage:Log on as the superuser('root'),and then execute the command:#./2predir.sh

#Author:ding liqing

 

echo "Now create the necessary directory for oracle users and change the authention to oracle users..."

mkdir -p /u01/app/oracle

chown -R oracle:oinstall /u01

chmod -R 775 /u01

echo "The necessary directory for oracle users and change the authention to oracle users has been finished"


 

[root@localhost inst_env_scripts]# cat 3prelimits.sh

#!/bin/bash

#Purpose:Change the /etc/security/limits.conf.

#Usage:Log on as the superuser('root'),and then execute the command:#./3prelimits.sh

#Author:ding lq

 

echo "Now modify the /etc/security/limits.conf,but backup it named /etc/security/limits.conf.bak before"

cp /etc/security/limits.conf /etc/security/limits.conf.bak

echo "oracle soft nproc 2047" >>/etc/security/limits.conf

echo "oracle hard nproc 16384" >>/etc/security/limits.conf

echo "oracle soft nofile 1024" >>/etc/security/limits.conf

echo "oracle hard nofile 65536" >>/etc/security/limits.conf

echo "Modifing the /etc/security/limits.conf has been succeed."

#Usage:Log on as the superuser('root'),and then execute the command:#./4presysctl.sh

#Author:ding liqing

echo "Now modify the /etc/sysctl.conf,but with a backup named /etc/sysctl.bak"

cp /etc/sysctl.conf /etc/sysctl.conf.bak

 

echo "fs.aio-max-nr = 1048576" >> /etc/sysctl.conf

echo "fs.file-max = 6815744" >> /etc/sysctl.conf

echo "kernel.shmall = 2097152" >> /etc/sysctl.conf

echo "kernel.shmmax = 1054472192" >> /etc/sysctl.conf

echo "kernel.shmmni = 4096" >> /etc/sysctl.conf

echo "kernel.sem = 250 32000 100 128" >> /etc/sysctl.conf

echo "net.ipv4.ip_local_port_range = 9000 65500" >> /etc/sysctl.conf

echo "net.core.rmem_default = 262144" >> /etc/sysctl.conf

echo "net.core.rmem_max = 4194304" >> /etc/sysctl.conf

echo "net.core.wmem_default = 262144" >> /etc/sysctl.conf

echo "net.core.wmem_max = 1048586" >> /etc/sysctl.conf

echo "net.ipv4.tcp_wmem = 262144 262144 262144" >> /etc/sysctl.conf

echo "net.ipv4.tcp_rmem = 4194304 4194304 4194304" >> /etc/sysctl.conf

 

echo "Modifing the /etc/sysctl.conf has been succeed."

echo "Now make the changes take effect....."

sysctl -p


3. 将A机器上的zip包copy到B机器上

[root@localhost inst_env_scripts]# scp 192.168.199.163:/home/oracle/db_1.zip /home/oracle/

The authenticity of host '192.168.199.163 (192.168.199.163)' can't be established.

RSA key fingerprint is cc:d0:c3:de:37:33:a7:cb:91:40:c5:5f:18:07:06:9f.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added '192.168.199.163' (RSA) to the list of known hosts.

root@192.168.199.163's password:

db_1.zip                                                                                                                                                                100% 2366MB  30.0MB/s  01:19

4. 解压zip文件

[root@localhost oracle]# unzip -d / db_1.zip

[root@localhost oracle]# chown -R oracle.oinstall /u01/

5.执行Clone命令

[oracle@localhost ~]$ cd /u01/app/oracle/product/11.2.0/db_1/clone/bin/

[oracle@localhost bin]$ $ORACLE_HOME/perl/bin/perl clone.pl ORACLE_BASE="/u01/app/oracle/" ORACLE_HOME="/u01/app/oracle/product/11.2.0/db_1" OSDBA_GROUP=dba OSOPER_GROUP=oper -defaultHomeName

执行结果如下

./runInstaller -clone -waitForCompletion  "ORACLE_BASE=/u01/app/oracle/" "ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1" "oracle_install_OSDBA=dba" "oracle_install_OSOPER=oper" -defaultHomeName  -defaultHomeName -silent -noConfig -nowait

Starting Oracle Universal Installer...

 

Checking swap space: must be greater than 500 MB.  Actual 1999 MB    Passed

Preparing to launch Oracle Universal Installer from /tmp/OraInstall2015-08-22_05-13-13AM. Please wait ...Oracle Universal Installer, Version 11.2.0.4.0 Production

Copyright (C) 1999, 2013, Oracle. All rights reserved.

 

You can find the log of this install session at:

 /u01/app/oraInventory/logs/cloneActions2015-08-22_05-13-13AM.log

.................................................................................................... 100% Done.

 

 

 

Installation in progress (Saturday, August 22, 2015 5:13:31 AM CST)

..............................................................................                                                  78% Done.

Install successful

 

Linking in progress (Saturday, August 22, 2015 5:13:38 AM CST)

Link successful

 

Setup in progress (Saturday, August 22, 2015 5:13:41 AM CST)

Setup successful

 

End of install phases.(Saturday, August 22, 2015 5:14:06 AM 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.

/u01/app/oraInventory/orainstRoot.sh

/u01/app/oracle/product/11.2.0/db_1/root.sh

To execute the configuration scripts:

    1. Open a terminal window

    2. Log in as "root"

    3. Run the scripts

The cloning of OraHome1 was successful.

Please check '/u01/app/oraInventory/logs/cloneActions2015-08-22_05-13-13AM.log' for more details.

6. 使用root用户运行上面的两个脚本

[root@localhost ~]# /u01/app/oraInventory/orainstRoot.sh

[root@localhost ~]# /u01/app/oracle/product/11.2.0/db_1/root.sh

安装完毕!


    
 
 

您可能感兴趣的文章:

  • 请问在solaris下安装ORACLE,用root用户和用oracle用户安装有什么区别么?
  • 在linux下安装oracle,如何设置让oracle自动启动!也就是让oracle那个服务自动启动,不是手动的
  • SCO unix下安装oracle,但没有光盘,请大家推荐一个oracle下载站点(unix版本的)。谢谢!!!!
  • linux下安装oracle后使用命令行启动的方法 linux启动oracle
  • WEB前端 iis7站长之家
  • 那里有免费的oracle odbc driver for linux?或怎么破解easysoft oracle odbc driver安装包?急
  • 在redhat9.0下,能安装oracle的客户端么?? 哪里下载,怎么安装?
  • VMware中linux环境下oracle安装图文教程(二)ORACLE 10.2.05版本的升级补丁安装
  • 安装oracle9时,安装界面的字体无法正确显示,怎么解决啊???
  • Linux下的Oracle安装问题(非常问题)
  • 有人在fedora 10下安装 oracle database 11g,没有呀?提供个安装步骤
  • Linux安装oracle,菜鸟急用!
  • 在ubuntu安装oracle的疑问
  • 在Redhat7.2+Oracle8i如果硬件配置中用P4处理器,对oracle的安装有没有影响(100分)
  • 安装Oracle加载数据库错误areasQueries的解决
  • vmware 下安装oracle
  • CentOS 5 环境下安装oracle 10g 与 rhel 5下 安装有区别吗? [散分]
  • 在Linux下安装ORACLE
  • 安装ORACLE时的安装界面显示一堆乱码如何解决(我很菜的,分100可再加)---在线
  • 求ubuntu12.04下面安装oracle数据库,求安装教材,百度上就两种,都不能成功
  • ORACLE 中修改用户密码的方法
  • Linux下完全卸载ORACLE 10G的方法
  • 将Oracle 8i数据成功移植Oracle 10g的方法
  • Oracle Connect to Idle Instance解决方法
  • oracle增加表空间大小两种实现方法
  • linux下用ODBC链接Oracle怎么连啊?跪求具体方法!!!
  • Linux系统下查看oracle SID的方法
  • oracle 彻底删除方法
  • window中oracle环境变量设置方法分享
  • Oracle 忘记密码的找回方法
  • oracle的job不能运行问题的解决方法
  •  
    本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
    本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。












  • 相关文章推荐
  • Oracle 12c发布简单介绍及官方下载地址
  • 请问su oracle 和su - oracle有什么不同?
  • oracle 11g最新版官方下载地址
  • 虚拟机装Oracle R12与Oracle10g
  • Oracle 数据库(oracle Database)Select 多表关联查询方式
  • Oracle 数据库开发工具 Oracle SQL Developer
  • Oracle数据库(Oracle Database)体系结构及基本组成介绍
  • Oracle EBS R12 支持 Oracle Database 11g
  • 如何设置让Oracle SQL Developer显示的时间包含时分秒
  • 请问大家用oracle数据库, 用import oracle.*;下的东西么? 还是用标准库?
  • Oracle 10g和Oracle 11g网格技术介绍
  • Linux /$ORACLE_HOME $ORACLE_HOME
  • oracle中如何把表中具有相同值列的多行数据合并成一行
  • Linux系统下Oracle的启动与Oracle监听的启动
  • Oracle 数据库(oracle Database)性能调优技术详解
  • 网间Oracle的连接,远程连接Oracle服务器??
  • ORACLE日期相关操作
  • 请教:.profile中:if [ -d /opt/oracle/db01/app/oracle/product/9.2.0 ]是什么意思?
  • ORACLE数据库常用字段数据类型介绍
  • 在linux 中如何删除oracle db 与卸载oracle.
  • Oracle 12c的九大最新技术特性介绍
  • 如何将Aix上的oracle 物理备份 然后再在linux 系统上还原oracle


  • 站内导航:


    特别声明:169IT网站部分信息来自互联网,如果侵犯您的权利,请及时告知,本站将立即删除!

    ©2012-2021,,E-mail:www_#163.com(请将#改为@)

    浙ICP备11055608号-3