博客
关于我
如何在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集群解决方案(4):负载均衡
查看>>
mysql面试题学校三表查询_mysql三表查询分组后取每组最大值,mysql面试题。
查看>>
mysql颠覆实战笔记(八)--mysql的自定义异常处理怎么破
查看>>
MYSQL高可用集群MHA架构
查看>>
MySQL高级-MySQL并发参数调整
查看>>
MySQL高级-SQL优化步骤
查看>>
MySQL高级-视图
查看>>
mysql高级查询~分页查询
查看>>
MySQL:判断逗号分隔的字符串中是否包含某个字符串
查看>>
nacos config
查看>>
Nacos在双击startup.cmd启动时提示:Unable to start embedded Tomcat
查看>>
Nacos安装教程(非常详细)从零基础入门到精通,看完这一篇就够了
查看>>
Nacos配置中心集群原理及源码分析
查看>>
nacos配置自动刷新源码解析
查看>>
Nacos集群搭建
查看>>
nacos集群搭建
查看>>
nagios安装文档
查看>>
Navicat for MySQL 查看BLOB字段内容
查看>>
Neo4j电影关系图Cypher
查看>>
Neo4j的安装与使用
查看>>