postgreSQL二进制快速安装

postgreSQL二进制快速安装,第1张

概述二进制安装步骤: groupadd postgres  useradd -g postgres postgres  id postgres  passwd postgres  mkdir -p /data/postgresql/data   mkdir -p /data/postgresql/log  tar xf postgresql-9.5.9-1-linux-x64-binaries.tar

二进制安装步骤:

groupadd postgres

useradd -g postgres postgres

ID postgres

passwd postgres

mkdir -p /data/postgresql/data

mkdir -p /data/postgresql/log

tar xf postgresql-9.5.9-1-linux-x64-binarIEs.tar.gz -C /usr/local/

cd /usr/local/

chown -R postgres.postgres pgsql

cd /data

chown -R postgres.postgres postgresql

cd /usr/local/pgsql/bin/

vim /etc/profile

source /etc/profile


普通用户启动postgresql服务

su - postgres

初始化数据库:

initdb -E utf8 -D /data/postgresql/data

启动数据库:

pg_ctl -D /data/postgresql/data -l /data/postgresql/log/postgres.log start

[root@localhost log]# tailf /data/postgresql/log/postgres.log

LOG: Could not create IPv6 socket: Address family not supported by protocol

LOG: database system was shut down at 2017-10-04 18:06:18 CST

LOG: Multixact member wraparound protections are Now enabled

LOG: database system is ready to accept connections

LOG: autovacuum launcher started

关闭postgresql服务

pg_ctl -D /data/postgresql/data -l /data/postgresql/log/postgres.log stop

[root@localhost log]# tailf /data/postgresql/log/postgres.log

LOG: received fast shutdown request

LOG: aborting any active transactions

LOG: autovacuum launcher shutting down

LOG: shutting down

LOG: database system is shut down

重启postgresql服务

pg_ctl -D /data/postgresql/data -l /data/postgresql/log/postgres.log restart

[root@localhost log]# tailf /data/postgresql/log/postgres.log

LOG: received fast shutdown request

LOG: aborting any active transactions

LOG: autovacuum launcher shutting down

LOG: autovacuum launcher shutting down

LOG: shutting down

LOG: database system is shut down

LOG: Could not create IPv6 socket: Address family not supported by protocol

LOG: database system was shut down at 2017-10-04 18:08:15 CST

LOG: Multixact member wraparound protections are Now enabled

LOG: database system is ready to accept connections

LOG: autovacuum launcher started

查看启动日志:

tail -100f /data/postgresql/log/postgres.log

ps -ef

登陆数据库:

psql

默认登陆postgresql数据库是不需要密码的

总结

以上是内存溢出为你收集整理的postgreSQL二进制快速安装全部内容,希望文章能够帮你解决postgreSQL二进制快速安装所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/sjk/1172216.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-02
下一篇 2022-06-02

发表评论

登录后才能评论

评论列表(0条)

保存