centos7上安装postgresql
1:报错
bash-4.2# systemctl status postgresql.service
postgresql.service - PostgreSQL database server
Loaded: loaded (/usr/lib/systemd/system/postgresql.service; enabled)
Active: failed (Result: exit-code) since 一 ; 23min ago
Process: 1463 ExecStartPre=/usr/bin/postgresql-check-db-dir ${PGDATA} (code=exited, status=1/FAILURE)
2:
su postgres
initdb -D
/var/lib/pgsql/data
3:su root
systemctl status postgresql.service
systemctl start postgresql.service
4:应用程序-》系统工具-》软件-》输入pgadmin 搜索rpm包名
5:yum install pgadmin3-94-1.20.0-1.rhel7 安装软件
6:/usr/pgsql-9.4/bin/pgadmin3