资讯

精准传达 • 有效沟通

从品牌网站建设到网络营销策划,从策略到执行的一站式服务

postgreSQL二进制快速安装

二进制安装步骤:

站在用户的角度思考问题,与客户深入沟通,找到佳木斯网站设计与佳木斯网站推广的解决方案,凭借多年的经验,让设计与互联网技术结合,创造个性化、用户体验好的作品,建站类型包括:网站建设、做网站、企业官网、英文网站、手机端网站、网站推广、域名与空间、网站空间、企业邮箱。业务覆盖佳木斯地区。

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二进制快速安装
网页链接:http://www.cdkjz.cn/article/gghhcg.html
多年建站经验

多一份参考,总有益处

联系快上网,免费获得专属《策划方案》及报价

咨询相关问题或预约面谈,可以通过以下方式与我们联系

大客户专线   成都:13518219792   座机:028-86922220