# Optionally initialize the database and enable automatic start: sudo /usr/pgsql-14/bin/postgresql-14-setup initdb sudo systemctl enable postgresql-14 sudo systemctl start postgresql-14
# 설치가 끝나면 주요 파일 위치 /etc/passwd postgres 계정이 생성됨 tcp 5432 port 가 생성됨 /usr/pgsql-14/bin / psql 등 실행파일 /var/lib/pgsql/14/data / pg_hba.conf postgresql.conf 등 환경 설정파일
# /var/lib/pgsql/15/data/postgresql.conf listen_addresses = 'localhost' 를 listen_addresses = '*' 로 변경
#/var/lib/pgsql/15/data/pg_hba.conf host all all 0.0.0.0/0 scram-sha-256 / 줄 추가
host all all 0.0.0.0/0 trust / superuser 패스워드 없이 로그인시 줄 추가 (간혹 superuser 패스워드를 모를경우 trust mode로 설정하고 HeidiSQL 툴로 패스워드 없이 접속하여 superuser 초기 패스워드 변경)
# systemctl restart postgresql-14 / 시스템 환경 변경시 restart는 필수
< trust로 설정, 패스워드 없이 로그인하여 기본 패스워드 변경>< postgres 또는 enterprisdb 슈퍼계정의 패스워드를 변경함> # 또는
# /usr/pgsql-14/bin/./psql # 관리자 모드로 진입 (postgre 계정으로 ) $ postgres=# alter user postgres with password `!........2'; 안먹힐때 $ postgres=# \password postgres Enter new password:<new-password> $ postgres=# \q
# /usr/edb/pem/agent/bin/pemworker --register-agent Postgres Enterprise Manager Server Hostname: 192.168.56.XX / PEM 서버 IP Postgres Enterprise Manager Server Username: enterprisedb / PEM superuser user 이름 Postgres Enterprise Manager Server Port: 5444 / PEM 서비스 포트 Postgres Enterprise Manager Agent registered successfully!
# Agent 설정 변경 sed -i ‘/heartbeat_connection=false/heartbeat_connection=true/g’ /usr/edb/pem/agent/etc/agent.cfg
# Agent 시작 systemctl enable --now pemagent systemctl start pemagent
EDB-PEM 서버 설치
# 설치 dnf –y install edb-as14-server edb-pem
# DB 생성 PGSETUP_INITDB_OPTIONS="-E UTF-8" /usr/edb/as14/bin/edb-as-14-setup initdb
#DB 설정 변경 및 상태 확인 systemctl enable --now edb-as-14 systemctl status edb-as-14
# 환경파일 설치가 끝나면 기본 경로
/etc/passwd / enterprisedb 계정이 생성됨 tcp 5444 port 가 생성됨 /usr/edb/as14 / edb 실행파일 경로 /usr/edb/pem / edb pem 실행파일 경로 /var/lib/edb/as14/data / pg_hba.conf postgresql.conf 등 환경 설정파일
# 방화벽 등 포트 오픈 또는 Disable firewall-cmd --permanent --zone=public --add-port=8443/tcp firewall-cmd –reload 또는 systemctl disable firewalld
# Agent 서버에 접속하게 pg_hba.conf 설정 vi $PGDATA/pg_hba.conf host all all 0.0.0.0/0 scram-sha-256 << 추가
# edb pem 서버 db설치 (Config PEM) /usr/edb/pem/bin/configure-pem-server.sh
-------------------------- EDB Postgres Enterprise Manager -------------------------- Install type: 1:Web Services and Database, 2:Web Services 3: Database [ ] :1 Enter local database server installation path (i.e. /usr/edb/as12 , or /usr/pgsql-12, etc.) [ ] :/usr/edb/as14 Enter database super user name [ ] :enterprisedb Enter database server port number [ ] :5444 Enter database super user password [ ] : (여기서 문제임!!!!!!) Please enter CIDR formatted network address range that agents will connect to the server from, to be added to the server's pg_hba.conf file. For example, 192.168.1.0/24 [ 0.0.0.0/0 ] :0.0.0.0/0 Enter database systemd unit file or init script name (i.e. edb-as-12 or postgresql-12, etc.) [ ] :edb-as-14 Please specify agent certificate path (Script will attempt to create this directory, if it does not exists) [ /root/.pem/ ] :
# pem Config 설치할때 enterprisedb 의 패스워드를 신규로 설정하거나 묻는게 없어서 enterprisedb의 초기 패스워드를 모름 (설치 에러남) 이럴경후 pg_hba.conf 파일의 host all all 0.0.0.0/0 scram-sha-256 ---> 에서 trust mode로 변경하고 HeidiSQL 툴로 패스워드 없이 접속하여 superuser 초기 패스워드 변경하여야 함
# pem 추가 서비스 시작 HTTP # systemctl start httpd.service
EPAS Server # systemctl start edb-as-14.service
PEM agent systemctl start pemagent.service
=== 설치완료 ==
PEM 서버 접속 웹화면 https://PEM-IP주소:8443/pem/ 로그인은 계정은 enterprisedb 및 password 임