WAS
12 03 2020
1. 아파치 설정값 확인 ./apachectl -V 환경 Linux apache 2.2.19 MPM은 Prefork 방식 참고 : MPM prefork 방식은 프로세스:쓰레드 = 1:1 방식 Worker 방식은 프로세스:쓰레드 = 1:n 방식 아파치 컴파일된 셋팅값 조회 # /usr/local/apache/bin/apachectl -V 설정 Httpd.conf 에서 /conf/extra/httpd-mpm.conf 을 Include 처리 (리마크 제외) 하고 Httpd-mpm.conf 파일을 열고 지시자 변경
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 29 30 31
|
[root@web1 bin]# ./apachectl -V Server version: Apache/2.4.37 (Unix) Server built: Dec 20 2018 17:37:42 Server's Module Magic Number: 20120211:83 Server loaded: APR 1.6.5, APR-UTIL 1.6.1 Compiled using: APR 1.6.5, APR-UTIL 1.6.1 Architecture: 64-bit Server MPM: <strong> event</strong> threaded: yes (fixed thread count) forked: yes (variable process count) Server compiled with.... -D APR_HAS_SENDFILE -D APR_HAS_MMAP -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled) -D APR_USE_SYSVSEM_SERIALIZE -D APR_USE_PTHREAD_SERIALIZE -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT -D APR_HAS_OTHER_CHILD -D AP_HAVE_RELIABLE_PIPED_LOGS -D DYNAMIC_MODULE_LIMIT=256 -D HTTPD_ROOT="/opt/web/apache2" -D SUEXEC_BIN="/opt/web/apache2/bin/suexec" -D DEFAULT_PIDLOG="logs/httpd.pid" -D DEFAULT_SCOREBOARD="logs/apache_runtime_status" -D DEFAULT_ERRORLOG="logs/error_log" -D AP_TYPES_CONFIG_FILE="conf/mime.types" -D SERVER_CONFIG_FILE="conf/httpd.conf" |
위의 MPM방법은 event 방식이다 여기에 맞는 설정값을 변경해야 한다. MaxRequestWorkers 을 변경한다.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
#<IfModule mpm_event_module> # StartServers 3 # MinSpareThreads 75 # MaxSpareThreads 250 # ThreadsPerChild 25 # MaxRequestWorkers 400 # MaxConnectionsPerChild 0 #</IfModule> <IfModule mpm_event_module> StartServers 8 ServerLimit 16 MinSpareThreads 64 MaxSpareThreads 256 ThreadsPerChild 64 <strong>MaxRequestWorkers 1024</strong> MaxConnectionsPerChild 0 </IfModule> |
2.Tomcat 의 경우 Server.xml에 maxThreads를 확인해서 숫자를 늘린다.
7 01 2016
Haeng Ho Kang | Server, WAS, Web |
1)httpd.conf 설정 Include conf.d/mod_jk.conf # Virtual hosts Include conf/extra/httpd-vhosts.conf 2)/apache2/conf.d/ 안의파일 mod_jk.conf, uriworkermap.properties, workers.properties (1) mod_jk.conf
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 29 30 31 32 33 34 35 36 37 38 39
|
# Load mod_jk m odule # Specify the filename of the mod_jk lib LoadModule jk_module modules/mod_jk.so # Where to find workers.properties JkWorkersFile conf.d/workers.properties # Where to put jk logs #JkLogFile logs/mod_jk.log JkLogFile "| /web/apache2/bin/rotatelogs /web/apache2/logs/mod_jk.log.%Y%m%d 86400" # Set the jk log level [debug/error/info] #JkLogLevel debug #JkLogLevel info JkLogLevel error # Select the log form at JkLogStampFormat "[%a %b %d %H:%M:%S %Y]" # JkOptions indicates to send SSK KEY SIZE #JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories JkOptions +ForwardKeySize +ForwardURICompat +ForwardURICompatUnparsed -ForwardDirectories # JkRequestLogFormat JkRequestLogFormat "%w %V %T" # Mount your applications # The default setting only sends Java application data to mod_jk. # Use the commented-out line to send all URLs through mod_jk. # JkMount /* loadbalancer #JkMount /application/* loadbalancer #JkMountFile conf.d/uriworkermap.properties # Add sharedmemory. # This directive is present with 1.2.10 and # later versions of mod_jk, and is needed for # for load balancing to work properly JkShmFile logs/jk.shm |
(2)uriworkermap.properties
|
#/jkstatus=jkstatus #/jmx-console=loadbalancer #/jmx-console/*=loadbalancer #!/*.gif=loadbalancer #!/*.jpg=loadbalancer /=loadbalancer /*=loadbalancer |
(3)workers.properties
|
#worker.list=loadbalancer,jkstatus worker.list=aaa1,bbb1 worker.template.type=ajp13 worker.template.ping_mode=A worker.aaa1.reference=worker.template worker.aaa1.host=123.123.123.123 worker.aaa1.port=8109 worker.bbb1.reference=worker.template worker.bbb1.host=123.123.123.123 worker.bbb1.port=8209 |
3)httpd-vhosts.conf ServerAdmin webmaster@dummy-host.example.com DocumentRoot “/web/apache2/htdocs/aaa1” ServerName aaa1.nuriware.com ServerAlias aaa1.nuriware.com ErrorLog “| /web/apache2/bin/rotatelogs /web/apache2/logs/lms-error.log.%Y%m%d 86400” CustomLog “| /web/apache2/bin/rotatelogs /web/apache2/logs/lms-access.log.%Y%m%d 86400” common SetEnvIf Request_URI “/webimg/*” no-jk JkMount / aaa1 JkMount /* aaa1 ServerAdmin webmaster@dummy-host.example.com DocumentRoot “/web/apache2/htdocs/bbb1” […]
14 07 2015
Haeng Ho Kang | OS, Server, WAS, Linux/Unix |
vi tomcat.sh 상단에 description ,processname등을 입력한다.
|
#!/bin/bash ### BEGIN INIT INFO <span id="line-2" class="anchor"></span># Provides: scriptname <span id="line-3" class="anchor"></span># Required-Start: $remote_fs $syslog <span id="line-4" class="anchor"></span># Required-Stop: $remote_fs $syslog <span id="line-5" class="anchor"></span># Default-Start: 2 3 4 5 <span id="line-6" class="anchor"></span># Default-Stop: 0 1 6 <span id="line-7" class="anchor"></span># Short-Description: Start daemon at boot time <span id="line-8" class="anchor"></span># Description: Enable service provided by daemon. <span id="line-9" class="anchor"></span>### END INIT INFO |
링크를 걸어준다.
|
ln -s /app/dev/xxx/tomcat.sh /etc/init.d/Tomcat |
권한변경
|
chmod -R 755 /etc/init.d/Tomcat |
서비스등록
|
sudo update-rc.d Tomcat defaults |
이상 service Tomcat start TroubleShooting 서비스해지 sudo update-rc.d -f Tomcat remove warnging missing LSB information
2 07 2015
Haeng Ho Kang | Server, WAS |
WEB-INF/jboss-web.xml
|
<?xml version="1.0" encoding="UTF-8"?> <jboss-web> <context-root>/</context-root> <symbolic-linking-enabled>true</symbolic-linking-enabled> <resource-ref> <res-ref-name>jdbc/xxdb</res-ref-name> <jndi-name>java:/xxdb</jndi-name> </resource-ref> </jboss-web> |
26 06 2015
Haeng Ho Kang | OS, Server, WAS, Linux/Unix |
설정 standalone-ha.xml수정 하단부분 만 수정하고 다른것은 기본으로 default-stack=”tcp” 로 변경 구성 170.30.7.200에 node 1 [tcp jgroups port 7700], node 2 [tcp jgroups port 7800] 170.30.7.201에 node 1 [tcp jgroups port 7700], node 2 [tcp jgroups port 7800] 이렇게 서비스하려고 할때 구성 이렇게 되면 총4개의 initial_hosts가 된고 내개의 아이피[포트]를 적어 주어야 한다. 그리고 protocal 설정중 MPING은 제거한다. […]
26 06 2015
Haeng Ho Kang | Server, WAS, Web |
#telnet localhost 포트 GET / 하면 반응이 옵니다.
27 09 2014
Haeng Ho Kang | Server, WAS |
http://www.slideshare.net/opennaru/khan-report-20140225204934jbosseapdomain-31644064
JBoss
22 07 2014
Haeng Ho Kang | Server, WAS |
이전작업 아래의 링크를 통해 node1,node2가 session clustering 되는 것을 알수 있었는데 Apache Httpd 2.2.x + JBoss EAP 6.x + Tomcat Connector 1.2.x Session Clustering 이번에는 node1,node2가 하나의 사이트 node3,node4가 하나의 사이트가 되도록 해보자. JBoss 설정 cp node01 node03 cd node03 vi jboss-env.conf
|
JBOSS_PORT_OFFSET=300 (node01= 100, node02=200) JBOSS_NODE_NAME=node03 JBOSS_MULTICAST_ADDR=230.0.0.5 (node01,node02는 230.0.0.4) |
|
vi ../node03/configuration/standalone-ha.xml |
|
<socket-binding name="jgroups-mping" port="0" multicast-address="${jboss.default.multicast.address:230.0.0.4}" multicast-port="45701"/> <socket-binding name="jgroups-tcp" port="7601"/> <socket-binding name="jgroups-tcp-fd" port="57601"/> <socket-binding name="jgroups-udp" port="55201" multicast-address="${jboss.default.multicast.address:230.0.0.4}" multicast-port="45689"/> |
위의 node01,node02의 설정파일보다 숫자 1씩 증가시킨다. 이번에는 node04를 복사 […]
11 07 2014
Haeng Ho Kang | Server, WAS |
Apache HTTPD Server 설치 JBoss EAP 6.x 서버 설치 및 단일서버 포트오프셋 Session Clustering 구성 Apache Tomcat Connectors 다운로드 및 설치 wget http://www.apache.org/dist/tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.40-src.tar.gz tar xvzf tomcat-connectors-1.2.40-src.tar.gz cd tomcat-connectors-1.2.40-src/native ./configure –with-apxs=/app/httpd/bin/apxs make && make install 이렇게 하면 /app/httpd/modules밑에 mod_jk.so파일이 생성 설치완료 mod_jk 설정 vi /app/httpd/conf/extra/httpd-modjk.conf
|
# HTTPD Web Server and Apache Tomcat(ajp) Connector # the configuration of the server. # # Required modules: mod_jk (for the ajp handler), # Load Module jk_module <IfModule !mod_jk.c> LoadModule jk_module modules/mod_jk.so </IfModule> # jk_module Global configuration of the server <IfModule mod_jk.c> JkLogFile "|/app/httpd/bin/rotatelogs /app/httpd/logs/mod-jk.log.%Y%m%d 86400" JkLogLevel error JkOptions +ForwardKeySize +ForwardURICompatUnparsed -ForwardDirectories |
JkLogStampFormat “[%Y %a %b %d %H:%M:%S]” JKRequestLogFormat […]
3 07 2014
Haeng Ho Kang | Server, WAS |
JBoss 다운 http://www.jboss.org/jbossas/downloads JBoss EAP. 버젼을 다운 받던지 아니며 JBoss AS 를 다운받던지 JBoss EAP 6과 JBoss AS 7 은 동일버젼이다.단 서비스를 하려면 JBoss EAP 버젼으로 해야 한다.(AS 버젼은 단지 테스팅만 마친 버젼) 나의 다운 버젼 jboss-eap-6.2.0.zip zip파일을 다운받아 서버저장소(임의의)에 압축을 해제한다. eclipse에 JBoss tools 설치 eclipsed의 메뉴에서 [Help > Install New Software]를 선택 Add버튼을 클릭하고 […]