ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 利用uat环境中的tar包,重新克隆培训环境

利用uat环境中的tar包,重新克隆培训环境

原创 Linux操作系统 作者:sxitsxit 时间:2012-12-04 09:20:30 0 删除 编辑
oracle数据库版本为 11.2.0.3 
oracle  ebs 版本为 r12.

一、安装前的准备

MicrosoftInternetExplorer402DocumentNotSpecified7.8Normal0

1:将uat环境的tar包传到培训环境(用vnc窗口传)


root@uat # cd uattmp_data/

root@uat # scp UAT.20121130.tar root@192.168.1.98:/peixun_data


2:在培训环境中解压tar包


root@peixun # df -h

root@peixun # tar -xvf UAT.20121130.tar



3:首先将解压出来的UAT文件夹改名为 PEIXUN


root@peixun # pwd

/peixun_data

root@peixun # ls

PEIXUN            UAT.20121130.tar

root@peixun # mv UAT PEIXUN



MicrosoftInternetExplorer402DocumentNotSpecified7.8Normal0

4:以root身份登录,切换到orapx用户的过程中,报错


root@peixun # su - orapx

Oracle Corporation      SunOS 5.10      Generic Patch   January 2005

You have new mail.

-bash: /peixun_data/PEIXUN/db/tech_st/11.2.0/PEIXUN_peixun.env: No such file or directory


然后添加路径


-bash-3.2$  cd /peixun_data/PEIXUN/db/tech_st/11.2.0/appsutil

-bash-3.2$ ls

bin                    log                    perl                   UAT_uattmp.xml.bak

clone                  media                  scripts                UAT_uat.xml

driver                 out                    sql                    UAT_uat.xml.bak

html                   outbound               temp                   UAT_zone04.xml

install                PEIXUN_peixun.xml      template

java                   PEIXUN_peixun.xml.bak  UAT_uattmp.xml

-bash-3.2$ 

-bash-3.2$ cd clone/

-bash-3.2$ ls

adlnkoh.sh  context     dbts        jlib        oui

bin         data        html        jre         ouicli.pl

-bash-3.2$ cd bin

-bash-3.2$ 

-bash-3.2$ ls

adcfgclone.pl                adclone.pl                   CloneContext_1022180951.log

adchkutl.sh                  CloneContext_1022142426.log  CloneContext_1203094607.log

adclonectx.pl                CloneContext_1022142606.log

-bash-3.2$ 

-bash-3.2$ pwd

/peixun_data/PEIXUN/db/tech_st/11.2.0/appsutil/clone/bin

-bash-3.2$


设置搜索路径即可登录


-bash-3.2$ export PATH=/peixun_data/PEIXUN/db/tech_st/11.2.0/perl:$PATH


-bash-3.2$ export PERL5LIB=/peixun_data/PEIXUN/db/tech_st/11.2.0/perl/lib/5.10.0:/peixun_data/PEIXUN/db/tech_st/11.2.0/perl/lib/site_perl/5.10.0/



二、 正式克隆


1:MicrosoftInternetExplorer402DocumentNotSpecified7.8Normal0用orapx用户克隆数据库



MicrosoftInternetExplorer402DocumentNotSpecified7.8Normal0

-bash-3.2$ cd /peixun_data/PEIXUN/db/tech_st/11.2.0/appsutil/clone/bin

-bash-3.2$ ls

adcfgclone.pl                adclone.pl                   CloneContext_1022180951.log

adchkutl.sh                  CloneContext_1022142426.log  CloneContext_1203094607.log

adclonectx.pl                CloneContext_1022142606.log

-bash-3.2$ 

-bash-3.2$ perl adcfgclone.pl dbTier

                     Copyright (c) 2002 Oracle Corporation

                        Redwood Shores, California, USA

                        Oracle Applications Rapid Clone

                                 Version 12.0.0

                      adcfgclone Version 120.31.12010000.8

Enter the APPS password : 


MicrosoftInternetExplorer402DocumentNotSpecified7.8Normal0

只要安装日志显示完全安装,即表示安装已经ok,完整的输出日志如下





2:MicrosoftInternetExplorer402DocumentNotSpecified7.8Normal0用applpx克隆应用



MicrosoftInternetExplorer402DocumentNotSpecified7.8Normal0

root@peixun # su - applpx

Oracle Corporation      SunOS 5.10      Generic Patch   January 2005

You have new mail.

-bash: /peixun_data/PEIXUN/apps/apps_st/appl/APPSPEIXUN_peixun.env: No such file or directory

-bash-3.2$ cd /peixun_data/PEIXUN/apps/apps_st/comn/clone/

-bash-3.2$ ls

appl                   context                jre                    jre_BAK_1238541507821

appsts                 html                   jre_BAK_1227796676620  jre_BAK_1238586297462

bin                    jlib                   jre_BAK_1227797936181  oui

-bash-3.2$ 

-bash-3.2$ cd bin

-bash-3.2$ 

-bash-3.2$ ls

adaddnode.pl                 adclonectx.pl                CloneContext_1022143922.log

adcfgclone.pl                adclone.pl                   CloneContext_1022181928.log

adchkutl.sh                  CloneContext_1022143853.log  CloneContext_1203100407.log

-bash-3.2$ 

-bash-3.2$ perl adcfgclone.pl appsTier

                     Copyright (c) 2002 Oracle Corporation

                        Redwood Shores, California, USA

                        Oracle Applications Rapid Clone

                                 Version 12.0.0

                      adcfgclone Version 120.31.12010000.8

Enter the APPS password : 





MicrosoftInternetExplorer402DocumentNotSpecified7.8Normal0

只要安装日志显示完全安装,即表示安装已经ok,完整的输出日志如下




MicrosoftInternetExplorer402DocumentNotSpecified7.8Normal0

然后再执行几个存储过程


root@peixun # su - applpx

Oracle Corporation      SunOS 5.10      Generic Patch   January 2005

You have new mail.

-bash-3.2$  

-bash-3.2$ sqlplus  apps/apps

SQL*Plus: Release 10.1.0.5.0 - Production on Mon Dec 3 15:11:32 2012

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> exec fnd_conc_clone.setup_clean;

SQL> commit;

Commit complete.


然后exit退出



三、修改参数



1:MicrosoftInternetExplorer402DocumentNotSpecified7.8Normal0orapx用户



MicrosoftInternetExplorer402DocumentNotSpecified7.8Normal0

root@peixun # su - orapx

Oracle Corporation      SunOS 5.10      Generic Patch   January 2005

You have new mail.

-bash-3.2$ cd $ORACLE_HOME/

-bash-3.2$ pwd

/peixun_data/PEIXUN/db/tech_st/11.2.0

-bash-3.2$ cd appsutil

-bash-3.2$ ls

bin                    log                    perl                   UAT_uattmp.xml.bak

clone                  media                  scripts                UAT_uat.xml

driver                 out                    sql                    UAT_uat.xml.bak

html                   outbound               temp                   UAT_zone04.xml

install                PEIXUN_peixun.xml      template

java                   PEIXUN_peixun.xml.bak  UAT_uattmp.xml

-bash-3.2$ 

-bash-3.2$ cp PEIXUN_peixun.xml  PEIXUN_peixun.xml.bak

-bash-3.2$


在该参数文件 PEIXUN_peixun.xml   中修改如下


这一行中,将所有的5.8.3更改为 5.10.0


/peixun_data/PEIXUN/db/tech_st/11.2.0/perl/lib/5.10.0:/peixun_data/PEIXUN/db/tech_st/11.2.0/perl/lib/site_perl/5.10.0:/peixun_d

ata/PEIXUN/db/tech_st/11.2.0/appsutil/perl


修改以后,保存退出,再更新配置


-bash-3.2$ pwd

/peixun_data/PEIXUN/db/tech_st/11.2.0/appsutil/scripts/PEIXUN_peixun

-bash-3.2$ ls

adautocfg.sh   addbctl.sh     adexecsql.pl   adpreclone.pl  adstrtdb.sql

adchknls.pl    addlnctl.sh    adlsnodes.sh   adstopdb.sql

-bash-3.2$ 

MicrosoftInternetExplorer402DocumentNotSpecified7.8Normal0

-bash-3.2$ ./adautocfg.sh




2:MicrosoftInternetExplorer402DocumentNotSpecified7.8Normal0applpx用户


MicrosoftInternetExplorer402DocumentNotSpecified7.8Normal0

root@peixun # su - applpx

Oracle Corporation      SunOS 5.10      Generic Patch   January 2005

You have new mail.

-bash-3.2$ 

-bash-3.2$ 

-bash-3.2$ cd $ADMIN_SCRIPTS_HOME

-bash-3.2$ ls

adalnctl.sh         adforms-c4wsctl.sh  adopmnctl.sh        ieo                 mwactlwrpr.sh

adapcctl.sh         adformsctl.sh       adpreclone.pl       java.sh

adautocfg.sh        adformsrvctl.sh     adstpall.sh         jtffmctl.sh

adcmctl.sh          adoacorectl.sh      adstrtal.sh         msc

adexecsql.pl        adoafmctl.sh        gsmstart.sh         mwactl.sh

-bash-3.2$ 

MicrosoftInternetExplorer402DocumentNotSpecified7.8Normal0

MicrosoftInternetExplorer402DocumentNotSpecified7.8Normal0

-bash-3.2$ ./adautocfg.sh 

Enter the APPS user password:




3:再切换到orapx用户,关闭数据库,修改数据库初始化参数文件


root@peixun # su - orapx

Oracle Corporation      SunOS 5.10      Generic Patch   January 2005

bash-3.2$ 

bash-3.2$ ./stopdb.sh


MicrosoftInternetExplorer402DocumentNotSpecified7.8Normal0

bash-3.2$ cd $ORACLE_HOME/dbs


bash-3.2$ cp initPEIXUN.ora initPEIXUN.ora.bak


bash-3.2$ vi initPEIXUN.ora


此系统内存48g


参数内容修改如下:


sga_target=4G

pga_aggregate_target=4G

shared_pool_size = 1600M

shared_pool_reserved_size = 160M

processes                       = 500    # Max. no. of users x 2

sessions                        = 1000     # 2 X processes

在修改数据库初始化参数的过程中,使用了projects -l ,该命令表示什么意思?

还查看了  /etc/system的设置 



四、更改配置后的验证


1:MicrosoftInternetExplorer402DocumentNotSpecified7.8Normal0以orapx用户启动db


-bash-3.2$ more startdb.sh 

/peixun_data/PEIXUN/db/tech_st/11.2.0/appsutil/scripts/PEIXUN_peixun/addlnctl.sh start PEIXUN

/peixun_data/PEIXUN/db/tech_st/11.2.0/appsutil/scripts/PEIXUN_peixun/addbctl.sh start

-bash-3.2$ cd

-bash-3.2$ ./startdb.sh



2:MicrosoftInternetExplorer402DocumentNotSpecified7.8Normal0以applpx用户启动相关应用,并做相关设置


-bash-3.2$ ls 

adalnctl.sh         adcmctl.sh          adformsctl.sh       adoafmctl.sh        adstpall.sh         ieo                 msc

adapcctl.sh         adexecsql.pl        adformsrvctl.sh     adopmnctl.sh        adstrtal.sh         java.sh             mwactl.sh

adautocfg.sh        adforms-c4wsctl.sh  adoacorectl.sh      adpreclone.pl       gsmstart.sh         jtffmctl.sh         mwactlwrpr.sh

-bash-3.2$ 

-bash-3.2$ ./adopmnctl.sh starall

bash-3.2$ ./adalnctl.sh startall

该脚本启动以后,在ie中输入网址

http://peixun.yahgee.com:8010/  ,如果登录页面正常显示,则ok


MicrosoftInternetExplorer402DocumentNotSpecified7.8Normal0

然后以sysadmin用户身份登录系统,选择“系统管理员”---------"Oracle Applications 管理器"------------“oracle  workflow”----“site map”---------“auto config”


弹出以下界面




MicrosoftInternetExplorer402DocumentNotSpecified7.8Normal0

然后在弹出的页面中选择“system” 然后找到如下栏


(1)oa_forms_server(FORMS OC4J Instance Start Parameters)

该行由原来的

“-server -verbose:gc -Xmx256M -Xms64M -XX:MaxPermSize=128M -XX:NewRatio=2 -XX+PrintGCTimeStamps -XX:+UseTLAB -XX:+UseParallelGC -XX:ParallelGCThreads=2”


改为


“-server -verbose:gc -Xmx1024M -Xms256M -XX:MaxPermSize=128M -XX:NewRatio=2 -XX:+PrintGCTimeStamps -XX:+UseTLAB -XX:+UseParallelGC -XX:ParallelGCThreads=4  ”


(2)oacore_server ( OACORE OC4J Instance Start Parameters)

该行由原来的

“server -verbose:gc -Xmx512M -Xms128M -XX:MaxPermSize=160M -XX:NewRatio=2  -XX:+PrintGCTimeStamps -XX:+UseTLAB -XX:+UseParallelGC  -XX:ParallelGCThreads=2”

改为

"server -verbose:gc -Xmx1024M -Xms256M -XX:MaxPermSize=160M -XX:NewRatio=2  -XX:+PrintGCTimeStamps -XX:+UseTLAB -XX:+UseParallelGC  -XX:ParallelGCThreads=4 "


(3)  oafm_server  ( OAFM OC4J Instance Start Parameters)   

该行由原来的

“-server -verbose:gc -Xmx256M -Xms64M -XX:MaxPermSize=128M -XX:NewRatio=2 -XX:+PrintGCTimeStamps -XX:+UseTLAB -XX:+UseParallelGC -XX:ParallelGCThreads=2  ”

改为

“-server -verbose:gc -Xmx1024M -Xms256M -XX:MaxPermSize=256M -XX:NewRatio=2 -XX:+PrintGCTimeStamps -XX:+UseTLAB -XX:+UseParallelGC -XX:ParallelGCThreads=4  ”



然后点击左下角的“environments”,找到如下栏


(1)oa_environment:adovars (ADJREOPTS)

由原来的


“-ms128m -mx512m”


改为


“-ms256m -mx1024m”


(2)oa_environment:adovars (AFJSMARG)


由原来的


“-server -Xmx512m -XX:NewRatio=2 -XX:+UseSerialGC -Doracle.apps.fnd.common.Pool.leak.mode=stderr:off -verbose:gc”


改为

“-server -Xmx1024m -XX:NewRatio=2 -XX:+UseSerialGC -Doracle.apps.fnd.common.Pool.leak.mode=stderr:off -verbose:gc”


最后点 save保存



MicrosoftInternetExplorer402DocumentNotSpecified7.8Normal0

最后在applpx用户下执行


-bash-3.2$ cd $ADMIN_SCRIPTS_HOME

-bash-3.2$ ls

adalnctl.sh         adforms-c4wsctl.sh  adopmnctl.sh        ieo                 mwactlwrpr.sh

adapcctl.sh         adformsctl.sh       adpreclone.pl       java.sh

adautocfg.sh        adformsrvctl.sh     adstpall.sh         jtffmctl.sh

adcmctl.sh          adoacorectl.sh      adstrtal.sh         msc

adexecsql.pl        adoafmctl.sh        gsmstart.sh         mwactl.sh

-bash-3.2$ 

-bash-3.2$ ./adalnctl.sh stop

-bash-3.2$ ./adopmnctl.sh stop


然后再次更新配置文件


-bash-3.2$ pwd

/peixun_data/PEIXUN/inst/apps/PEIXUN_peixun/admin/scripts

-bash-3.2$ ./adautocfg.sh 

Enter the APPS user password:



MicrosoftInternetExplorer402DocumentNotSpecified7.8Normal0

root@peixun # su - applpx

-bash-3.2$ ./startapp.sh 

重新启动应用

然后重新设置系统的命名和颜色



appl_clone1.jpg

appl_clone2.jpg

appl_clone3.jpg

db_clone1.jpg

db_clone2.jpg

db_clone3.jpg

peizhi1.jpg

peizhi2.jpg

peizhi3.jpg

peizhi4.jpg

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/24862808/viewspace-750488/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: 测试环境预clone
请登录后发表评论 登录
全部评论

注册时间:2011-04-14

  • 博文量
    98
  • 访问量
    323765