博客
关于我
如何在Aid0.87F3上安装PostgreSQL
阅读量:276 次
发布时间:2019-03-01

本文共 827 字,大约阅读时间需要 2 分钟。

第一步:

Create the file repository configuration:

sudo sh -c ‘echo “deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main” > /etc/apt/sources.list.d/pgdg.list’

Import the repository signing key:

wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -

Update the package lists:

sudo apt-get update

Install the latest version of PostgreSQL.

If you want a specific version, use ‘postgresql-12’ or similar instead of ‘postgresql’:
sudo apt-get -y install postgresql-13
注意:我是在0.87F3版本上安装的,其他低的版本,需要去掉sudo执行以上命令

第二步:

PostgreSQL的默认会创建一个postgres账号,所以我们要切换账号:

su postgres

第三步:

创建数据簇:

pg_createcluster 13 main --start

第四步:

改权限:

chmod -R 700 /etc/ssl/private/ssl-cert-snakeoil.key

第五步:

启动

/etc/init.d/postgresql start
你可用命令
psql
测试

参考 了官网:https://www.postgresql.org/download/linux/debian/

在这里插入图片描述
在这里插入图片描述

转载地址:http://pldo.baihongyu.com/

你可能感兴趣的文章
netty既做服务端又做客户端_网易新闻客户端广告怎么做
查看>>
Netty核心模块组件
查看>>
Netty框架内的宝藏:ByteBuf
查看>>
Netty框架的服务端开发中创建EventLoopGroup对象时线程数量源码解析
查看>>
Netty源码—1.服务端启动流程一
查看>>
Netty源码—1.服务端启动流程二
查看>>
Netty源码—2.Reactor线程模型一
查看>>
Netty源码—2.Reactor线程模型二
查看>>
Netty源码—3.Reactor线程模型三
查看>>
Netty源码—3.Reactor线程模型四
查看>>
Netty源码—4.客户端接入流程一
查看>>
Netty源码—4.客户端接入流程二
查看>>
Netty源码—5.Pipeline和Handler一
查看>>
Netty源码—5.Pipeline和Handler二
查看>>
Netty源码—6.ByteBuf原理一
查看>>
Netty源码—6.ByteBuf原理二
查看>>
Netty源码—7.ByteBuf原理三
查看>>
Netty源码—7.ByteBuf原理四
查看>>
Netty源码—8.编解码原理一
查看>>
Netty源码—8.编解码原理二
查看>>