My reference - PostgreSQL
centos 7
sudo yum -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
sudo yum install postgresql12-server postgresql12
# postgresql-12-setup initdb
# systemctl enable --now postgresql-12.service
su - posgres
psql -c "alter user postgres with password 'password'"
[root@vm11 ~]# vi /var/lib/pgsql/12/data/pg_hba.conf^C
host all all 0.0.0.0/0 md5
host all all 192.168.18.0/24 md5
[root@vm11 ~]# vi "/var/lib/pgsql/12/data/postgresql.conf"^C
listen_addresses = '192.168.10.10'
or
listen_addresses = "*"
sudo rpm -i https://ftp.postgresql.org/pub/pgadmin/pgadmin4/yum/pgadmin4-redhat-repo-2-1.noarch.rpm
yum install pgadmin4
/usr/pgadmin4/bin/setup-web.sh
systemctl enable --now httpd
http://192.168.82.170/pgadmin4
su - postgres
psql
create database lokus;
\c lokus;
select version();
No comments:
Post a Comment