WebServer
1. 필수 조건
- 동시에 많은 사용자를 처리할 수 있어야 한다.(Connection 관리 기능 제공)
- 사용자의 폭주나 잘못된 요청에도 정상 동작하며 에러 페이지를 띄워줘야 한다.
- 모니터링 기능이 제공되어야 한다.
- Application과 결합 가능해야한다.(cgi, php)
2. 설치전 채크 사항
- webtob 기존 설치 여부
- Port 사용여부
- Shared Memory 사용여부
- Web관리자를 제공하는 Webtob Standard 버젼의 경우 JDK가 설치되어 있어야 한다.
3. WEBTOB 설치
1) 설치시에 WEBTOBDIR가 환경 변수에 들어간다.
2) License 적용
2.1) ncpu 실행
C:\TmaxSoft\WebtoB4\bin>ncpu
HOST NAME1: tmaxeduC18
HOST NAME2: TMAXEDUC18
Volume[C:\] type: NTFS
Volume[C:\] serial: 48F08B80
NCPUS: 2
IPADDRESS: 192.168.31.84
2.2) 라이센스 신청
- http://technet.tmax.co.kr/kr/index.do에서
다운로드 -> 라이센스 신청에서 작업
- C:\TmaxSoft\WebtoB4\config\sample.m 파일을 복사해서 http.m으로 변경한다.
2.3) config 파일 컴파일
C:\TmaxSoft\WebtoB4\bin>wscfl -i http.m
Current configuration:
Number of client handler(HTH) = 1
Supported maximum user per node = 975
Supported maximum user per handler = 975
CFL is done successfully for node(tmaxeduC18(tmaxeduC18))
- wsconfig 파일이 새로 생성된 것을 확인 가능
3) 4.1.3.0 이상 버젼은 trial license가 생겼음(5 user)
4. webtob 기동/중지
1) 기동
wsboot
2) 중지
wsdown
wsdown -i
3) wsboot 시 부팅 정보 확인
C:\Documents and Settings\edu>wsboot
WSBOOT for node(tmaxeduC18) is starting:
Welcome to WebtoB demo system: it will expire 2010/07/06
Today: 2010/05/06
WSBOOT: WSM is starting: 05/06/10 15:37:37
WSBOOT: HTL is starting: 05/06/10 15:37:37
WSBOOT: HTH is starting: 05/06/10 15:37:37
Current WebtoB Configuration:
Number of client handler(HTH) = 1
Supported maximum user per node = 975
Supported maximum user per handler = 975
WSBOOT: SVR(C:/TmaxSoft/WebtoB4/bin/htmls.exe) is starting: 05/06/10 15:37:37
WSBOOT: SVR(C:/TmaxSoft/WebtoB4/bin/htmls.exe) is starting: 05/06/10 15:37:37
WSBOOT: SVR(C:/TmaxSoft/WebtoB4/bin/cgis.exe) is starting: 05/06/10 15:37:37
WSBOOT: SVR(C:/TmaxSoft/WebtoB4/bin/cgis.exe) is starting: 05/06/10 15:37:38
WSBOOT: SVR(C:/TmaxSoft/WebtoB4/bin/ssis.exe) is starting: 05/06/10 15:37:38
WSBOOT: SVR(C:/TmaxSoft/WebtoB4/bin/ssis.exe) is starting: 05/06/10 15:37:38
License expire date: 2010/07/06 (61 days remained)
- Supported maximum user per handler = 975
한번에 붙을 수 있는 user 수
추가시 hth를 늘려주어야 한다.
5. webtob 관리 Tool
1) wsadmin/help
C:\Documents and Settings\edu>wsadmin
--- Welcome to WebtoB Admin (Type "quit" to leave) ---
$$1 tmaxeduC18 (wsadm): h
cacherefresh, cr: refresh cache properties
cliinfo, ci: show client properties
clilisten, cl: control client connection
config, cfg: show configuration settings
discon, ds: disconnect a client session by force
help, h: help
history, hist: show command history
logend, loge: end logging
logstart, logs: start logging
logsync: save log stord in buffer as a file
nodeset, ns: set this only in case of getting information
on specific node in a multi-node environment
nodeunset, nus: unset to stop getting information
on specific node in a muti-node environment
qpurge, qp: purge requests stack in queue
rebootsvr, rbs: replace server program
repeat, r: repeat command
restat: reset specific server process or
statistics information of all processes
resume, rs: resume suspended server process
set: dynamic configuration of settings
stat, st: process and service state statistics
suspend, sp: suspend active server process
svrinfo, si: show server properties
webtobinfo, wi: show WebtoB system properties
wsboot, boot: WebtoB boot
wsdown, down: WebtoB down
quit, q: exit wsadmin
!: repeat previous command
2) webtob 정보 및 license 정보(wi)
$$2 tmaxeduC18 (wsadm): wi
WebtoB Standard System Info: DEMO version 4.1 SP 2 Fix #0 20081105/WINDOWS_I386:
expiration date = 2010/7/6
maxuser = UNLIMITED,
node_count = 1,
svgrpcount = 3,
svr_count = 3, svc_alloc_count = 512
cousin_groupcount = 0, cousin_elemcount = 0
backup_groupcount = 0, backup_elemcount = 0
WebtoB All Node Info: node_count = 1:
--------------------------------------------------------------------------
no name nodeport racport shmkey shmsize hth
--------------------------------------------------------------------------
0 tmaxeduC18 7777 3333 54000 55944 1
- maxuser = UNLIMITED, 이지만 실재로 wsboot시 보이는 975 개수 이다.
3) 접속 웹 브라우저 확인(ci)
$$4 tmaxeduC18 (wsadm): ci
HTH 0: RDY
--------------------------------------------------------------------------------
no status count idle local_ipaddr:port remote_ipaddr:port spri user
--------------------------------------------------------------------------------
0 RDY 2 3 127.0.0.1:8081 127.0.0.1:25099 -1
--------------------------------------------------------------------------------
HTH RDY QED RUN ETC total
0 1 0 0 0 1
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
HTH RDY QED RUN ETC total
--------------------------------------------------------------------------------
0 1 0 0 0 1
--------------------------------------------------------------------------------
Total 1 0 0 0 1
--------------------------------------------------------------------------------
- BRUN 이 나온 경우 뭔가 문제가 있는 것이다.
4) 서버 정보 확인(si)
$$5 tmaxeduC18 (wsadm): si
--------------------------------------------------------------------------------
hth svrname (svri) status count cqcnt aqcnt qpcnt emcnt rscnt rbcnt
--------------------------------------------------------------------------------
0 html ( 0) RDY 0 0 0 0 0 0 0
0 cgi ( 1) RDY 0 0 0 0 0 0 0
0 ssi ( 2) RDY 0 0 0 0 0 0 0
- st -v 와 같은 명령이다.
- cqcount : 현재 queue에 쌓인 것이 많은 것
- aqcount : 누적 queue 건 수
- accesslog를 이용하여, 오래 걸린 것을 확인 한다.
- qpcount : queue를 날려서 초기화한 건수
- status가 NRDY 인 경우면 문제가 있는 경우이다.
JEUS가 NRDY 인 경우는 JEUS가 정상적으로 붙지 않은 경우이다.
5) 서버 상태 확인(st)
$$9 tmaxeduC18 (wsadm): st -v
--------------------------------------------------------------------------------
hth svrname (svri) status count cqcnt aqcnt qpcnt emcnt rscnt rbcnt
--------------------------------------------------------------------------------
0 html ( 0) RDY 0 0 0 0 0 0 0
0 cgi ( 1) RDY 0 0 0 0 0 0 0
0 ssi ( 2) RDY 0 0 0 0 0 0 0
- 서버별 상태 확인
$$10 tmaxeduC18 (wsadm): st -s
HTH 0: RDY
----------------------------------------------------------------------
svc_name count avg cq_count aq_count q_avg status
----------------------------------------------------------------------
shtml 0 0.0000 0 0 0.0000 RDY
cgi 0 0.0000 0 0 0.0000 RDY
htm 6 0.0000 0 0 0.0000 RDY
uri1 0 0.0000 0 0 0.0000 RDY
html 0 0.0000 0 0 0.0000 RDY
- 서비스별 확인
$$11 tmaxeduC18 (wsadm):st -p
HTH 0(3216): RDY
---------------------------------------------------------------------------
svr_name svgname spr_no(pid) status count avg(rt) clid svc
---------------------------------------------------------------------------
html htmlg 0( 3032) RDY 0 0.0000( 0) -1 -
html htmlg 1( 492) RDY 0 0.0000( 0) -1 -
cgi cgig 10( 1540) RDY 0 0.0000( 0) -1 -
cgi cgig 11( 1476) RDY 0 0.0000( 0) -1 -
ssi ssig 20( 2372) RDY 0 0.0000( 0) -1 -
ssi ssig 21( 320) RDY 0 0.0000( 0) -1 -
- 수행 시간이 나온다.
6) 직전 명령어 반복(!)
$$12 tmaxeduC18 (wsadm):!
st -p
HTH 0(3216): RDY
---------------------------------------------------------------------------
svr_name svgname spr_no(pid) status count avg(rt) clid svc
---------------------------------------------------------------------------
html htmlg 0( 3032) RDY 0 0.0000( 0) -1 -
html htmlg 1( 492) RDY 0 0.0000( 0) -1 -
cgi cgig 10( 1540) RDY 0 0.0000( 0) -1 -
cgi cgig 11( 1476) RDY 0 0.0000( 0) -1 -
ssi ssig 20( 2372) RDY 0 0.0000( 0) -1 -
ssi ssig 21( 320) RDY 0 0.0000( 0) -1 -
7) 명령어 반복 수행
r -i [interval] -k [횟수] [명령어]
$$26 tmaxeduC18 (wsadm):r -i 5 -k 2 st -v
8) 캐쉬에 저장된 내용 refrash 하기
cr -i
cr -h