> For the complete documentation index, see [llms.txt](https://docs.tibero.com/tmaxopensql/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tibero.com/tmaxopensql/installation/binary/openha-cluster-manager.md).

# OpenHA 클러스터 매니저(OpenHA Cluster Manager)

## 개요

OpenHA의 핵심 관리 모듈로, 각 노드에 설치된 PostgreSQL 데이터베이스 인스턴스의 라이프사이클을 관리하고, 클러스터 구성을 통한 고가용성 기능을 제공합니다. 장애 발생 시 자동 Failover, Primary 노드 선출, 클러스터 상태 조회 등의 기능을 수행합니다.

이 모듈은 Patroni 기술을 기반으로 구현되었으며, REST API를 통해 클러스터 제어가 가능합니다.

***

## 설치

OpenHA Cluster Manager 설치 과정에 대해서 기술합니다.

### Requirement

* 해당 노드에 PostgreSQL 서버가 설치되어 있어야 하며, `postgres` 사용자가 구성되어 있어야 합니다.
* OpenHA Cluster Manager는 PostgreSQL 설정값에 포함된 Data Directory와 Binary Directory를 참조하여 런타임에 PostgreSQL 서버의 라이프사이클을 직접 관리합니다.
* OpenHA DCS(Distributed Configuration Store, etcd 기반)가 먼저 구동되어 있어야 합니다.

### 1. OPENSQL\_INSTALL\_HOME 디렉토리 설정

```bash
. ./setenv.sh `pwd`
OPENSQL_INSTALL_HOME is set to: /home/opensql3.0-rockylinux9.4-pg16.8
OPENSQL_HOME is set to: /home/opensql
OPENSQL_HOME added to /home/opensql/.bashrc 
```

### 2. OpenHA Cluster Manager 설치

```bash
sudo -E ./install.sh patroni
```

### 3. OpenHA Cluster Manager 설치 여부 확인

설치를 완료하면 아래와 같은 명령어로 버전을 확인할 수 있습니다.

```bash
[root@396dd54381db scripts]$ patroni --version
patroni 4.0.5

[root@396dd54381db scripts]$ patronictl version
patronictl version 4.0.5
```

###


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.tibero.com/tmaxopensql/installation/binary/openha-cluster-manager.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
