티스토리 뷰

반응형

2016년 09월 기준.

 

Installing the Loadbalancer Plug-In

Note - The Loadbalancer Plug-In is only available to customers who are using Oracle GlassFish Server 3.1. The plug-in is not available for GlassFish Server Open Source Edition.

// open source edition은 지원안함.

Load Balancing With the Apache mod_jk or mod_proxy_ajp Module

A common load balancing configuration for GlassFish Server 4.0 is to use the Apache HTTP Server as the web server front-end, and the Apache mod_jk or mod_proxy_ajp module as the connector between the web server and GlassFish Server. See Configuring GlassFish Server with Apache HTTP Server and mod_jk and Configuring GlassFish Server with Apache HTTP Server and mod_proxy_ajp for more information.

// mod_jk 사용

asadmin --user admin --host localhost --port 4848 create-network-listener --protocol http-listener-1 --listenerport 8009 --jkenabled true jk-connector

asadmin --user admin --host localhost --port 4848 set configs.config.server-config.network-config.network-listeners.network-listener.jk-connector.jk-enabled=true

// 여기까지만 설정해도 된다.

asadmin --user admin --host localhost --port 4848 set configs.config.server-config.network-config.network-listeners.network-listener.jk-connector.jk-configuration-file=/usr/local/httpd/conf/workers.properties

asadmin --user admin --host localhost --port 4848 create-http-listener --listeneraddress 0.0.0.0 --listenerport 8009 --defaultvs server jk-connector

// http-listener는 network-listener 하위 개념

asadmin --user admin --host localhost --port 4848 create-jvm-options -Dcom.sun.enterprise.web.connector.enableJK.propertyFile=/usr/local/glassfish/glassfish/config/glassfish-jk.properties

// jvm은 옵션. config는 workers.properties or glassfish-jk.properties

// 리스너 삭제시

bin/asadmin --user admin --host localhost --port 4848 delete-http-listener jk-connector

asadmin stop-domain

asadmin start-domain

반응형
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
TAG
more
«   2026/02   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
글 보관함