`
bravewu
  • 浏览: 48262 次
  • 性别: 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
分享到:
评论

相关推荐

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

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

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

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

    RAD6.0注册补丁

    RAD6.0注册补丁,RAD全称为 rational application devoploer为IBM的一款javaee开发工具,主要配合自家服务器WAS使用

    IBM-RAD-V6

    IBM RAD V6开发红皮书。 还有类似的很多,大家觉得有用请留言,将上传。

    安装RAD6.0-附件资源

    安装RAD6.0-附件资源

    RAD Studio 12 安装激活说明及常见问题

    RAD Studio 12 安装激活说明及常见问题

    Embarcadero RAD Studio Sydney 10.4.2和安装说明

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

    RAD Studio 10.1 Berlin 安装参考文档.rar

    RAD Studio 10.1 Berlin 安装配置教程,中文版,附下载地址,破解程序及说明。

    RadStudio10.4.2视频安装教程.exe

    RadStudio10.4.2视频安装教程,小编亲自安装录制,相关工具会放在其他资源,大家自行下载,谢谢!

    RAD Studio 10.2.3 Tokyo 东京 RAD10.2 Release 3 架构师安装破解指导

    RAD Studio 10.2.3 Tokyo 东京 RAD10.2 Release 3 架构师安装破解指导 包含破解注册工具

    VB6.0简体中文版.rar

    特别提示:安装此软件的时候最好退出360杀毒软件(包括360安全卫士,电脑管家等,如果电脑上有这些软件的话),因为现如今的360杀毒软件直接会对VB6.0软件误报,这样的话就可能 会在安装过程中被误报阻止而导致安装...

    RADStudio10.4KeyPatch.zip

    ISO 6.0GB http://altd.embarcadero.com/download/radstudio/10.4/radstudio_10_4_99797b.iso Web installer 136MB http://altd.embarcadero.com/download/radstudio/10.4/radstudio_10_4_esd_99797b.exe

    RADStudio10.4KeyPatch.rar

    ISO 6.0GB http://altd.embarcadero.com/download/radstudio/10.4/radstudio_10_4_99797b.iso Web installer 136MB http://altd.embarcadero.com/download/radstudio/10.4/radstudio_10_4_esd_99797b.exe

    TMS Component Pack 8.3.4.0 D7-RAD10.2 Tokyo BAT安装版+亲自安装测试

    TMS Component Pack 8.3.4.0 D7-RAD10.2 Tokyo BAT安装版+亲自安装测试,一个相当不错的Delphi控件,我在XE10.2.3 Tokyo 下成功安装

    Embarcadero RAD Studio XE2、XE3安装器

    RAD Studio XE2、XE3全自动安装器,直接安装ISO文件,无需虚拟光驱,含XE2破解程序(XE3需另行激活),已在windows 7下安装成功,保证可用。 在windows 7下使用,需要以系统管理员权限运行,否则无法安装。 本安装...

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

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

    RAD Studio 10.3.1 KEYPATCH

    Embarcadero选择在2月14...10.3.1在定义上是属于质量更新版, 这是说10.3.1最重要的功能是修正臭虫, 10.3.1修正了超过150个臭虫, 附件为KEYPatch ,已测试安装,本补丁仅用于研究学习,非商业使用 官方下载地址(任选 ): ...

    Borland-C++-Builder6.0简易实例教程.pdf

    Borland C++Bilder 6.0 是 Interprise(Borland)公司推出的基于 C++ 语言的 快速应用程序开发(Rapid Application Development, RAD)工具,它是最先进 的开发应用程序的组件思想和面向对象的高效语言 C++融合的...

Global site tag (gtag.js) - Google Analytics