2011년 6월 30일 목요일

[HTTP] IBM HTTP SERVER v7.0 silent install sample

IBM HTTP SERVER v7.0 silent mode로 설치할 경우
해당 예제에서는 Plugin을 별도로 설치한다.

responsefile.txt 을 아래와 같이 수정

#
# License Acceptance
#
-OPT silentInstallLicenseAcceptance="false"   -OPT silentInstallLicenseAcceptance="true"
-OPT allowNonRootSilentInstall=false

# Operating System Prerequisite Checking
#
# -OPT disableOSPrereqChecking="true" -OPT disableOSPrereqChecking="true"

# IBM Http Server Install Location
#
# *******************************************
-OPT installLocation="/usr/IBM/HTTPServer"     -OPT installLocation="C:\IBM\HTTPServer"
# *******************************************


-OPT httpPort="80"
-OPT adminPort="8008"


# *****************************************************
# Set this to "true" to create a user ID and password
# to authenticate to the IBM HTTP administration server
# using the WebSphere Application Server administrative
# console.  The newly-created user ID and password is
# encrypted and stored in the conf/admin.passwd file.
# You can create additional user IDs after the
# installation by using the bin/htpasswd utility.
# *****************************************************
-OPT createAdminAuth="false"      -OPT createAdminAuth="true"

# *****************************************************
# If createAdminAuth is "true", use these
# options to set the user ID and password
# to be created.
# *****************************************************
-OPT adminAuthUser="wsdemo"
-OPT adminAuthPassword="wsdemo"
-OPT adminAuthPasswordConfirm="wsdemo"

# *****************************************************************************
# Set createAdminUserGroup to "true" to create a user ID and group used
# to setup the IBM HTTP Administration Server on Linux and UNIX operating
# systems.  If the user ID or Group previously exists, set createAdminUserGroup
# to "false".
# *****************************************************************************
-OPT createAdminUserGroup=true   -OPT createAdminUserGroup=false


# ******************************************
# WINDOWS ONLY
# *******************************************
# Begin Installing Services
-OPT installHttpService="true"
-OPT installAdminService="true"


################################################################################
#
# Installation of the WebSphere Plugin for the IBM HTTP Server
#

-OPT installPlugin="true"        -OPT installPlugin="false" 
#### 플러그인을 별도로 설치할 경우

2011년 6월 29일 수요일

[WebSphere] WAS v7 Base edition - Silent install sample

WAS 설치 이미지에서 다음처럼 실행한다.
      # install -silent -options responsefile.base.txt

silent mode로 설치할 때 responsefile.base.txt 파일 설정 예제이다.

# License Acceptance
-OPT silentInstallLicenseAcceptance="false" -OPT silentInstallLicenseAcceptance="true"

# Non-Root Installation Limitations
# -OPT allowNonRootSilentInstall="true" -OPT allowNonRootSilentInstall="true" (주석해제)

# Prerequisite Checking
#  -OPT disableOSPrereqChecking="true" -OPT disableOSPrereqChecking="true"

# Installation Type
-OPT installType="installNew"
-OPT profileType="standAlone"

# Administrative Security
-OPT PROF_enableAdminSecurity="true" -OPT PROF_enableAdminSecurity="false"

# Installation Location
# Windows Default Non-Administrator Install Location:
# -OPT installLocation="C:\IBM\WebSphere\AppServer" -OPT installLocation="C:\IBM\WebSphere\BaseServer"


# Profile Settings
## Port Value Assignment and Validation
# -OPT PROF_defaultPorts="true"  -OPT PROF_defaultPorts="true"
### 설정되는 port를 Default로 설정하는 경우 true로 설정한다.
이외 default 설정

2011년 6월 23일 목요일

[Plugin] Trace 설정 방법


HTTP Server와 WAS 사이에 문제 파악을 위해 그 중간단계인 Plugin에 대해 Trace 를 설정할 수 있다.
해당 HTTP Server에 구성된 Plugin-cfg.xml 파일에서 아래 빨간색으로 표시된 부분을 Trace로 수정하여 저장한 후
RefreshInterval 시간 후 달라진 LOG 내용을 확인할 수 있다.

Plug-in 파일 log level 수정
 ........................ skip ...............................
<Config ASDisableNagle="false" AcceptAllContent="false" AppServerPortPreference="HostHeader" ChunkedResponse="false" FIPSEnable="false" IISDisableNagle="false" IISPluginPriority="High" IgnoreDNSFailures="false" RefreshInterval="60" ResponseChunkSize="64" VHostMatchingCompat="false">
   <Log LogLevel="Error" Name="/usr/IBM/WebSphere/Plugins/logs/http_plugin.log"/>
         <Log LogLevel="Trace" Name="/usr/IBM/WebSphere/Plugins/logs/http_plugin.log"/>

IBM WebSphere Application Server Feature Pack for XML Demo 1 (1/2)

2011년 6월 22일 수요일

[WebSphere] 한글 설정

WebSphere 에서 한글을 사용하기 위해서는 다음과 같이 설정을 한다.

위치:서버 > 서버 유형 > WebSphere Application Server > {server name} > 서버인프라 >> 프로세스 정의 > 추가특성 >> JVM > 추가특성 >> 사용자 정의

 이름
설명
EUC-KR  
 
EUC-KR


그외  UTF-8 설정이 필요한 경우 EUC-KR 대신 설정.

IBM WebSphere Application Server V7: Scalability and High Availability

2011년 6월 21일 화요일

IBM java dump 환경 설정


JAVA 기반의 WAS에 대해서 Dump를 생성할때 환경 설정이 가능하다.
아래 Link는 AIX 기반으로 설정되어 있으나 해당 Parameter는 다른 OS도 동일하다.


해당 설정이 OS 환경 설정으로 지정되나
WebSphere에서는 각 application server의 환경 변수 부분에서 별도로 설정이 가능하다.

Application Server V7 Administration

2011년 6월 20일 월요일

IBM WebSphere Application Server V7 Installation and Administration

[WebSphere] JDK Source Level

WebSphere Application Server는 해당 버젼이 하위 스펙을 지원하는데, 기본적 JDK 13 (v6.x), JDK 15 (v7)으로 설정되어 있다.
EnterpriseApplication에서 사용하고자 하는 JDK Source Level을 지정하여 사용할 수 있다.
아래 내용 참고하기 바란다.

jdkSourceLevel

This JSP engine parameter was introduced in WebSphere Application Server version 6.1 to support JDK 5. Use this parameter instead of the compileWithAssert parameter, although compile WithAssert still works in version 6.1.
The default value for this parameter is 16. This parameter requires regeneration of Java source. The following are jdkSourceLevel paramater values:
  • 13 - This value will disable all new language features of JDK 1.4, JDK 5.0 and JDK 6.0.

  • 14 - This value will enable the use of the assertion facility and will disable all new language features of JDK 5.0 and JDK 6.0.

  • 15 - This value will enable the use of the assertion facility and will disable all new language features of JDK 6.0.

  • 16 - This value will enable the use of the new features of JDK 6.0. - (v7 fixpack 7.0.0.11)


Open the WEB-INF/ibm-web-ext.xmi file.
JSP engine configuration parameters are stored in a web module's configuration directory or in a web modules's binaries directory in the WEB-INF/ibm-web-ext.xmi file. Open the WEB-INF/ibm-web-ext.xmi file from:
The configuration directory, as in the following example:

{WAS_ROOT}/profiles/profilename/config/cells/cellname/applications/enterpriseappname/ deployments/deployedname/webmodulename

The binaries directory if an application was deployed into WebSphere Application Server with the flag "Use Binary Configuration" set to true. An example of a binaries directory is: {WAS_ROOT}/profiles/profilename/installedApps/nodename/EnterpriseAppName/WebModuleName/
 지원 구성:  IBM® 확장 및 바인딩 파일의 경우, 파일 이름의 .xmi 또는 .xml 확장자는 Java EE 5 이전의 응용프로그램이나 모듈을 사용하는지 또는 Java™ EE 5 이상의 응용프로그램이나 모듈을 사용하는지 여부에 따라 파일 이름 확장자가 .xmi 또는 .xml 로 달라집니다. IBM 확장 또는 바인딩 파일은 ibm-*-ext.xmi 또는 ibm-*-bnd.xmi 형식의 이름을 갖습니다. 여기서, *는 확장 또는 바인딩 파일의 유형(예: app, application, ejb-jar 또는 web)을 나타냅니다. 다음과 같은 조건이 적용됩니다.
버전 5 이전의 Java EE를 사용하는 응용프로그램이나 모듈은 파일 확장자가 .xmi여야 합니다.
버전 5 이상의 Java EE를 사용하는 응용프로그램이나 모듈은 파일 확장자가 .xml이어야 합니다.
그러나 Java EE 5 이상의 모듈은 Java EE 5 이하의 파일이 포함된 응용프로그램 내에 존재할 수 있으며 확장자가 .xmi인 파일 이름을 사용할 수 있습니다.
ibm-webservices-ext.xmi, ibm-webservices-bnd.xmi, ibm-webservicesclient-bnd.xmi, ibm-webservicesclient-ext.xmi, 및 ibm-portlet-ext.xmi 파일에는 계속 .xmi 파일 확장자가 사용됩니다.

Example
The following is a sample of the WEB-INF/ibm-web-ext.xmi file. The lines in bold text are JSP engine configuration parameters.
<?xml version="1.0" encoding="UTF-8"?>
<webappext:WebAppExtension xmi:version="2.0" xmlns:xmi=http://www.omg.org/XMI
   xmlns:webappext="webappext.xmi" xmlns:webapplication="webapplication.xmi" xmi:id="WebAppExtension_1"  
   reloadInterval="9" reloadingEnabled="true" defaultErrorPage="error.jsp" additionalClassPath=""
   fileServingEnabled="true" directoryBrowsingEnabled="false" serveServletsByClassnameEnabled="true"
   autoRequestEncoding="true" autoResponseEncoding="false"
   <webApp href="WEB-INF/web.xml#WebApp_1"/>
   <jspAttributes xmi:id="JSPAttribute_1" name="useThreadTagPool" value="true"/>
   <jspAttributes xmi:id="JSPAttribute_2" name="verbose" value="false"/>
   <jspAttributes xmi:id="JSPAttribute_3" name="deprecation" value="false"/>
   <jspAttributes xmi:id="JSPAttribute_4" name="reloadEnabled" value="true"/>
   <jspAttributes xmi:id="JSPAttribute_5" name="reloadInterval" value="5"/>
   <jspAttributes xmi:id="JSPAttribute_6" name="keepgenerated" value="true"/>
   <jspAttributes xmi:id="JSPAttribute_7" name="jdkSourceLevel" value="15"/>
   <!--<jspAttributes xmi:id="JSPAttribute_8" name="trackDependencies" value="true"/> -->
  
</webappext:WebAppExtension>

The following is a sample of the WEB-INF/ibm-web-ext.xml file. The lines in bold text are JSP engine configuration parameters.
<?xml version="1.0" encoding="UTF-8"?>
<web-ext
   xmlns="
http://websphere.ibm.com/xml/ns/javaee"
   xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="
http://websphere.ibm.com/xml/ns/javaee http://websphere.ibm.com/xml/ns/javaee/ibm-web-ext_1_0.xsd"
      version="1.0">
   <default-error-page uri="error.jsp"/>
   <jsp-attribute name="useThreadTagPool" value="true" />
   <jsp-attribute name="verbose" value="false" />
   <jsp-attribute name="deprecation" value="false" />
   <jsp-attribute name="reloadEnabled" value="true" />
   <jsp-attribute name="reloadInterval" value="5" />
   <jsp-attribute name="keepgenerated"  value="true" />
   <jsp-attribute name="trackDependencies" value="true" />
   <jsp-attribute name="jdkSourceLevel" value="15"/>
   <reload-interval value="9"/>
   <auto-encode-requests value="true"/>
   <auto-encode-responses value="false"/>
   <enable-directory-browsing value="false"/>
   <enable-file-serving value="false"/>
   <pre-compile-jsps value="false"/>
   <enable-reloading value="true"/>
   <enable-serving-servlets-by-class-name value="true"/>
</web-ext>

2011년 6월 18일 토요일

Exception occurs during recovery of Oracle database transactions


많이 알려진 문제이나 그래도 심심치 않게 접하게 되는 문제이다.
Oracle 사용시 XAER_RMERR 내용과 함께 xa_recover 관련 메세지를 확인할 수 있다.
아래 공식적인 내용 및 관련 URL이다.


원인
트랜잭션 복구를 수행하는 데 필요한 특수 사용 권한을 가지려면 Oracle에 WebSphere Application Server 트랜잭션 서비스와 같은 서비스가 있어야 합니다.
솔루션
SYS라는 사용자로서 Oracle 서버에서 다음 명령을 실행하십시오.
grant select on pending_trans$ to public;
grant select on dba_2pc_pending to public;
grant select on dba_pending_transactions to public;
grant execute on dbms_system to <user>;
User는 XA 데이터 소스에 트랜잭션 복구를 수행할 수 있는 권한이 부여된 Application Server의 사용자 ID입니다. 트랜잭션 복구를 수행할 수 있는 권한이 부여된 사용자 ID가 없는 경우, Application Server는 데이터소스의 로그인 별명을 사용자 ID로 사용합니다.
이 문제점은 Oracle 버그: 3979190에 언급되어 있습니다. 이전 명령을 실행하면 문제점이 해결됩니다


2011년 6월 17일 금요일

[WebSphere] Configuring simple load balancing across multiple application server profiles


WebSphere Application Server v7 Base edition에 대해 Configuring simple load balancing across multiple application server를 공식적으로 지원한다.
(뭐.. v6.x부터 plugin-cfg.xml 파일 수정할 줄 아시는 능력자들께서 암묵적으로 행했던 내용이겠으나 공식적으로 라이센스와 자동구성 스크립트를 지원한다고 하네요.)


WebSphere Application Server V7 now offers web server load balancing and failover for up to 5 licensed application servers and a new merge tool for simplifying load balancing and failover configurations. This is provided by way of a free fix pack available to all base version WebSphere Application Server V7 customers.

Delivered in the WebSphere Application Server Fix Pack 13 (7.0.0.13) onwards are the new merge tool and an update to the WebSphere Application Server V7 License Agreement:
MergeTool - A multi-server auto configuration tool and documentation which helps you easily set up HTTP load balancing and failover to multiple WebSphere Application Server base servers.

For more details, see Configuring simple load balancing across multiple application server profiles



2011년 6월 16일 목요일

[WebSphere] 윈도우 서비스에 등록하기.


윈도우에 설치하다보면 윈도우 서비스를 이용해야만 해당 계정에서 log out하여도 서비스가 종료되지 않는다. ㅜ.,ㅡ^


WASService.exe -add service_name
                           -serverName  server_name
                           -profilePath server_profile_directory
                          [-wasHome  app_server_root]
                          [-configRoot configuration_repository_directory]
                          [-startArgs additional_start_arguments]
                          [-stopArgs additional_stop_arguments]
                          [-userid user_id -password password]
                          [-logFile service_log_file]
                          [-logRoot server_log_directory]
                          [-restart true | false]
                          [-startType automatic | manual | disabled]

WASService.exe -remove service_name




httpd -k install -n <new_service_name> -f <path_to_new_configuration_file>

httpd -k uninstall -n <service_name>

2011년 6월 14일 화요일

[WebSphere] Trace log for Query


문서 자체는 Lotus 관련된 문서에서 나온 내용이나
WebSphere 기반의 trace log 설정 관련된 내용이라 link해본다.
전에 실제로 요구 사항이 있었을데 유용한 내용이었다.

DB connection 및 실행되는 Query 관련된 trace 설정이며
WAS의 Connection Pool을 사용할 경우에만 trace 가능하다.

2011년 6월 11일 토요일

WebSphere v6.0.2 on AIX 7.x


WebSphere Application Server v6.0.2 이상 AIX 7 에 설치 가능하다.
(언제 AIX 7 나왔는지...)

자세한 사항은 아래 URL에서 확인하세요.

2011년 6월 9일 목요일

IBM Application Migration Tool(Jues)


IBM에서는 주요 WAS에 대해 WebSphere에 최적화(?)되도록 Migration Tool을 제공하고 있다.
글로벌하게 사용되는 Weblogic이나 Jboss 같은 제품에 대해서는 제공되어 왔으나
한국 시장에서만 사용되는  JEUS는 해당사항이 없었습니다.
올해 초에 JEUS 대상의 Migration Tool version이 추가되었습니다.
자세한 기술내용은 아래 Link 참고하세요.

2011년 6월 8일 수요일

[WebSphere] HTTP와 WAS 소스 분리


HTTP 서버에서 Document-Root의 위치와 WebSphere Application Server에서 구성된 Application Source 위치는  분리했다고 생각하고 이 후 설정할 내용이다.

RAD로 Enterprise application을 사용할 경우
EnterpriseApplicationDD 파일 설정에서 ibm-web-ext.xmi에서 fileServingEnabled="false" 로 설정한다.

ibm-web-ext.xml인 경우
             <enable-file-serving value="false"/>

Enterprise application WebSphere에 설치한 후 웹서버의 plugin 생성 및 전파를 하면 다음과 같은 형식으로 application에 대해 plugin-cfg.xml이 구성된다.

 <UriGroup Name="default_host_server1_was70ndNode01_Cluster_URIs">
  <Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/snoop/*" />
  <Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/hello" />
  <Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/hitcount" />
  <Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="*.jsp" />
  <Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="*.jsv" />
  <Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="*.jsw" />
  <Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/j_security_check" />
  <Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/ibm_security_logout" />
  <Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/servlet/*" />
 </UriGroup>

위와 같이 구성되면 정적 컨텐츠(html 및 이미지)http serve에서 처리되고 동적 컨테츠(jsp servlet) WAS에서 각각 실행된다.
이후 http Douments root Source path를 별도로 구성하여 관리할 수 있다.


만약 eclipse로 설정할 경우

WebSphere *.ear 또는 *.war 파일을 설치할 경우 ibm-web-bnd.xmi(xml) ibm-web-ext.xmi(xml) 파일이 자동으로 생성된다.

해당 파일 위치
/WebSphere/AppServer/profiles/AppSrv01/config/cells/{Cell_Name}/applications/{Application_Name}.ear/deployments/{Application_Name}/{Application_Name}.war/WEB-INF

해당 파일 중 ibm-web-ext.xmi(xml) fileServingEnabled="false"로 수정하면 위와 같이 설정가능하며 해당 구성파일을 해당 application 파일 source copy하면 *.ear 또는 *.war 단위로 재설치하더라도 설정이 유지된다.

 

2011년 6월 7일 화요일

[WebSphere] Tuning WebSphere Application Server V7 for performance (developerworks)


developerworks에 WebSphere Application Server v7에 대해서 tuning 관련하여 올라온 글이다.
여러 경로를 통해 소개되었지만, 기본적으로 WebSphere에서 설정할 내용으로 좋은 글인듯..

2011년 6월 4일 토요일

[HTTP] IBM HTTP 서버에 SSL 구성


HTTP Server에 SSL 구성하는 방법은 잘 아시시라 생각했는데,
의외로 모르는 이가 있어서 겸사 참고 사이트 링크 걸어봅니다.

HTTPS 또는 보안 통신을 구성하는 경우는
http server에 공인인증키를 구성하는 방법과
WAS 서버에 보안관련 모듈을 설정하는 2가지 방법이 있습니다.
후자의 경우는 보안업체 가이드가 많으니 생략 ^^


IBM HTTP SSL Server Questions and Answers

== httpd.conf ==


LoadModule  ibm_ssl_module   modules/mod_ibm_ssl.so

Listen 443

<VirtualHost *:443>
 ServerName www.mycompany2.com
 SSLEnable
 SSLClientAuth None
  <Directory "c:/Program Files/IBM HTTP Server/htdocs2">
   Options Indexes
   AllowOverride None
   order allow,deny
   allow from all
  </Directory>
 DocumentRoot "c:/program files/ibm http server/htdocs2"
 DirectoryIndex index2.html
</VirtualHost>

SSLDisable
KeyFile "c:/program files/ibm http server/key.kdb"
SSLV2Timeout 100
SSLV3Timeout 1000


2011년 6월 3일 금요일

IBM, 6월 17일 웹스피어 8 발표


좀 전에 봤던 뉴스이고, IBM BP camp에서도 IBM WAS v8 관련해서 간단하게 소개 받았다.
새로운 버젼이 나오면 '언제나 또 공부해야 겠구나' 라는 생각을 가지게 된다. :)

2011년 6월 2일 목요일

[WebSphere] 한글설정 DBCS(Double Byte Character Set)


요즘 작업시에는 설정할 일이 많이 없어졌으나 한글때문에 기본적으로 설정했던 내용이다.
기본적으로 Application Source에서 한글처리는 되어야 한다!

WebSphere Application Server의 JVM Custom property에 설정했던..


-Dfile.encoding=EUC-KR
-Dclient.encoding.override=EUC-KR

아니면 application에서 encoding 설정을 해서 사용하던가...
  -- RAD 에서 한글 설정



<jsp-config>
<jsp-property-group>
<description>
</description>
<display-name>jsp</display-name>
<url-pattern>*.jsp</url-pattern>
<el-ignored>false</el-ignored>
<page-encoding>EUC-KR</page-encoding>
<scripting-invalid>false</scripting-invalid>
<is-xml>false</is-xml>
</jsp-property-group>
</jsp-config>