4.6. 고가용성 패키지 및 에이전트 설치

고가용성 패키지 및 에이전트를 설치하려면 모든 노드에서 다음 단계를 완료합니다.

절차

  1. AWS RHUI(Red Hat Update Infrastructure) 클라이언트를 제거합니다. Red Hat Cloud Access 서브스크립션을 사용할 예정이므로 서브스크립션 외에 AWS RHUI를 사용해서는 안 됩니다.

    $ sudo -i
    # dnf -y remove rh-amazon-rhui-client*
  2. VM을 Red Hat에 등록합니다.

    # subscription-manager register --auto-attach
  3. 모든 리포지토리를 비활성화합니다.

    # subscription-manager repos --disable=*
  4. RHEL 9 Server HA 리포지토리를 활성화합니다.

    # subscription-manager repos --enable=rhel-9-for-x86_64-highavailability-rpms
  5. RHEL AWS 인스턴스를 업데이트합니다.

    # dnf update -y
  6. 고가용성 채널에서 사용 가능한 모든 펜싱 에이전트와 함께 Red Hat High Availability Add-On 소프트웨어 패키지를 설치합니다.

    # dnf install pcs pacemaker fence-agents-aws
  7. 사용자 hacluster 는 이전 단계에서 pcspacemaker 설치 중에 생성되었습니다. 모든 클러스터 노드에서 hacluster의 암호를 생성합니다. 모든 노드에 동일한 암호를 사용합니다.

    # passwd hacluster
  8. firewalld.service가 설치된 경우 RHEL 방화벽에 high availability 서비스를 추가합니다.

    # firewall-cmd --permanent --add-service=high-availability
    # firewall-cmd --reload
  9. pcs 서비스를 시작하고 부팅 시 시작되도록 활성화합니다.

    # systemctl start pcsd.service
    # systemctl enable pcsd.service
  10. /etc/hosts 를 편집하고 RHEL 호스트 이름 및 내부 IP 주소를 추가합니다. 자세한 내용은 RHEL 클러스터 노드에 /etc/hosts 파일을 어떻게 설정해야 합니까?

검증

  • pcs 서비스가 실행 중인지 확인합니다.

    # systemctl status pcsd.service
    
    pcsd.service - PCS GUI and remote configuration interface
    Loaded: loaded (/usr/lib/systemd/system/pcsd.service; enabled; vendor preset: disabled)
    Active: active (running) since Thu 2018-03-01 14:53:28 UTC; 28min ago
    Docs: man:pcsd(8)
    man:pcs(8)
    Main PID: 5437 (pcsd)
    CGroup: /system.slice/pcsd.service
         └─5437 /usr/bin/ruby /usr/lib/pcsd/pcsd > /dev/null &
    Mar 01 14:53:27 ip-10-0-0-48.ec2.internal systemd[1]: Starting PCS GUI and remote configuration interface…
    Mar 01 14:53:28 ip-10-0-0-48.ec2.internal systemd[1]: Started PCS GUI and remote configuration interface.