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

你可能感兴趣的文章
Nginx 利用代理转发请求示例
查看>>
Nginx 动静分离与负载均衡的实现
查看>>
Nginx 反向代理 MinIO 及 ruoyi-vue-pro 配置 MinIO 详解
查看>>
nginx 反向代理 转发请求时,有时好有时没反应,产生原因及解决
查看>>
Nginx 反向代理+负载均衡
查看>>
Nginx 反向代理解决跨域问题
查看>>
Nginx 反向代理配置去除前缀
查看>>
nginx 后端获取真实ip
查看>>
Nginx 多端口配置和访问异常问题的排查与优化
查看>>
Nginx 如何代理转发传递真实 ip 地址?
查看>>
Nginx 学习总结(16)—— 动静分离、压缩、缓存、黑白名单、性能等内容温习
查看>>
Nginx 学习总结(17)—— 8 个免费开源 Nginx 管理系统,轻松管理 Nginx 站点配置
查看>>
Nginx 学习(一):Nginx 下载和启动
查看>>
nginx 常用指令配置总结
查看>>
Nginx 常用配置清单
查看>>
nginx 常用配置记录
查看>>
nginx 开启ssl模块 [emerg] the “ssl“ parameter requires ngx_http_ssl_module in /usr/local/nginx
查看>>
Nginx 我们必须知道的那些事
查看>>
Nginx 源码完全注释(11)ngx_spinlock
查看>>
Nginx 的 proxy_pass 使用简介
查看>>