ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • WEB/WAS Tmax WebtoB 설치하는 방법(2)
    Programming and Database/Web And Web Application Server 2024. 6. 26. 00:38
    728x90
    반응형

    출처: Tmax WebtoB 로고 이미지(위키원 이미지 사용)

    WEB/WAS Tmax WebtoB 설치하는 방법(2)

    [root@websvr webtoB]# ls -ltr
    -rwxrwxr-x 1 root root 313265090 Nov  8 13:21 WEBTOB5_0_SP0_Fix4_LinuxK2_6_x64.bin
    drwxrwxr-x 5 root root        60 Nov  8 13:38 UninstallerData
    drwxrwxr-x 2 root root         6 Nov  8 13:38 ap
    drwxrwxr-x 2 root root        26 Nov  8 13:38 cgi-bin
    drwxrwxr-x 2 root root        58 Nov  8 13:38 docs
    drwxrwxr-x 2 root root         6 Nov  8 13:38 log
    drwxrwxr-x 2 root root         6 Nov  8 13:38 path
    drwxrwxr-x 2 root root         6 Nov  8 13:38 svct
    drwxrwxr-x 2 root root        55 Nov  8 13:38 icons
    drwxrwxr-x 2 root root       310 Nov  8 13:39 bin
    drwxrwxr-x 3 root root       204 Nov  8 13:39 lib
    drwxrwxr-x 2 root root        63 Nov  8 13:39 license
    drwxrwxr-x 2 root root        35 Nov  8 13:39 ssl
    drwxrwxr-x 2 root root       184 Nov  8 13:39 usrinc
    drwxrwxr-x 7 root root       105 Nov  8 13:39 jeus
    drwxrwxr-x 2 root root        54 Nov  8 13:39 config
    ▶ WEBTOB5_0_SP0_Fix4_LinuxK2_6_x64.bin 설치 과정을 마쳤다면, /webtob 경로에 lib, bin, config 등 설정 파일들이 설치된 것을 확인할 수 있습니다.
    [root@websvr webtoB]# rm -R WEBTOB5_0_SP0_Fix4_LinuxK2_6_x64.bin
    rm: remove regular file 'WEBTOB5_0_SP0_Fix4_LinuxK2_6_x64.bin'? y
    ▶ 설치가 완료되었기 때문에 해당 패키지 파일을 삭제 합니다.
    [root@websvr config]# ls -ltr
    -rwxrwxr-x 1 root root 63160 Nov  8 13:38 manual.m -> 확인
    -rwxrwxr-x 1 root root 38879 Nov  8 13:38 mime.types
    -rwxrwxr-x 1 root root  1477 Nov  8 13:39 http.m
    ▶ /webtob/config 디렉터리로 이동 후 http.m 파일이 생성되었는지 확인합니다. 해당 파일이 webtob 환경에 대한 설정 내용들을 확인할 수 있습니다.
    [root@websvr config]# cat http.m  
    *DOMAIN
    webtob1 
    
    *NODE
    websvr WEBTOBDIR="/webtoB", 
                    SHMKEY = 54000,
                    DOCROOT="/webtoB/docs",
                    PORT = "8080", -> 포트 확인
                    HTH = 1,
                    #Group = "nobody",
                    #User = "nobody",
                    NODENAME = "$(NODENAME)",
                    ERRORDOCUMENT = "503",
                    #Options="IgnoreExpect100Continue",
                    LOGGING = "log1",
                    ERRORLOG = "log2",
                    SYSLOG = "syslog",
                    JSVPORT = 9900
    
    *HTH_THREAD
    hth_worker
                      SendfileThreads = 4,
                      AccessLogThread = Y,
                      #ReadBufSize=1048576, #1M
                      #HtmlsCompression="text/html",
                      #SendfileThreshold=32768,
                      WorkerThreads=8
    
    *SVRGROUP
    htmlg           SVRTYPE = HTML
    cgig            SVRTYPE = CGI
    ssig            SVRTYPE = SSI
    jsvg            SVRTYPE = JSV 
    
    *SERVER
    cgi             SVGNAME = cgig, MinProc = 2, MaxProc = 10, ASQCount = 1
    ssi             SVGNAME = ssig, MinProc = 2, MaxProc = 10, ASQCount = 1
    MyGroup         SVGNAME = jsvg, MinProc = 2, MaxProc = 10
    
    *URI
    uri1            Uri = "/cgi-bin/",   Svrtype = CGI
    uri2            Uri = "/examples/",  SvrType=JSV, SvrName=MyGroup
    
    *ALIAS
    alias1          URI = "/cgi-bin/", RealPath = "/webtoB/cgi-bin/"
    
    *LOGGING
    syslog          Format = "SYSLOG", FileName = "/webtoB/log/system.log_%M%%D%%Y%",
                            Option = "sync"
    log1            Format = "DEFAULT", FileName = "/webtoB/log/access.log_%M%%D%%Y%",
                            Option = "sync"
    log2            Format = "ERROR", FileName = "/webtoB/log/error.log_%M%%D%%Y%", 
                            Option = "sync"
    
    *ERRORDOCUMENT
    503                     status = 503,
                            url = "/503.html"
    
    *EXT
    jsp             Mimetype ="application/jsp",  Svrtype=JSV,  SvrName=MyGroup
    ▶ /webtob/config 파일을 확인하게 되면 해당 웹서비스 8080 포트를 통해 통신하며, svrgroup(html, cgi, ssi, jsv) 등에 대한 내용을 확인할 수 있습니다. (http.m 설정의 각각의 절에 대한 내용은 별도 포스팅 예정)
    [root@websvr /]# cat /etc/profile
    #webtoB
    export WEBTOBDIR=/webtoB
    export PATH="${WEBTOBDIR}/bin:${PATH}"
    export LD_LIBRARY_PATH="${WEBTOBDIR}/bin:${LD_LIBRARY_PATH}"
    ▶ http.m 파일을 확인하였다면, web server를 사용할 계정의  profile에 환경 변수를 설정합니다. 

    ▣ 설정파일

    export WEBTOBDIR=/webtoB
    export PATH="${WEBTOBDIR}/bin:${PATH}" export LD_LIBRARY_PATH="${WEBTOBDIR}/bin:${LD_LIBRARY_PATH}"
    [root@websvr /]# wscfl -i http.m
    bash: wscfl: command not found...
    
    [root@websvr /]# reboot
    ▶ webtob 인증서 확인을 위한  wscfl -i http.m 명령어 수행 시 작동하지 않아 서버 재부팅을 진행합니다. http.m 환경 파일 수정 시 Complie을 진행해야 합니다.  (최초 설치 후 재기동 필요) 
    [root@websvr config]# wscfl -i http.m
    [CFL-05045] This license does not allow more than 5 users. MaxUser is changed to 5. Check the license.
    
    Current configuration:
            Number of client handler(HTH) = 1
            Supported maximum user per node = 5
            Supported maximum user per handler = 5
    
    Successfully created the configuration file (/webtoB/config/wsconfig) for node websvr.
    The host name of the running machine is websvr.
    ▶ wscfl -i http.m를 통해 환경설정에 대한 내용을 Complie 완료 후 현재 설정된 내용들을 확인합니다.

    ▣ 현재 설정 내용
    Current configuration: Number of client handler(HTH) = 1
    Supported maximum user per node = 5
    Supported maximum user per handler = 5
    [root@websvr config]# ls -ltr            
    -rwxrwxr-x 1 root root  63160 Nov  8 13:38 manual.m
    -rwxrwxr-x 1 root root  38879 Nov  8 13:38 mime.types
    -rwxrwxr-x 1 root root   1477 Nov  8 13:39 http.m
    -rw-r--r-- 1 root root 523933 Nov  8 14:31 wsconfig -> 생성
    
    [root@websvr config]# source /etc/profile
    ▶ wsconfig 생성이 됐다면 환경변수를 적용을 위해 source /etc/profile 실행합니다.
    [root@websvr config]# wsboot
    
    Booting WebtoB on node (websvr) 
    Starting WSM at Wed Nov  8 14:33:02 2023
    Starting HTL at Wed Nov  8 14:33:02 2023
    Starting HTH at Wed Nov  8 14:33:02 2023
             Current WebtoB Configuration:
                    Number of client handlers (HTH) = 1
                    Supported maximum user per node = 5
                    Supported maximum user per handler = 5
    Starting SVR(cgis) at Wed Nov  8 14:33:02 2023
    Starting SVR(cgis) at Wed Nov  8 14:33:02 2023
    Starting SVR(ssis) at Wed Nov  8 14:33:02 2023
    Starting SVR(ssis) at Wed Nov  8 14:33:02 2023
    ▶ wsboot 명령어를 통해서 webtob 서비스를 기동 합니다.
    [root@websvr config]# systemctl status firewalld
    * firewalld.service - firewalld - dynamic firewall daemon
       Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
       Active: inactive (dead)
         Docs: man:firewalld(1)
    ▶ 웹서비스를 위한 방화벽 설정은 운영환경에서는 필수지만, 테스트 환경에서는 방화벽 중지를 하겠습니다. 
    [root@websvr config]# curl -i 192.168.100.2:8080
    HTTP/1.1 200 OK
    Date: Wed, 08 Nov 2023 05:38:51 GMT
    ETag: "0-2ae-654b10e3"
    Last-Modified: Wed, 08 Nov 2023 04:38:59 GMT
    Accept-Ranges: bytes
    Content-Length: 686
    Content-Type: text/html
    
    <HTML>
    <HEAD>
            <TITLE>Test Page for WebtoB Installation on Web Site</TITLE>
    </HEAD>
    
    <!-- Background white, links blue (unvisited), navy (visited), red (active) -->
    <BODY
      BGCOLOR="#FFFFFF"
      TEXT="#000000"
      LINK="#0000FF"
      VLINK="#000080"
      ALINK="#FF0000"
    >
    
    <BR><BR>
    <H1 ALIGN="CENTER">
            WebtoB Web Server has been successfully <BR> Installed on this website!
    </H1>
    
    <P ALIGN="CENTER">
            If you can see this page, then the owner of this domain has <BR> successfully
            installed the <A HREF="http://www.tmax.co.kr">WebtoB Web Server</A>
            software.  
    </P>
    
    <DIV ALIGN="CENTER">
            <A HREF="http://www.tmax.co.kr"><IMG SRC="top2-1.gif" BORDER=0></A>
    </DIV>
    
    </BODY>
    </HTML>
    ▶ webtob 서비스가 기동 되었다면, 웹 페이지 통신확인을 위해  curl -i 192.168.100.2:8080 명령어를 실행합니다.

    ▣ 웹페이지 테스트 성공

    HTTP/1.1 200 OK
    Date: Wed, 08 Nov 2023 05:38:51 GMT
    ETag: "0-2ae-654b10e3"
    Last-Modified: Wed, 08 Nov 2023 04:38:59 GMT
    Accept-Ranges: bytes
    Content-Length: 686
    Content-Type: text/html
    [root@websvr config]# ps -ef | egrep "htl|hth|wsm"
    root      5153     1  0 14:33 pts/0    00:00:00 wsm -l 0x2 -I webtob1_5152 -b 5152
    root      5154     1  0 14:33 pts/0    00:00:00 htl -l 0x2 -I webtob1_5152 -b 5152
    root      5157     1  0 14:33 pts/0    00:00:00 hth -l 0x2 -I webtob1_5152 -b 5152
    root      7274  4399  0 14:36 pts/0    00:00:00 grep -E --color=auto htl|hth|wsm
    ▶ webtob 프로세스 기동 후 데몬을 확인합니다.

    ▣ WEBTOB 프로세스
     - HTL : 클라이언트와 WebtoB 간의 연결을 관리하는 Listener 프로세스

    - HTH  : 클라이언트 핸들러로 실질적으로 클라이언트와 서버의 업무 처리 프로세스 사이를 중계하는 프로세스
     - WSM 전체적인 WebtoB 시스템 운용 프로세스로써 HTL/HTH 프로세스 및 모든 서버 시스템의 운영 정보를 관리
    [root@websvr config]# wsadmin
    --- Welcome to WebtoB Admin (Type "quit" to leave) --- 
    
    $$1 websvr (wsadm) [2023-11-08T14:35:05]: si
    
    ------------------------------------------------------------------------------------------
     hth   svrname (svri)   status      reqs     count cqcnt    aqcnt qpcnt emcnt rscnt rbcnt
    ------------------------------------------------------------------------------------------
       0  cgi        (  0)   RDY           0         0     0        0     0     0     0     0
       0  ssi        (  1)   RDY           0         0     0        0     0     0     0     0
       0  MyGroup    (  2)   NRDY          0         0     0        0     0     0     0     0
    ▶ wsadmin  명령어를 통해서 webtob 관리자 콘솔로 접속합니다. si 명령어를 통해서 서비스 정보를 확인합니다.
    $$2 websvr (wsadm) [2023-11-08T14:35:30]: wi
    
    License: TRIAL Enterprise edition
    Version=WebtoB 5.0 SP 0 Fix #4 Linux-K2.6_x64 FD16384 B230.2.0 epoll 2020/10/29
    
             expiration date = 3000/12/31 
             maxuser = 5, 
             node_count = 1, 
             svgrpcount = 4, 
             svr_count = 3, svc_alloc_count = 512,
             start_time = 1699421582.000000 
    
    WebtoB All Node Info: node_count = 1: 
    --------------------------------------------------------------------------
      no   name     nodeport  racport  shmkey  shmsize0 shmsize1 shmsize2 hth 
    --------------------------------------------------------------------------
       0   websvr    7777     3333     54000    257712    50368   150856   1
    ----------------------------------------------------------
    ▶ wi 명령어를 통해서 webtob 정보를 확인합니다.
    $$1 websvr (wsadm) [2023-11-08T14:43:50]: st -v
    
    ------------------------------------------------------------------------------------------
     hth   svrname (svri)   status      reqs     count cqcnt    aqcnt qpcnt emcnt rscnt rbcnt
    ------------------------------------------------------------------------------------------
       0  cgi        (  0)   RDY           0         0     0        0     0     0     0     0
       0  ssi        (  1)   RDY           0         0     0        0     0     0     0     0
       0  MyGroup    (  2)   NRDY          0         0     0        0     0     0     0     0
    ▶ st -v 명령어를 통해서 서버 프로세스별 상태를 체크할 수 있습니다.
    $$2 websvr (wsadm) [2023-11-08T14:43:53]: 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 
       jsp                 0   0.0000        0         0  0.0000   NRDY 
       @cgi                0   0.0000        0         0  0.0000   RDY 
       uri1                0   0.0000        0         0  0.0000   RDY 
       uri2                0   0.0000        0         0  0.0000   NRDY 
       @html               1   0.0000        0         0  0.0000   RDY
    st -s 명령어를 통해서 서비스 및 프로세스 통계 내용 및 상태를 체크 할 수 있습니다.
    [root@websvr config]# wsdown
    Do you really want to shut down WebtoB? (y : n): y
    
    WSDOWN for node(websvr) is starting: 
            WSDOWN: SERVER(cgi:1) downed: Wed Nov  8 14:37:12 2023
            WSDOWN: SERVER(ssi:11) downed: Wed Nov  8 14:37:12 2023
            WSDOWN: SERVER(cgi:0) downed: Wed Nov  8 14:37:12 2023
            WSDOWN: SERVER(ssi:10) downed: Wed Nov  8 14:37:12 2023
            WSDOWN: HTL downed: Wed Nov  8 14:37:12 2023
            WSDOWN: HTH downed: Wed Nov  8 14:37:12 2023
            WSDOWN: WSM downed: Wed Nov  8 14:37:12 2023
            WSDOWN: WebtoB is down
    ▶ webtob 프로세스 중지를 위해  wsdown 명령어를 수행합니다.
    [root@websvr config]# ps -ef | egrep "htl|hth|wsm"
    root      7552  4399  0 14:37 pts/0    00:00:00 grep -E --color=auto htl|hth|wsm
    ▶  webtob 프로세스 종료 후 데몬 중지가 되었는지 확인합니다.

     

    PS. 포스팅의 내용은 제 기준으로 작성한 것이기 때문에 참고해서 보시면 감사하겠습니다.

    포스팅 과정의 오류 및 오타 그리고 궁금한 점에 대해서는 댓글 남겨주세요.

     

    2024.06.25 - [Programming and Database/Web And Web Application Server] - WEB/WAS Tmax WebtoB 설치하는 방법(1)

     

    WEB/WAS Tmax WebtoB 설치하는 방법(1)

    ▣ WEB/WAS Tmax WebtoB 설치하는 방법(1)[root@websvr ~]# java -versionopenjdk version "1.8.0_262"OpenJDK Runtime Environment (build 1.8.0_262-b10)OpenJDK 64-Bit Server VM (build 25.262-b10, mixed mode)▶ Tmax사의 WEB서버 설치를 위해 현재

    pinetreeday.tistory.com

    728x90
    반응형

    댓글

Designed by Tistory.