IBM Liberty core 정리

liberty core install settings


#command line
imcl install com.ibm.websphere.liberty.v85_8.5.16002.20160526_2338 com.ibm.websphere.liberty.IBMJAVA.v80_8.0.3020.20161124_1304 -repositories  "D:\Liberty\16.0.0.2-WS-LIBERTY-CORE,D:\work_file\was_install\v8.5.5\SDK\8.0.3.20" -installationDirectory F:\app\IBM\wlpcore\AppServer -acceptLicense -sP
* 주의 IM 패키지 설치시 GUI의 경우에는 온라인설치만 가능해 보이며, 설치 이후에는 IM 업데이트 롤백 가능.

서버 생성 
[wlp_home]/bin
server.bat create test01

서버 기동 
server start [server_name]

서버 server.xml 주로 사용하는 예제
<?xml version="1.0" encoding="UTF-8"?><server description="jsp">

   <!-- Enable features -->
   <featureManager>
#admin console 사용을 위한 모듈
      <feature>adminCenter-1.0</feature>
      <feature>websocket-1.1</feature>
      <feature>jsp-2.2</feature>
      <feature>jdbc-4.0</feature>
      <feature>localConnector-1.0</feature>
      <feature>restConnector-1.0</feature>
   </featureManager>
   
   <variable name="defaultHostName" value="localhost"/>
   <!-- To access this server from a remote client add a host attribute to the following element, e.g. host="*" -->
   <httpEndpoint id="defaultHttpEndpoint" host="*" httpPort="9060" httpsPort="9043" />
   <tcpOptions soReuseAddr="true" />
   <pluginConfiguration webserverPort="80" webserverSecurePort="443"/>
   
   <quickStartSecurity userName="admin" userPassword="admin"/>
   <keyStore id="defaultKeyStore" password="Liberty"/>
   <!-- Automatically expand WAR files and EAR files -->
   <applicationManager autoExpand="true"/>
   
   <dataSource id="WorklightDS" jndiName="jdbc/WorklightDS">
        <jdbcDriver libraryRef="OracleLib"/>
        <properties.oracle driverType="thin" databaseName="WRKLGHT" serverName="localhost" portNumber="1521" user="WORKLIGHT" password="{xor}KDAtNDM2ODcr"/>
    </dataSource>
   

   <remoteFileAccess>
         <writeDir>${server.config.dir}</writeDir>
   </remoteFileAccess>
   
    <logging maxFiles="5" consoleLogLevel="INFO"/>
</server>

# Use a specific Java binary
#JAVA_HOME=
 JAVA_HOME=c:\Java

WLP_SKIP_MAXPERMSIZE=true
LOG_DIR=F:\app\IBM\wlpcore\AppServer\usr\logs\test02

default.http.port=9080
default.https.port=9443
com.ibm.ws.logging.log.directory="F:\app\IBM\wlpcore\AppServer\usr\logs/test02"
com.ibm.ws.logging.max.file.size=1
com.ibm.ws.logging.max.files=3
com.ibm.ws.logging.console.log.level=OFF
com.ibm.ws.logging.message.file.name=loggingMessages.log

# Set the maximum heap size to 1024m.
-Xmx1024m
# Set a system property.
-Dcom.ibm.example.system.property=ExampleValue
# Enable verbose output for class loading.
-verbose:class
# Enable verbose garbage collection.
-verbose:gc
# Specify an alternate verbose garbage collection log on IBM Java Virtual Machines only.
-Xverbosegclog:verbosegc.log
# Specify additional verbose garbage collection options on HotSpot Java Virtual Machines only.
-Xloggc:verbosegc.log
-XX:+PrintGCDetails
-XX:+PrintGCTimeStamps
-XX:+PrintHeapAtGC

<server description="new server">
<featureManager>
#로컬
<feature>localConnector-1.0</feature>
#원격
<feature>restConnector-1.0</feature>
<feature>jsp-2.2</feature>
</featureManager>
<httpEndpoint id="defaultHttpEndpoint" host="*" httpPort="9080">
<tcpOptions soReuseAddr="true" />
</httpEndpoint>
#플러그인 정보
<pluginConfiguration webserverPort="80" webserverSecurePort="443"/></server>




샘플 애플리케이션이 WAR EAR 로 되어 있는 경우에도 동일하게 애플리케이션을 배포할 수 있으며 wlp/dropins WAR EAR 을 옮겨두기만 해도 추가적인 server.xml 설정 없이 자동으로 애플리케이션을 인식해서 구동시킬 수 있습니다.adminCenter-1.0 모듈 활성화시 사용 가능
https://www.ibm.com/support/knowledgecenter/en/SSD28V_9.0.0/com.ibm.websphere.wlp.core.doc/ae/twlp_ui_setup.html


링크 참조

Liberty WAS 이기 때문에 당연히 실행환경으로 Java 가 필요합니다. IBM Java, Oracle Java, Open JDK 모두 지원이 가능하며 사전에 JAVA_HOME 패스 설정만을 해두시면 됩니다.


*주의 경우에 Context Root 는 별도로 변경하지 않는한 WAR EAR 파일의 이름이 자동으로 Context Root 가 됩니다


JAVA_HOME 지정
Log_DIR 지정
F:\app\IBM\wlpcore\AppServer\usr\servers\test02]$ vi server.env

Log 설정
F:\app\IBM\wlpcore\AppServer\usr\servers\test02]$ bootstrap.properties

jvm options 설정
$ {wlp.install.dir} /usr/shared/jvm.options
$ {server.config.dir} /configDropins/defaults/jvm.options
$ {server.config.dir} /jvm.options
$ {server.config.dir} /configDropins/overrides/jvm.options
적용 위치
${wlp.install.dir}/etc/jvm.option

플러그인 생성 관련
server.xml 파일 수정

pluginUtility 명령어로 생성 및 머지 가능
해당 명령어는 패치 16.0.0.4 부터 가능



#로컬
pluginUtility generate –server=myServer --targetpath=./pluginFiles/plugin-cfg.xml
#원격
pluginUtility generate –server=userName:mypassword@testHost:9443 --targetpath=./pluginFiles/plugin-cfg.xml

#병합
pluginUtility merge --sourcepath=../usr/plugin --targetpath=../usr/plugin



httpd.conf에 플러그인 정보 입력
Windows의 경우: LoadModule was_ap22_module "path\to\mod_was_ap22_http.dll"
         WebSpherePluginConfig "path\to\plugin-cfg.xml"
기타 분산 시스템의 경우: LoadModule was_ap22_module "path\to\mod_was_ap22_http.so"
              WebSpherePluginConfig "path\to\plugin-cfg.xml" 


0 Comments:

댓글 쓰기

이 블로그 검색

Popular Posts

WEB&&WAS

OS

Reviews