콘텐츠로 이동

빠른 설치

이 페이지에서는 OpsAnt 배포의 전체 프로세스를 소개하며, 주로 네 단계로 나뉩니다: Docker 설치, 코드 가져오기, 설정 수정, 설치 스크립트 실행.

사전 조건

  • Linux 서버 한 대 (Ubuntu 24.04 / CentOS 7+ / Debian 권장, 메모리 8G 이상)
  • 서버가 외부 네트워크에 접근 가능 (이미지 풀)

1. Docker 및 의존성 소프트웨어 패키지 설치

# Ubuntu / Debian 示例
sudo apt-get -y update
sudo apt-get -y install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get -y update
sudo apt-get -y install docker-ce jq uuid wget git ntpdate mysql-client unzip
systemctl enable --now docker

기타 시스템(CentOS / RockyLinux / OpenEuler 등)의 Docker 설치 명령은 환경 요구사항을 참조하세요.

2. 코드 가져오기

cd /opt && git clone https://github.com/unixhot/opsant.git
# 或下载源码包并解压到 /opt/opsant

3. 설치 설정 수정 (필수)

cd /opt/opsant/install
cp install.config.example install.config
vim install.config

수정해야 할 주요 설정:

설정 항목 설명
DOMAIN_NAME OpsAnt 접속 주소 (IP 또는 해석 가능한 도메인, hosts 수정은 무효)
LOCAL_IP 본机 내网 IP
PROXY_PUBLIC_IP 공인 IP (내网 배포 시 기본값 유지 가능, DOMAIN_NAME과 동일)

스크립트가 자동으로 랜덤 문자열을 생성하여 INIT_PASSWORD를 교체하므로, 비밀번호를 수동으로 설정할 필요가 없습니다.

4. 설치 스크립트 실행

cd /opt/opsant/install && ./opsant-install.sh install

스크립트가 자동으로 완료하는 작업: MySQL, Redis, Consul, Prometheus, Alertmanager, blackbox-exporter 등의 컨테이너 초기화, Proxy 메인 컨테이너 배포, Prometheus 접속 설정 작성 및 내장 알림 규칙 가져오기.

중요: 실행 과정에서 Error 오류가 발생하면 안 됩니다 (Warning은 무시 가능). 설치 스크립트가 admin 계정의 랜덤 초기 비밀번호를 출력하므로, 반드시 안전하게 보관하세요.

접속

설치 완료 후 브라우저를 통해 접속:

http://<DOMAIN_NAME>:8010

기본 계정 admin, 비밀번호는 설치 스크립트가 출력한 랜덤 비밀번호입니다.

서비스 포트

포트 용도
8010 OpsAnt Web 플랫폼 (Django)
4505 / 4506 SaltStack Master
4507 OpsMini Server 데이터 플레인 (gRPC, Agent 연결)
4508 OpsMini Server 컨트롤 플레인 HTTP (컨테이너 내부 호출, 외부 매핑 안 함)
9090 Prometheus
9093 Alertmanager
8500 Consul

기타 설치 방식

다음 단계

설치 완료 후 최초 로그인을 참조하여 로그인하고 첫 번째 호스트를 관리하세요.