티스토리 뷰
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
'Study' 카테고리의 다른 글
| Glassfish(글래스피시) domain(도메인) 추가 (0) | 2023.01.01 |
|---|---|
| Java(자바) JSP Oracle(오라클) Date 연동 (0) | 2022.12.30 |
| XML(eXtensible Markup Language, 엑스엠엘) 관련 (0) | 2022.12.30 |
| Java(자바) 관련 (0) | 2022.12.29 |
| Java(자바) Terms(용어) 관련 (0) | 2022.12.29 |