PostgreSQL 是一个免费的对象-关系数据库服务器(ORDBMS)
https://www.cnblogs.com/freeweb/p/8006639.html
1.创建postgres linux用户 密码work4qad 2.创建pgsql数据目录:pgsql_data 和pgsql放在同一个层目录 —pgSQL —pgsql —pgsql_data 3.给postgres用户添加目录访问权限:chown postgres /pgSQL/pgsql_data 4.pgsql数据库默认用户就是postgres su postgres 5.添加环境变量:vim ~/.bash_profile 加入一行:export /home/work/pgSQL/pgsql/bin 6.初始化:pgsql/bin/initdb -D /pgsql_data/ 7.启动 :pgsql/bin/pg_ctl -D /pgsql_data/ -l logfile start 8.访问:bin/psql -h host -d 库名(postgres) -U用户 -p 端口 ./bin/psql -d postgres