大橙子网站建设,新征程启航

为企业提供网站建设、域名注册、服务器等服务

postgreSQL二进制快速安装-创新互联

二进制安装步骤:

创新互联主营朝天网站建设的网络公司,主营网站建设方案,重庆APP开发,朝天h5小程序开发搭建,朝天网站营销推广欢迎朝天等地区企业咨询

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数据库是不需要密码的

另外有需要云服务器可以了解下创新互联cdcxhl.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。


分享名称:postgreSQL二进制快速安装-创新互联
当前路径:http://dzwzjz.com/article/cohcig.html
在线咨询
服务热线
服务热线:028-86922220
TOP