본문으로 건너뛰기

AWS Elastic Beanstalk에 PHP 에이전트 설치

정보

리포지토리 등록 URL을 HTTP에서 HTTPS로 변경했습니다. 서비스 설치 화면은 HTTPS를 사용하고 있어 독스를 맞췄습니다. 변경한 URL은 모두 정상 응답을 확인했습니다.

확인 요청: HTTPS URL로 리포지토리 등록과 whatap-php 패키지 설치가 실제로 동작하는지 확인 부탁합니다.

Elastic Beanstalk Configuration files(.ebextensions)를 통해서 설치합니다.

.ebextensions 디렉터리에 아래 config 파일을 추가한 후 신규 버전을 배포하세요. 그리고 commands 명령어를 실행하세요.

  1. 와탭 리포지토리를 등록하세요.

  2. 패키지를 설치하세요.

  3. install.sh 설정 스크립트를 통해서 PHP 확장 모듈을 설정하세요.

    $ vi 01-WhaTap_install_repository_php.config

    commands:
    01_Install_whatap_repository:
    command: sudo rpm --import https://repo.whatap.io/centos/release.gpg
    ignoreErrors: true
    02_Install_whatap_repository:
    command: echo "[whatap]" | sudo tee /etc/yum.repos.d/whatap.repo > /dev/null
    ignoreErrors: true
    03_Install_whatap_repository:
    command: echo "name=whatap packages for enterprise linux" | sudo tee -a /etc/yum.repos.d/whatap.repo > /dev/null
    ignoreErrors: true
    04_Install_whatap_repository:
    command: echo "baseurl=https://repo.whatap.io/centos/latest/\$basearch" | sudo tee -a /etc/yum.repos.d/whatap.repo > /dev/null
    ignoreErrors: true
    05_Install_whatap_repository:
    command: echo "enabled=1" | sudo tee -a /etc/yum.repos.d/whatap.repo > /dev/null
    ignoreErrors: true
    06_Install_whatap_repository:
    command: echo "gpgcheck=0" | sudo tee -a /etc/yum.repos.d/whatap.repo > /dev/null
    ignoreErrors: true
    07_Install_whatap_php:
    command: sudo yum install -y whatap-php
    ignoreErrors: true
    08_Install_whatap_php_install.sh:
    command: (echo "[액세스 키 지정]"; echo "[서버 IP 지정(a.a.a.a/b.b.b.b)")| sudo /usr/whatap/php/install.sh
    ignoreErrors: true
    노트

    액세스 키서버 IP프로젝트 관리 > 에이전트 설치 페이지에서 발급받고 확인할 수 있습니다.

  4. Beanstalk에 새로운 버전을 배포하세요. PHP 모니터링 에이전트가 설치됩니다.