본문으로 건너뛰기

Linux & Unix - 간편설치 v3.0.15 이상

✓ 참고 사항 ( exem-manager-agent 관련 )

  • exem-host-agent v3.0.15부터 exem-manager-agent 사용이 가능함
    • exem-manager-agent를 사용하는 경우, manager agent가 하단의 간편 설치 과정을 진행함
      • exem-manager-agent GUIDE 문서 참고
    • exem-manager-agent를 사용하지 않는 경우, 하단의 간편 설치 과정을 참고하여 설치할 수 있음

[exem-host-agent] 간편 설치

◈ 간편 설치 주의사항

  • 해당 방법을 사용하여 설치하는 경우, $EXEM_HOME 경로 설정 없이 해당 경로에 바로 설치 및 패치
      *   잘못된 경로에 설치하지 않도록 주의
  • 패치하는 경우, 이미 실행 중인 exem-host-agent를 종료 후 아래 단계 진행
  • 고객사의 상황에 따라 아래 안내된 설치 방법 ① ~ ③ 중 하나의 방법을 선택하여 진행

[exem-host-agent]를 설치하기 위한 공통 사항

[exem-host-agent] package 압축 해제

  • 설치 시 제공하는 tar 파일 안에 .bin 파일과 간편 설치 스크립트가 있습니다.
tar xvf setup_exem-host-agent_{pkg_version}.tar

[exem-host-agent] package에 포함된 파일 목록

  • 파일 목록
NONameDescription
setup_exem-host-agent_${PKG_VER}.binexem-host-agent 설치 패키지 파일
install_exem-host-agent.shexem-host-agent 간편 설치를 위한 스크립트 파일
exemone-filerepo.tar.gz설치 방법 ③ 수집서버의 repository를 이용하는 방법 에 사용할 Docker 이미지 파일
install_exemone-filerepo.sh설치 방법 ③ 수집서버의 repository를 이용하는 방법 repository 생성 스크립트
uninstall_exemone-filerepo.sh설치 방법 ③ 수집서버의 repository를 이용하는 방법 repository 삭제 스크립트

설치 방법 ① 패키지 파일이 설치 대상 HOST 서버에 있는 경우

❶ install config 파일 준비

  • install 시점에 필요한 옵션 정보들을 text 파일로 준비

  • 해당 파일에는 아래 데이터처럼 설정 데이터가 key=value 형식으로 나열되어 있어야 함

    EXEM_HOME=/home/exemone/exem
    RECEIVER_IP=10.20.30.40
    RECEIVER_PORT=9009
    • 설정하지 않는 경우 아래 목록에 표시된 default 값으로 설치됨
      • default 가 없는 경우 필수 설정해야 함
  • 필요한 옵션 목록

NONameRequiredDefaultDescription
EXEM_HOMEOsetup 파일 실행 위치에 exem 폴더 추가exemONE agent들을 설치할 디렉토리 설정
RECEIVER_IPOX (기본값 없음)host agent와 연결할 receiver의 ip
RECEIVER_PORTOLinux : 9009(gRPC) / Unix : 9010(TCP)host agent와 연결할 receiver의 port

❷ config 파일을 사용하여 setup 파일 실행

  • ❶ 에서 준비한 config 파일을 setup 파일 실행 시 첫 번째 인자로 넣어 실행

    • 해당 파일에 적힌 key-value 를 사용하여 사용자 input 없이 자동으로 설치 진행됨
  • ex) ./setup_exem-host-agent_3.0.15.bin host-install-config

  • 참고사항
    • setup 파일과 config 파일은 다른 디렉토리에 존재해도 상관 없음
    • setup 파일과 config 파일 모두 절대경로, 상대경로 둘 다 지정 가능함
    • 실행 가능한 예시
    - ./setup_exem-host-agent_3.0.15.bin  host-install-config
    - ./setup_exem-host-agent_3.0.15.bin ../host-install-config
    - /home/exemone/setup_exem-host-agent_3.0.15.bin /home/exemone/host-install-config

설치 방법 ② 고객사의 원격 repository를 이용하는 방법 (v3.0.15.1 ~)

  • 고객사의 원격 repository에 exem-host-agent 설치 패키지가 업로드 되어 있는 경우 간단하게 한 줄 명령어로 설치가 가능합니다. 아래 순서대로 진행합니다.

❶ install_exem-host-agent.sh 수정

  • [exem-host-agent]를 설치하기 위한 공통 사항 에 따라 압축 해제 후 install_exem-host-agent.sh를 수정합니다.

  • RECEIVER_IP : exem-host-agent가 연결될 RECEIVER_IP 입력 (기본값: 없음)
  • RECEIVER_PORT : exem-host-agent가 연결될 RECEIVER_PORT 입력 (기본값: 9009[Linux] 또는 9010[UNIX])
  • AGENT_SETUP_FILE_URL : setup_exem-host-agent_(버전).bin을 업로드 할 고객사의 원격 Repository URL로 변경
    • 예시) AGENT_SETUP_FILE_URL=http://{download URL}/setup_exem-host-agent_3.0.15.1.bin

❷ 고객사의 원격 repository>에 수정한 install_exem-host-agent.sh, setup_exem-host-agent_(버전).bin 파일 업로드

❸ 설치 대상 HOST 서버>에서 패키지 설치 및 실행

(필수) 이미 exem-host-agent가 실행 중인 경우 반드시 종료 후 패치

  • 고객사의 원격 repository에 업로드된 install_exem-host-agent.sh 파일을 curl 또는 wget 명령어를 설치 대상 HOST 서버에서 실행합니다.
    • 해당 명령을 실행한 디렉토리에 자동으로 ${EXEM_HOME} 을 만들고 설치되므로, 원하는 디렉토리로 이동한 후 실행합니다.
      • 동일한 경로에 이미 exem-host-agent가 설치되어 있는 경우 자동으로 패치됩니다.
    • 환경에 따라 아래 2개의 명령어 중 가능한 것으로 사용합니다.
    • 명령어의 <URL>을 ❷에서 install_exem-host-agent.sh 파일을 업로드 한 원격 repository URL 경로로 변경하여 명령어를 실행합니다.
      • curl 명령어 사용
      curl -k -fsSL <URL> | sh && sudo ./exem/host/start.sh
      ex) curl -k -fsSL http://nexus.com/install_exem-host-agent.sh | sh && sudo ./exem/host/start.sh
      • wget 명령어 사용
      wget --no-check-certificate -O- <URL> | sh && sudo ./exem/host/start.sh
      ex) wget --no-check-certificate -O- http://nexus.com/install_exem-host-agent.sh | sh && sudo ./exem/host/start.sh

설치 방법 ③ 수집 서버의 repository를 이용하는 방법 (v3.0.15.1 ~)

파일 전송을 위한 컨테이너 PORT (default: 9011) 하나를 새로 신청해야 합니다.

  • 수집서버에 Docker를 이용하여 repository 컨테이너를 생성 후 해당 컨테이너에 exem-host-agent 설치 패키지를 업로드 하여 간단하게 한 줄 명령어로 설치가 가능합니다.
  • 제공한 tar 압축 파일에 Docker를 이용하여 repository 컨테이너를 생성 할 수 있는 간편 스크립트가 포함되어 있습니다.

❶ <수집서버> install_exem-host-agent.sh 수정

  • [exem-host-agent]를 설치하기 위한 공통 사항 에 따라 수집서버에서 tar 파일 압축 해제 후 install_exem-host-agent.sh를 수정합니다.

  • RECEIVER_IP : exem-host-agent가 연결될 RECEIVER_IP 입력 (기본값: 없음)
  • RECEIVER_PORT : exem-host-agent가 연결될 RECEIVER_PORT 입력 (기본값: 9009[Linux] 또는 9010[UNIX])
  • FILEREPO_PORT : 파일전송용 컨테이너의 FILEREPO_PORT 입력 (기본값 : 9011)

❷ <수집서버> install_exemone-filerepo.sh 실행

  • 수집서버에 업로드한 install_exemone-filerepo.sh 을 실행 후 마지막에 출력되는 curl 명령어를 복사합니다.
  • install_exemone-filerepo.sh 스크립트 실행시 다음의 과정을 수행합니다.
    • exemone-filerepo image 등록
    • exemone-filerepo container 시작
    • <수집서버> install_exem-host-agent.sh 수정 에서 수정된 파일들로 컨테이너 내부 파일들 교체
    • 마지막에 설치 대상 HOST 서버에서 간편 설치 할 수 있는 명령어를 출력
    ex) curl -fsSL http://10.20.30.40:9011/install_exem-host-agent.sh | sh && sudo ./exem/host/start.sh
    • 실행 예시

❸ <설치 대상 HOST 서버> 패키지 설치 및 실행

(필수) 이미 exem-host-agent가 실행 중인 경우 반드시 종료 후 패치

  • <수집서버> install_exemone-filerepo.sh 실행 과정에서 복사한 curl 명령어를 설치 대상 HOST 서버의 설치 경로에서 실행합니다.
  • 실행 예시

[참고 1]

  • exemone-filerepo container 삭제를 원하는 경우 수집 서버에서 uninstall_exemone-filerepo.sh 를 실행합니다.

[참고 2]

  • 설치 대상 HOST 서버에 exem-host-agent가 동작 중인 경우 stop.sh를 수행시킨 후 설치해야 합니다.
  • 실행 중인 exem-host-agent 가 있을 경우 다음의 문구가 출력 됩니다.

  • 한 HOST에는 하나의 exem-host-agent 만 설치하는 게 원칙이나, 개발 및 테스트를 위해 여러 개를 설치한 서버인 경우 다음의 제외 옵션(--nocheck)을 추가하면 정상 설치 가능합니다.
curl -fsSL http://10.20.30.41:9011/install_exem-host-agent.sh | sh -s -- --nocheck && sudo ./exem/host/start.sh