[Windows][Linux]

WASService 명령

WASService 명령행 도구를 사용하여 Linux 및 Windows 운영 체제에서 제품 Java™ 프로세스에 대한 서비스를 작성할 수 있습니다.

WebSphere® Application Server Java 프로세스에 대한 서비스를 작성할 수 있습니다. 잠재적인 서비스에는 다음의 서버 프로세스가 포함됩니다.
  • 애플리케이션 서버 노드에서의 기본 server1 프로세스
  • 애플리케이션 서버 노드에서 작성하는 애플리케이션 서버 프로세스
  • 배치 관리자 셀의 일부인 애플리케이션 서버 노드의 nodeagent 프로세스
  • 배치 관리자 프로세스, dmgr
[Windows]참고: 연합 또는 관리 노드의 일부인 애플리케이션 서버를 Windows 서비스로 추가하지 마십시오. 노드 에이전트를 사용하여 연합 노드를 관리하십시오.
유의: WASService 명령의 대안으로, WASService 명령을 제공하고 가능한 구성 오류를 감소시키는 WASServiceHelper 유틸리티를 사용할 수 있습니다. 자세한 정보는 WASServiceHelper를 사용하여 Windows 서비스를 작성하는 방법에 대한 문서를 참조하십시오.
[Windows]Microsoft Windows 운영 체제에서 이 기능을 설정하고 실행하려면 사용자가 관리자 그룹에 속해 있어야 하며 다음과 같은 고급 사용자 권한을 가지고 있어야 합니다.
  • 운영 체제의 일부로 역할 수행
  • 서비스로 로그온

명령 파일 위치

[Linux]wasservice.sh 명령 파일은 app_server_root\bin 디렉토리에 있습니다.

[Windows]WASService.exe 명령 파일은 app_server_root\bin 디렉토리에 있습니다.

명령 구문

기존 서비스를 시작하기 위한 명령 구문

명령 구문은 다음과 같습니다.

[Linux]
wasservice.sh -start service_name [optional startServer.bat parameters] 
[Windows]
WASService.exe -start service_name [optional startServer.bat parameters] 

서비스 작성 또는 기존 서비스 갱신을 위한 명령 구문

명령 구문은 다음과 같습니다.

[Linux]
wasservice.sh -add service_name
   -serverName  server_name
   -profilePath server_profile_directory
   [-wasHome  app_server_root]
   [-startArgs additional_start_arguments]
   [-stopArgs additional_stop_arguments]
   [-userid user_id -password password]
        
[Linux]참고: WebSphere Application Server 버전 7.0 이상의 경우, wasservice.sh를 지정할 때 userid에서 "@" 부호를 접두부로 사용하지 마십시오. wasservice.sh의 userid에서 "@" 부호를 접두부로 사용하는 것은 WebSphere Application Server 버전 6.1에만 적용됩니다.

wasservice.sh-userid @myuser와 함께 지정하는 것은 버전 7.0 이상에서 사용해서는 안됩니다.

[Windows]
WASService.exe -add service_name
   -serverName  server_name
   -profilePath server_profile_directory
   [-wasHome  app_server_root]
   [-configRoot configuration_repository_directory]
   [-startArgs additional_start_arguments]
   [-stopArgs additional_stop_arguments]
   [-userid user_id -password password]
   [-logFile service_log_file]
   [-logRoot server_log_directory]
   [-restart true | false]
   		[-startType automatic | manual | disabled]
      
참고: -logroot 매개변수가 선택사항이기는 하지만 이 선택적 매개변수를 포함시키는 것이 좋습니다. 이 선택적 매개변수를 지정하지 않는 경우 애플리케이션 서버가 -logroot 매개변수를 사용하여 서비스를 작성하려고 함을 알려주는 오류가 이벤트 로그에 표시될 수 있습니다.

서비스를 삭제하기 위한 명령 구문

명령 구문은 다음과 같습니다.

[Linux]
wasservice.sh -remove service_name
[Windows]
WASService.exe -remove service_name

서비스를 중지하기 위한 명령 구문

명령 구문은 다음과 같습니다.

[Linux]
wasservice.sh -stop service_name [optional stopServer.bat parameters]
[Windows]
WASService.exe -stop service_name [optional stopServer.bat parameters]

서비스 상태를 검색하기 위한 명령 구문

명령 구문은 다음과 같습니다.

[Linux]
wasservice.sh -status service_name
[Windows]
WASService.exe -status service_name

필수 매개변수

이 명령에 필수인 매개변수는 다음과 같습니다.

-profilePath server_profile_directory
이 옵션을 사용하여 서버 프로세스를 정의하는 프로파일의 디렉토리 경로를 지정하십시오.
-serverName server_name
이 옵션을 사용하여 서비스가 제어하는 서버를 식별하십시오.

선택적 매개변수

다음 매개변수는 이 명령에 선택적입니다.

-add service_name
이 옵션을 사용하여 이름이 service_name인 서비스를 작성하거나 기존 서비스를 업데이트하십시오. 구문은 두 가지 경우에 모두 동일합니다.
-configRoot configuration_repository_directory (Windows 전용)
이 옵션을 사용하여 WebSphere Application Server 제품 설치 루트 디렉토리의 구성 디렉토리를 식별하십시오.
-encodeParams service_name (Windows 전용)
이 옵션을 사용하여 레지스트리 편집으로 인수가 판별될 수 없도록 -startArgs 및 -stopArgs 인코드를 서비스에서 강제 실행하십시오. 인수 없이 명령행에 -encodeParams를 추가하여 -add 매개변수로 서비스를 작성할 때 이 매개변수를 사용하거나
[Windows]기존 서비스의 매개변수를 인코드하십시오.
WASService -encodeParams service_name
-logFile service_log_file (Windows 전용)
이 옵션을 사용하여 WASService 명령이 해당 활동을 레코드하는 데 사용하는 로그 파일을 식별하십시오.
유의: 서비스 로그 파일은 고유 경로가 있는 완전한 이름으로 지정해야 합니다. 시스템에 여러 인스턴스가 있는 경우에는 이렇게 한정하지 않으면 예기치 않은 결과가 발생할 수 있으며 WASService가 초기화 완료 시점을 판별하지 못하게 됩니다.
-logRoot server_log_directory (Windows 전용)
이 옵션을 사용하여 프로파일의 서버 로그 디렉토리를 식별하십시오. WASService 명령은 서버가 실행 중인지 판별하기 위해 server_name.pid 파일을 찾습니다.
-remove service_name
이 옵션을 사용하여 지정된 서비스를 삭제하십시오.
-restart true | false (Windows 전용)
이 매개변수를 사용하여 서비스가 실패하면 자동으로 기존 서비스를 다시 시작할지 여부를 지정하십시오. 값을 false로 설정하면, 자동으로 기존 서비스가 다시 시작되지 않습니다. 기본적으로 다시 시작 작동은 true로 설정되며 이렇게 하면 서비스가 실패하는 경우 기존 서비스를 자동으로 다시 시작할 수 있습니다.
-start service_name [optional startServer.bat parameters]
이 옵션을 사용하여 기존 서비스를 시작하십시오.
-startArgs additional_start_arguments
이 옵션을 사용하여 추가 매개변수를 식별하십시오.
-startType automatic | manual | disabled (Windows 전용)
이 옵션을 사용하여 새 서비스의 시작 유형을 정의하십시오. 자동 시작 유형은 시스템이 시작되거나 서비스가 처음으로 호출될 때 자동으로 시작됩니다. 운영 체제가 로드하고 사용 가능하게 하기 전에 수동 서비스를 시작해야 합니다. 시작 유형을 변경하기 전에는 사용 불가능한 서비스를 시작할 수 없습니다. 기본적으로 이 매개변수에 대한 값은 manual로 설정됩니다.
-status service_name
이 옵션을 사용하여 서비스가 실행 중인지 또는 중지되었는지 여부를 포함한 서비스의 현재 상태를 리턴하십시오.
-stop service_name [optional stopServer.bat parameters]
이 옵션을 사용하여 지정된 서비스를 중지하십시오.
-stopArgs additional_stop_arguments
이 옵션을 사용하여 추가 매개변수를 지정하십시오.
-userid user_id -password password
이 옵션을 사용하여 Windows 서비스가 실행될 권한이 있는 사용자 ID 및 비밀번호를 식별하십시오.
-wasHome app_server_root
이 옵션을 사용하여 제품의 설치 루트 디렉토리를 식별하십시오.
참고: 다음 매개변수는 "Windows 전용" 매개변수입니다.
  • -configRoot
  • -encodeParams
  • -logFile
  • -logRoot
  • -restart
  • -startType
Linux에서 예외를 로그하고 처리하는 대체 방법은 시스템의 표준 sysvinit를 사용하여 일반 startServer.sh 스크립트를 실행하는 것입니다.
경고:
인식되지 않는 매개변수는 무시됩니다.

마법사에 의해 작성되는 서비스의 기본 이름

프로파일 관리 도구이 작성할 수 있는 서비스의 이름은 다음과 같습니다.
배치 관리자
IBM WebSphere Application Server V9.x - node_name_of_the_deployment_manager_node
애플리케이션 서버
IBM WebSphere Application Server V9.x - node_name_of_the_server1_node
사용자 정의 프로파일
노드를 연합하고 애플리케이션 서버를 작성한 후, IBM WebSphere Application Server V9.x - node_name_of_the_managed_node라는 서비스를 작성할 수 있습니다.

사용자 정의 프로파일을 작성한 후에는 노드에서 노드 에이전트 서버를 작성하기 위해 노드를 연합해야 합니다. 배치 관리자의 관리 콘솔을 사용하여 노드에서 애플리케이션 서버 프로세스를 작성할 수도 있습니다. 노드 에이전트 서버 프로세스에 대한 Windows 서비스를 작성할 수 있습니다.

노드 에이전트 서버는 배치 관리자 셀에 애플리케이션 서버 노드를 추가한 후에도 작성됩니다. 뒤에 설명된 대로 노드 에이전트 서버 프로세스에 대한 서비스를 작성할 수 있습니다.

서비스 패널 보기

서비스를 보려면 제어판을 열고 관리 도구 > 서비스를 클릭하십시오. 서비스를 선택하여 이에 대한 정보를 보십시오. 서비스를 마우스 오른쪽 단추로 클릭하고 특성을 클릭하십시오. 네 개의 탭이 정보 및 기능을 제공합니다. 예를 들어, 일반 탭에서 설치 유형 필드를 선택하여 설치 유형을 변경할 수 있습니다.

[Windows]

배치 관리자 서비스 작성

다음 예에서는 dmgr 프로세스를 시작하는 IBM® WebSphere Application Server V9.x - name_of_the_deployment_manager_service라는 서비스를 작성합니다.

WASService -add name_of_the_deployment_manager_service
   -servername deployment_manager_server_name
   -profilePath profile_root
   -wasHome app_server_root
   -logFile WS_startManager.log
   -logRoot profile_root\logs\deployment_manager_server_name
   -restart true
여기서
  • name_of_the_deployment_manager_service는 서비스에 제공할 이름입니다.
  • deployment_manager_server_name은 서버의 이름입니다.

명령을 입력하면 다음 예와 유사한 메시지가 명령 창에 표시됩니다.

Adding Service: name_of_the_deployment_manager_service
   Config Root: profile_root\config
   Server Name: deployment_manager_server_name
   Profile Path: profile_root
   Was Home: app_server_root
   Start Args:
   Restart: 1
IBM WebSphere Application Server V9.x - name_of_the_deployment_manager_service service successfully added.

새 서비스에 대해 작업하려면 시작 > 설정 > 제어판 > 관리 도구 > 서비스를 클릭하십시오.

노드 에이전트 서비스 작성

다음 예에서는 노드 에이전트 서버 프로세스를 시작하는 IBM WebSphere Application Server V9.x - name_of_the_node_agent_service라는 서비스를 작성합니다.

WASService -add name_of_the_node_agent_service
   -servername node_agent_server_name
   -profilePath profile_root
   -wasHome app_server_root
   -logFile WS_startNode.log
   -logRoot profile_root\logs\node_agent_server_name
   -restart true
여기서
  • name_of_the_node_agent_service는 서비스에 제공할 이름입니다.
  • profile_root는 노드 에이전트가 파일 시스템에 상주하는 위치입니다.
  • node_agent_server_name은 노드 에이전트의 이름입니다.

    일반적으로 이 이름은 nodeagent입니다.

명령을 입력하면 다음 예와 유사한 메시지가 명령 창에 표시됩니다.

Adding Service: name_of_the_node_agent_service
   Config Root: profile_root\config
   Server Name: node_agent_server_name
   Profile Path: profile_root
   Was Home: app_server_root
   Start Args:
   Restart: 1
IBM WebSphere Application Server V9.x - name_of_the_node_agent_service service successfully added.

애플리케이션 서버 서비스 작성

다음 예에서는 애플리케이션 서버 프로세스를 시작하는 IBM WebSphere Application Server V9.x - name_of_the_application_server_service라는 서비스를 작성합니다.

WASService -add name_of_the_application_server_service
   -servername application_server_name
   -profilePath profile_root
   -wasHome app_server_root
   -logFile WS_startServer.log
   -logRoot profile_root\logs\application_server_name
   -restart true
여기서
  • name_of_the_application_server_service는 서비스에 제공할 이름입니다.
  • application_server_name은 서버의 이름입니다.

명령을 입력하면 다음 예와 유사한 메시지가 명령 창에 표시됩니다.

Adding Service: name_of_the_application_server_service
  Config Root: profile_root\config
  Server Name: application_server_name
  Profile Path: profile_root
  Was Home: app_server_root
  Start Args:
  Restart: 1
IBM WebSphere Application Server V9.x - name_of_the_application_server_service service successfully added.

기존 애플리케이션 서버 서비스 갱신

Windows 운영 체제에 대한 다음 예에서는 IBM WebSphere Application Server V9.x - Server2 Service라는 기존 서비스를 추가 중지 인수인 사용자 이름 및 비밀번호로 업데이트합니다. 이 매개변수는 Windows 서비스가 시스템을 종료할 때 사용하는 스크립트로 자동 전달됩니다.

WASService -add "Server2 Service"
   -servername server2
   -profilePath profile_root
   -logRoot profile_root\logs\server2
   -stopArgs "-username user_name  -password password"
   -encodeParams
[Windows]

Windows 서비스 작성 후 서버 프로세스 시작 및 중지

이 Windows 운영 체제 예에서는 server1에 대한 Windows 서비스 작성 후 startServer server1 명령 또는 stopServer server1을 실행하면 다음 예와 비슷한 메시지가 표시됩니다.

Because server1 is registered to run as a Windows Service, the
request to start this server will be completed by starting the
associated Windows Service.

노드 에이전트 프로세스에 대한 Windows 서비스 작성 후 startNode 명령 또는 stopNode 명령을 실행하면 다음 예와 비슷한 메시지가 표시됩니다.

Because nodeagent is registered to run as a Windows Service, the
request to start or stop this server will be completed by 
starting or stopping the associated Windows Service. Examine 
the log files to view messages related to this command.

배치 관리자에 대한 Windows 서비스 작성 후 startManager 명령 또는 stopManager 명령을 실행하면 다음 예와 비슷한 메시지가 표시됩니다.

Because dmgr is registered to run as a Windows Service, the
request to start or stop this server will be completed by 
starting or stopping the associated Windows Service. Examine 
the log files to view messages related to this command.
유의: Windows에서 WebSphere 서비스를 작성하고 제거하는 작업은 복잡하고 오류가 발생하기 쉽습니다. 오류 진단에 대한 도움말은 WASServiceCmd를 사용하여 WebSphere Application Server용 Windows 서비스를 작성하는 방법에 대한 정보를 참조하십시오.

주제 유형을 표시하는 아이콘 참조 주제



시간소인 아이콘 마지막 업데이트 날짜: last_date
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=rins_wasservice
파일 이름:rins_wasservice.html