Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2926189
  • 博文数量: 454
  • 博客积分: 4860
  • 博客等级: 上校
  • 技术积分: 6375
  • 用 户 组: 普通用户
  • 注册时间: 2011-03-13 10:08
个人简介

10年工作经验,专研网站运维。

文章分类

全部博文(454)

文章存档

2017年(11)

2016年(13)

2015年(47)

2014年(36)

2013年(147)

2012年(64)

2011年(136)

分类: 系统运维

2013-02-27 17:31:22

参考网站:

https://blogs.oracle.com/ptian/entry/oracle_apps_autoconfig

 

Background

Oracle Apps的架构非常复杂,使用了非常多技术(或服务)。比如Apache Web server, Apache Jserv, Forms Listener servlet (或forms server) 等等,每一个服务都有着自己的配置文件,只有都设置正确了,系统才能正常运作。而且,Oracle Apps使用了许多的Profile Options(比如Applications Web Agent, Applications Framework Agent等),这些也需要都设置正确,人工管理这么多配置文件,其实并不容易,对于新人来说,学习成本很高。

所以Oracle推出了一个非常强大的工具--Autoconfig(Autoconfig是11.5.4后引入的),用于维护这些配置文件和 Profile Options。我们可以认为AutoConfig是一些系列模板化配置文件的集合,用于配置出一个标准化的应用环境。


什么是AutoConfig

AutoConfig是集中并简化Oracle Apps的配置管理的工具,一个自动配置EBS Instance的工具,不需要手工干预。它所需要的信息仅仅是两个存储在本地Context文件(XML类型的文件),一个是Apps Context文件,另外一个是DB Context文件。

AutoConfig在Apps层运行的话,那么它就需要读取Apps Context文件来产生所有的配置文件,并且会更新数据库的Profiles。

如果AutoConfig在DB层运行的话,那么它就需要读取DB Context文件来产生所有用于DB层面的配置文件。

AutoConfig内部其实是一组Java Class文件,这些Class文件由Shell脚本(或者perl脚本)来调用,通过模板化的配置来维护系统的配置文件。Autoconfig运行时,会用新的配置文件重写已存在的配置文件(这个新的配置文件其实是:模板配置文件+context文件,构建而成的)

总之:AutoConfig确实很好的简化了系统的配置工作。


AutoConfig脚本所在的目录

Application tier: /admin/scripts/adautocfg.sh

                            (eg./u01/oracle/mc3yd213/inst/apps/mc3yd213_bej301441/admin/scripts/adautocfg.sh)

Database tier: /appsutil/scripts//adautocfg.sh

                          (eg./u01/oracle/mc3yd213/db/tech_st/11.1.0/appsutil/scripts/mc3yd213_bej301441/adautocfg.sh)


运行方法

Apps Tier:

sh /admin/scripts/adautocfg.sh 

注意:

  • 在运行AutoConfig的过程中,Database server和database listener必须已经启动,Apps Server应该处于关闭状态。
  • Running AutoConfig may change your existing environment files. After running AutoConfig, you should always set the environment before you run any Applications utilities, in order to apply the changed environment variables.

DB Tier:

sh /appsutil/scripts//adautocfg.sh

注意:

  • 在运行AutoConfig的过程中,Database server和database listener必须已经启动,其他数据库服务应该处于关闭状态。
  • Running AutoConfig may change your existing environment files. After running AutoConfig, you should always set the environment before you run any Applications utilities, in order to apply the changed environment variables
  • Autoconfig会涉及三类文件:Context文件,Template文件,Driver文件。

    Context文件

    Context文件可以说一个记录环境参数的基础文件,它存储了Apps所有的配置信息,如果需要更改某项配置,则需要首先修改Context文件的配置信息,然后在通过AutoConfig,把更改的信息更新到所有的真实配置文件中去。

    Apps Context文件:/appl/admin/.xml (eg./u01/oracle/mc3yd213/inst/apps/mc3yd213_bej301441/appl/admin/mc3yd213_bej301441.xml)

    DB Context文件:/appsutil /.xml(eg./u01/oracle/mc3yd213/db/tech_st/11.1.0/appsutil/mc3yd213_bej301441.xml)

    NOTE: = _

    AutoConfig模板文件

    用于生成配置文件的模板,Apps里的每一个配置文件都有一个对应的模板。模板文件中包含了很多的Tag,这些Tag最终会被Context文件中环境变量替换掉。

    模板文件存放的地方: 

    Apps层的模板文件:/admin/template,比如: /admin/template (eg./u01/oracle/mc3yd213/apps/apps_st/appl/fnd/12.0.0/admin/template,打开目录能看到很多tmp的模板文件)


    DB层的模板文件:/appsutil/template,比如/appsutil /template(eg./u01/oracle/mc3yd213/db/tech_st/11.1.0/appsutil/template)

    driver文件

    Driver文件会列出了AutoConfig模板文件路径以及模板文件对应的目标配置文件的真实路径,以及一些脚本命令。

    Apps的Driver文件位于:/admin/driver,比如: /admin/driver(eg./u01/oracle/mc3yd213/apps/apps_st/appl /fnd/12.0.0/admin/driver,里边有很多.drv文件)

    DB的Driver文件位于:/appsutil/template,比如/appsutil /template(eg./u01/oracle/mc3yd213/db/tech_st/11.1.0/appsutil/template里的.drv文件)

    每当Autoconfig运行的时候,都会在先找到Driver文件,然后按照Driver文件提供的脚本命令,模板文件,以及Context文件生成目标配置文件。


    AutoConfig的日志文件

    Application Tier: /admin/log/


    Database Tier:   /appsutil/log//

                              eg./u01/oracle/mc3yd213/db/tech_st/11.1.0/appsutil/log/mc3yd213_bej301441/05240310

    = (month, day, hour, minute of AutoConfig run)


    AutoConfig配置回滚

    每一次AutoConfig的运行都会产生一个回滚脚本,如果AutoConfig配置错误,你可以使用回滚脚本来恢复之前的配置。

    Application Tier:     /admin/out/
    Database Tier:    /appsutil/out//
    并且运行命令:  restore.sh(Unix) 或者restore.cmd(Windows)


    Autoconfig Context文件的修改

    路径:System Administration > Oracle Applications Manager > AutoConfig
    从列表中可以看到DB层和Apps层的Autoconfig Context文件

    点击Edit Parameter,可以在这里修改Context File的Parameter,在这里改Context文件应该比直接修改Context的XML文件更安全些。

    从截图的页签,也可以看出,Autoconfig Context的配置主要涉及到Global,System,Local,Install,Environments,Processes,Custom几块。

    Reference about AutoConfig

    387859.1  Using AutoConfig to Manage System Configurations in Oracle Applications Release 12

    165195.1  Using AutoConfig to Manage System Configurations with Oracle Applications 11i

    218089.1  Autoconfig FAQ
    270519.1  Customizing an AutoConfig Environment
    364927.1 How To Run Autoconfig On Database Tier (DB-Tier)
    341322.1 How to change the hostname of an Applications Tier using AutoConfig
    338003.1 How to change the hostname and/or port of the Database Tier using AutoConfig
    315674.1 How To Verify if Autoconfig is Enabled on 11.5.x
    391406.1 How to get a clean Autoconfig Environment

 

阅读(3939) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~