博客
关于我
如何在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/

你可能感兴趣的文章
MySQL:MySQL执行一条SQL查询语句的执行过程
查看>>
Mysql:SQL性能分析
查看>>
mysql:SQL按时间查询方法总结
查看>>
MySQL:什么样的字段适合加索引?什么样的字段不适合加索引
查看>>
MySQL:判断逗号分隔的字符串中是否包含某个字符串
查看>>
MySQL:某个ip连接mysql失败次数过多,导致ip锁定
查看>>
Mysql:避免重复的插入数据方法汇总
查看>>
m_Orchestrate learning system---二十二、html代码如何变的容易
查看>>
n = 3 , while n , continue
查看>>
n 叉树后序遍历转换为链表问题的深入探讨
查看>>
N-Gram的基本原理
查看>>
nacos config
查看>>
Nacos 与 Eureka、Zookeeper 和 Consul 等其他注册中心的区别
查看>>
Nacos2.X 配置中心源码分析:客户端如何拉取配置、服务端配置发布客户端监听机制
查看>>
NacosClient客户端搭建,微服务注册进nacos
查看>>
Nacos原理
查看>>
Nacos发布0.5.0版本,轻松玩转动态 DNS 服务
查看>>
Nacos启动异常
查看>>
Nacos和Zookeeper对比
查看>>
Nacos在双击startup.cmd启动时提示:Unable to start embedded Tomcat
查看>>