![[Windows]](../images/windows.gif)
![[Linux]](../images/linux.gif)
WASService 명령
WASService 명령행 도구를 사용하여 Linux 및 Windows 운영 체제에서 제품 Java™ 프로세스에 대한 서비스를 작성할 수 있습니다.
![[Windows]](../images/windows.gif)
![[Windows]](../images/windows.gif)
명령 파일 위치
wasservice.sh 명령 파일은
app_server_root\bin 디렉토리에 있습니다.
WASService.exe 명령 파일은
app_server_root\bin 디렉토리에 있습니다.
명령 구문
기존 서비스를 시작하기 위한 명령 구문
명령 구문은 다음과 같습니다.
![[Linux]](../images/linux.gif)
wasservice.sh -start service_name [optional startServer.bat parameters]
![[Windows]](../images/windows.gif)
WASService.exe -start service_name [optional startServer.bat parameters]
서비스 작성 또는 기존 서비스 갱신을 위한 명령 구문
명령 구문은 다음과 같습니다.
![[Linux]](../images/linux.gif)
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]](../images/linux.gif)
wasservice.sh를 -userid @myuser와 함께 지정하는 것은 버전 7.0 이상에서 사용해서는 안됩니다.
![[Windows]](../images/windows.gif)
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]
서비스를 삭제하기 위한 명령 구문
명령 구문은 다음과 같습니다.
![[Linux]](../images/linux.gif)
wasservice.sh -remove service_name
![[Windows]](../images/windows.gif)
WASService.exe -remove service_name
서비스를 중지하기 위한 명령 구문
명령 구문은 다음과 같습니다.
![[Linux]](../images/linux.gif)
wasservice.sh -stop service_name [optional stopServer.bat parameters]
![[Windows]](../images/windows.gif)
WASService.exe -stop service_name [optional stopServer.bat parameters]
서비스 상태를 검색하기 위한 명령 구문
명령 구문은 다음과 같습니다.
![[Linux]](../images/linux.gif)
wasservice.sh -status service_name
![[Windows]](../images/windows.gif)
WASService.exe -status service_name
필수 매개변수
이 명령에 필수인 매개변수는 다음과 같습니다.
- 이 옵션을 사용하여 서버 프로세스를 정의하는 프로파일의 디렉토리 경로를 지정하십시오.
- 이 옵션을 사용하여 서비스가 제어하는 서버를 식별하십시오.
선택적 매개변수
다음 매개변수는 이 명령에 선택적입니다.
- -add service_name
- 이 옵션을 사용하여 이름이 service_name인 서비스를 작성하거나 기존 서비스를 업데이트하십시오. 구문은 두 가지 경우에 모두 동일합니다.
- -configRoot configuration_repository_directory (Windows 전용)
- 이 옵션을 사용하여 WebSphere Application Server 제품 설치 루트 디렉토리의 구성 디렉토리를 식별하십시오.
- -encodeParams service_name (Windows 전용)
- 이 옵션을 사용하여 레지스트리 편집으로 인수가 판별될 수 없도록 -startArgs 및
-stopArgs 인코드를 서비스에서 강제 실행하십시오. 인수 없이 명령행에 -encodeParams를 추가하여 -add 매개변수로 서비스를 작성할 때 이 매개변수를 사용하거나
기존 서비스의 매개변수를 인코드하십시오.
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
- 이 옵션을 사용하여 제품의 설치 루트 디렉토리를 식별하십시오.
- -configRoot
- -encodeParams
- -logFile
- -logRoot
- -restart
- -startType
마법사에 의해 작성되는 서비스의 기본 이름
- 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]](../images/windows.gif)
예
배치 관리자 서비스 작성
다음 예에서는 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
여기서명령을 입력하면 다음 예와 유사한 메시지가 명령 창에 표시됩니다.
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
여기서명령을 입력하면 다음 예와 유사한 메시지가 명령 창에 표시됩니다.
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
여기서명령을 입력하면 다음 예와 유사한 메시지가 명령 창에 표시됩니다.
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]](../images/windows.gif)
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.