`
bravewu
  • 浏览: 49363 次
  • 性别: Icon_minigender_1
  • 来自: 大连
社区版块
存档分类
最新评论

在RAD/RSA上安装配置Portal 6.0 和优化性能并减少资源消耗的方法

阅读更多

如何让这些应用软件工作在一起

 

 Portal 6.0 服务器并不是和Portal 5服务器遵循相同的设计架构。对于Portal 6.0,IBM并没有提供专门用于Rational产品上的精简测试环境,而是直接使用一个完整的Portal 6.0 服务器。

 

对于安装在同一台机器上的Portal 5服务器测试环境将诸如自动重载成果物、热代码切换等功能启用。这意味着你可以直接使用Portal 5 服务器的这些便利功能进行开发而不用受任何其它限制条件。然而,这也同样意味着当你将一个完整的Portal 6.0实例安装在你的开发机器上时,它会吞噬掉你的很多资源。

 

本文的目的是提供一些要点,用来解决如何减少Portal 6.0在你机器上所消耗的资源和如何在基于你的开发需求的基础上来优化性能。本文还包含了一些其它安装配置信息,如果你想使用Rational的产品来开发WebSphere Portal 6.0的项目,它们对你来说应该是非常有用的。

 

本文用到的术语

 

为了避免重复使用长名字,本文使用了以下缩写名词:

  • Rational软件:或指Rational Application Developer(RAD) V7.0或指Rational Software Architect(RSA) V7.0,或两者都是。
  • Portal or portal, 如无其它特别说明,意指 WebSphere Portal V6.0.
  • WebSphere,  如无其它特别说明,意指IBM® WebSphere® Application Server V6.0(WAS),它是用来运行Portal 。
  • Linux ® 意指WebSphere Portal V6.0所支持的Linux操作系统和任何其它类似UNIX®的操作系统,例如IBM® AIX® 或Sun® Solaris™.

当提到磁盘位置时,以下目标路径是指:

  • WAS_HOME: WebSphere Application Server V6.0的安装目录。
  • WPS_HOME: WebSphere Portal Server V6.0 is 的安装目录。
  • WP_PROFILE: WebSphere Portal WebSphere server profile的目录。

安装要点

 

主机名

 

如果你安装的Portal将被其它机器的开发者使用,那么你输入的主机名必须是其它机器可以解析到的名称。因此,最好是用一个有效的主机名或IP地址,如图1所示。


图1:WebSphere Application Server的属性

 
为了测试你选择的名称是否可用,你可以在其它一台机器上试着ping一下你在安装向导中输入的主机名。如果可以成功ping通,那们你就可使用这个名称。

 

如果只是在本地使用,也就说portal 和 rational 软件在同一台机器上,想到所用的默认名称一般都是可以的。

 

WebSphere业务流程支持

 

WebSphere业务流程支持的启用和禁用是通过WebSphere流程服务器在安装过程中(见图2)控制的。在WebSphere Portal V6.0中,你无法再安装完成后启用或禁用它。因此,如果你需要更改它,你必须重新安装Portal服务器。

 

图2:安装过程中安装业务流程支持的选项


  

安装业物流支持意味着会增加服务器的启动时间。尽管Portal 6.0开发工具在理想情况下时无需重起服务器的,但也难免偶尔开发这需要重起服务器。因此,最好不要安装业务流程支持,除非确实需要。

 

减少启动时间

 

注:在本段中提到的方法请勿用于生产环境,因为IBM对此并不提供支持。这些方法也仅用于帮助开发人员题缩短在用本地机器上的开发周期。能够优化通过正常方式安装的portal的长期运行性能的配置方法,与缩短启动时间的方法相比较,开发人员可能对前者更感兴趣。正如前面说的,Rational软件对Portal 6.0 的支持在正常情况下是不需要重起服务器的,但难免偶尔会有开发人员需要重启服务器。庆幸地,有办法可以有效地减少portal启动时花费的时间。

 

如何启用开发方式

 

启用开发模式的第一步你可以在管理控制台完成。如果你想通过Rational软件来启动服务器,那么这一步就没有必要了,因为该软件会自动完成。如果在安装portal服务器的机器上没有Rational软件,那么你讲必须通过管理控制抬手动完成以下这些步骤:

  1. 打开管理控制台并进入到应用服务器 > WebSphere_Portal, 然后选中以开发方式运行的复选框(见图3)。 图3:选中以开发方式运行

     
  2. 接下来, 将StartupPerformanceConfig.zip文件——见 下载 ——到WPS_HOME/config目录下。 该zip文件包含了用来禁用一些非必要portal组件的脚本。
  3. 在你能够运行这些脚本之前,你必须要正确的配置WPS_HOME/config/wpconfig.properties文件。使用一个标准的文本编辑器打开此文件然后确认以下这些变量的值是正确的(在portal安装过程中你它们输入的值):
    • WasUserid: WebSphere Application Server 安全认证用户标识
    • WasPassword: WebSphere Application Server 安全认证密码
    • PortalAdminId: WebSphere portal 管理员标识
    • PortalAdminPwd: WebSphere portal 管理员密码
  4. 当这些值被正确设置好后,你可以使用一下命令来运行:
    • Microsoft® Windows®: WPS_HOME\config\WPSconfig.bat <目标>
    • Linux: WPS_HOME/config/WPSconfig.sh <目标>

     <目标> 从以下中选择:

  • action-disable-target-mapping-portlets: portal提供的所有portlet应用
  • action-disable-target-mapping-pzn: 禁用所有个性化的应用
  • action-disable-target-mapping-caiwcm: 禁用所有计算机辅助向导(CAI)和内容管理(WCM)应用
  • action-disable-target-mapping-misc: 各种应用

通过将目标中的“disable”替换为“enable”然后运行相同命令,可以将这些逐渐重新启用。因此,例如,禁用个性化应用,你会运行一下命令(在windows里):

WPS_HOME\config\WPSconfig.bat action-disable-target-mapping-pzn

如果你之后你想重新启用个性化,你将使用此命令:
WPS_HOME\config\WPSconfig.bat action-enable-target-mapping-pzn

注:

如果你禁用了个性化、CAI和WCM或各种应用,那么它们在服务器上就不再可用了。In contrast, disabling the portlet applications does not make them unavailable. It simply defers loading them until they are actually needed.

Debug mode

Starting the server in debug mode is required if you want to be able to debug your applications from Rational software but running in debug mode results in a performance hit especially in the startup time. As well as the generic startup improvements of the previous section there is another step you can take which improves the startup time when running in debug mode. If you intend on starting the server in debug from Rational software then you may skip this section as Rational software automatically performs this optimization. If the server is on a remote machine which does not have a Rational software installation then you should use this.

  1. To configure a server to start in debug mode, click the Debugging Service properties link in the Application servers > WebSphere_Portal panel (see Figure 4).

Figure 4. Setting Debugging Service properties


 

  1. Then select the Enable service at server startup check box (see Figure 5).

Figure 5. Enabling the Debugging Service


 

  1. When you have done this, you can optimize the debug mode startup by tweaking the Java™ Virtual Machine (JVM) arguments for the portal, as Figure 6 shows:
    1. First expand the Java™ and Process Management item in the WebSphere_Portal panel.
    2. Then and click Process Definition.

Figure 6. Optimizing debug mode startup


 
 

Tip: Notice that the ‘Run in development mode’ checkbox is selected as per the instructions in the previous section).

  1. In the Process Definition panel (Figure 7), click the link for Java Virtual Machine properties:

Figure 7. Process Definition panel
 

  1. In the Debug arguments field, add the argument –Xj9 so that the field value is as Listing 1 shows (assuming defaults for other arguments).

Listing 1. Adding a debug argument

 

                
-Djava.compiler=NONE -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=
n,address=7777 -Xj9

  

  1. The –Xj9 switch improves performance, but it interferes with two arguments in Generic JVM arguments. To remedy this, you need to remove the –Xp???k,??k and –Xk????? arguments, which by default are: -Xp128k,64k -Xk40000. This makes the field value for Generic JVM arguments what you see in Listing 2, assuming defaults for other arguments. (See Figure 8 also.)

Listing 2. Adding a debug argument

 

                
${WPS_JVM_ARGUMENTS_EXT} -Ddb2j.system.home=${WPS_HOME}/cloudscape

 Figure 8. Deleting debug mode arguments

 

  1. After you have done this, save your configuration to the master configuration and restart the server. The server will now be in debug mode, and its startup will have taken less time than if you had not tweaked the JVM settings.

Backup and recovery

Rational software operates directly on the portal server. Therefore, it may be useful to be able to save a particular configuration and to be able to restore it if your server becomes unstable or if you want to restore the portal to a certain state.

Backing up and restoring the portal

It is important that you make backups of two directories in your portal installation.

  • The first is the WebSphere profile directory for the portal profile. On Windows. this defaults to the C:\ibm\WebSphere\profiles\wp_profile, and on Linux, it defaults to the WAS_HOME/profiles/wp_profile. A WebSphere profile defines the runtime environment for the server, such as what applications to run, what the security settings are, and what data sources are defined.
  • The second useful backup directory is the portal database directory, which defaults to WPS_HOME/cloudscape on both Windows and Linux. This directory contains the database that defines the layout of the portal.

When restoring either of these backups, you will need to stop your server, delete the current contents of the directory, and then copy the contents of the backup into the now empty directory. After doing this, you can start your server again, and the portal that you backed up should be restored. You can backup and restore these directories individually, but it is far better that you backup and restore both of them together and at the same time, because there are certain elements in each that rely on elements in the other.

Reinstalling the portal

You should use the Portal uninstaller to remove a Portal installation from the machine but in certain cases such as an aborted installation this may not work. If you want to make sure that your machine is clean before reinstalling Portal and then take the following steps:

  1. If the WPS_HOME directory exists then delete it and its contents.
  2. If the WAS_HOME directory exists then delete it and its contents.
  3. If your profiles directory is not stored under WAS_HOME then you need to delete this directory as well. This is likely to occur on Windows where the default location is C:\ibm\WebSphere\profiles irrespective of where you have installed Portal or WebSphere.
  4. Windows only: Open the Registry Editor and delete these keys:
    • HKEY_LOCAL_MACHINE\SOFTWARE\IBM\WebSphere Portal Server\6.0.0.0
    • HKEY_LOCAL_MACHINE\SOFTWARE\IBM\WebSphere Application Server Network Deployment\6.0.0.0
  5. Locate the vpd.properties file. In Windows, this is in C:\Windows or C:\WinNT, and in Linux, it is in /root. Edit this file to remove any entries that refer to a location in WPS_HOME or WAS_HOME for the portal that you are trying to uninstall. Alternatively, you can just delete this file, but that advisable only if you have no other portal installations of any version on this machine.
  6. In your home directory (for example, /root on Linux or C:\Documents And Settings\<username> on Windows), delete these three files if they exist. Note that on Linux these files may be hidden, because they start with a period. Ensure that this is not the case.
    • .ITLMRegistry
    • ._cie.trace.xml.lck
    • .WebSphereRegistry

Other ways to optimize performance

There are various other changes or tweaks that can improve stability and functionality. Among the most important to know about are how to switch the wps.ear file and how to control caches to boost performance.

Change the JAR file

Rational software requires the main portal enterprise application, wps.ear, to be running for its tools to work. In cases where this application is not working or has become corrupt, the software attempts to automatically restore it from the wps.ear file in WPS_HOME/installableApps/wps.ear. Part of this wps.ear archive is a Java™ Archive (JAR) file that the portal uses, wp.scheduler.ejb.jar. The version of this JAR in the wps.ear file in installableApps has not been prepared for deployment in Portal 6.0. Therefore, when Rational software needs to restore the portal from this file, this Enterprise JavaBeans™ (EJB™ technology will not get correctly deployed, so you may see console exceptions or odd behavior from the portal.

To fix this wps.ear file, replace the version of the wp.scheduler.ejb.jar file with the version of the file that you find in the WP_PROFILE/installedApps/wps.ear directory.

  • On Windows, WP_PROFILE is, by default, C:\ibm\WebSphere\profiles\wp_profile.
  • On Linux, it is WAS_HOME/profiles/wp_profile.

You can distinguish a prepared version of this JAR from an unprepared version by their file sizes. The prepared version of the JAR, which you find in the installedApps directory, should be 104 KB, and the unprepared version in the wps.ear file in installableApps is 44 KB.

Control caches

WebSphere Portal 6 contains many caching services that help to boost long-term performance when the server is being used in a production environment. In a development environment, long-term performance of the server is not likely to be a priority, and content will change more frequently, thus the caches can become a hindrance rather than a help.

You can control which caches are enabled by editing the CacheManagerService.properties file, which is contained within the WPS_HOME/shared/app/wp.services.properties.jar file. The first group of settings in this file are the global cache settings. (See Listing 3.)

Listing 3. Sample code listing at maximum width

 

                
#######################################################
######################
#
# Global settings. These can be overridden for individual caches.
# The evaluation order for parameters is:
#       1. Parameters given when requesting a cache (in the program code)
#       2. Parameters for the cache given in this files (see last part of file)
#       3. The following list of default values.
#
#######################################################
######################

# Is caching enabled? [specify true, yes (or false, no)]
#
# Default: true
cacheglobal.enabled=true

# Default cache size, in number of entries
#
# Default: 1000
cacheglobal.size=1000

# Cache sharing
# 
# Default: false
cacheglobal.shared=false

# Shall cacheinstances use java.lang.ref.SoftReferences to hold
# cacheentries or not. This can be turned on/off for each individual instance
#
# Default: false
cacheglobal.softref=false

 

  

These settings are used to specify the settings for caches that do not have their own entries in the file. Because, by default, all caches have entries, modifying this has no effect unless you delete the cache entries later on in the file. To enable or disable a cache, locate its cache entry and set the enabled value to false. Listing 4 shows an example.

Listing 4. Sample code listing at maximum width

 

                
cacheinstance.com.ibm.wps.ac.AccessControlUserContextCache.shared=true
cacheinstance.com.ibm.wps.ac.AccessControlUserContextCache.enabled=true
cacheinstance.com.ibm.wps.ac.AccessControlUserContextCache.lifetime=1200
cacheinstance.com.ibm.wps.ac.AccessControlUserContextCache.size=8000
cacheinstance.com.ibm.wps.ac.AccessControlUserContextCache.replacement=moderate
cacheinstance.com.ibm.wps.ac.AccessControlUserContextCache.admit-threshold=0

 

  

Please note that you should not disable the caches on servers that will be used in a production environment, because this will result in a performance penalty. You can find more information about configuring caches in the WebSphere Portal InfoCenter (see Resources).

 

 

 

 

 下载 

 

 

描述 文件名 下载尺寸 下载方式 本文的样式脚本
StartupPerformanceConfig.zip 5KB HTTP

 

  

如果你不喜欢阅读中文,或者我的译文有翻译不当让你理解不了,请参阅本文的英文原版

  • 大小: 6.2 KB
  • 大小: 11.1 KB
  • 大小: 19.5 KB
  • 大小: 20.9 KB
  • 大小: 17.8 KB
  • 大小: 9.6 KB
  • 大小: 5.4 KB
  • 大小: 22.4 KB
分享到:
评论

相关推荐

    Rational Application Developer 7 开发 Portal 安装配置

    总之,使用RAD 7和RSA 7开发配置WebSphere Portal V6.0是一项涉及多个环节的复杂任务,需要对软件开发、服务器管理、性能优化等多个领域有一定了解。通过以上步骤和注意事项,开发者可以有效地完成这一过程,从而在...

    ORACLE11g RAC RAD HAT6.0安装过程.doc

    ORACLE11G,在RAD HAT linux6.0上的安装过程,实操。

    RAD6.0注册补丁

    2. **性能优化**:补丁可能会对RAD 6.0的基础框架和组件进行优化,提高开发和运行时的效率,减少内存消耗和响应时间。 3. **兼容性提升**:随着新技术的不断涌现,补丁可能增强了RAD 6.0与新版本的JDK、数据库或...

    delphi 6.0安装文件

    Delphi 6.0是一款由Borland公司在2001年发布的集成开发环境(IDE),主要用于Windows平台上的快速应用程序开发(RAD)。它以其高效的编译器、直观的可视化设计界面和强大的VCL(Visual Component Library)框架而...

    IBM-RAD-V6

    在 IBM RAD V6 中,引入了一些新的术语,例如“Project Explorer”用于管理项目资源,“J2EE Module”用于表示 J2EE 组件等,这些术语有助于理解 RAD V6 的架构和使用方式。 **1.1.3 应用开发挑战** 随着技术的...

    Borland Delphi v6.0

    8. **第三方支持**:由于Delphi的流行,很多第三方供应商提供了额外的库和组件,扩展了Delphi的功能,这些资源在v6.0中也得到了广泛应用。 9. **代码生成和重构**:这个版本还增强了代码生成和重构工具,帮助开发者...

    Borland C++ Builderv6.0官方版

    关于【使用方法.txt】,这可能是Borland C++ Builder v6.0的用户指南,涵盖了如何安装软件、配置开发环境、编写和编译代码、调试程序以及如何利用VCL组件等基础和进阶操作。阅读这份文档可以帮助初学者快速上手,...

    Embarcadero RAD Studio Alexandria11.1下载和安装说明

    RAD Studio Alexandria11.1 ,详细安装...6、在RAD Studio平台选择上,选择您所需要的功能features to complete the installation以完成安装 7、首次以管理员身份运行RAD STUDIO 可选:如果要安装了InterBase,请选择IB

    COOL系列之Visual Basic 6.0+Visual C++ 6.0

    在信息技术领域,Visual Basic 6.0(VB6)和Visual C++ 6.0(VC++6)是两款非常重要的开发工具,它们分别代表了微软在面向对象编程和快速应用程序开发(RAD)领域的杰出成就。这两款工具各自拥有独特的优点,且在...

    c++builder 6.0 lite1.07

    这个版本虽然相对较老,但却因其稳定性和兼容性而受到一部分用户的喜爱,即便是在更新的操作系统如Windows 8.1上也能良好运行。它的主要目标是为开发者提供一个轻量级的工具,用于快速开发小型应用程序,特别是在...

    Embarcadero RAD Studio Sydney 10.4.2和安装说明

    6、在RAD Studio平台选择上,选择您所需要的功能features to complete the installation以完成安装 7、首次以管理员身份运行RAD STUDIO 可选:如果要安装了InterBase,请选择IB实例(IB Instance),单击“Patch IB&...

    安装RAD6.0-附件资源

    安装RAD6.0-附件资源

    RAD Studio 10.1 Update2 Berlin 架构师安装破解指导

    官方下载地址: ...【安装与破解说明!】 *********************************************************...10.在杀毒软件里,把你用来破解的 SHFolder.dll 文件(安装目录 bin 目录)添加到例外(白名单,信任列表)。 破解完成!

    PowerBuilder 6.0用户参考手册

    PowerBuilder 6.0在前一版本的基础上进行了许多改进,包括性能优化、新功能的添加和用户体验的提升。 2. **数据窗口组件**: 数据窗口是PowerBuilder的核心组件之一,它能方便地处理数据库查询、显示和编辑数据。...

    MSDN FOR VB 6.0

    【MSDN FOR VB 6.0】是微软公司为Visual Basic 6.0(简称VB 6.0)开发的一款全面的开发文档库,它包含了VB 6.0的完整技术文档、API参考、示例代码和教程。这款工具对于开发者来说极其重要,因为它提供了关于VB 6.0...

Global site tag (gtag.js) - Google Analytics