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

你可能感兴趣的文章
Nmap渗透测试指南之指纹识别与探测、伺机而动
查看>>
Nmap端口扫描工具Windows安装和命令大全(非常详细)零基础入门到精通,收藏这篇就够了
查看>>
NMAP网络扫描工具的安装与使用
查看>>
NMF(非负矩阵分解)
查看>>
nmon_x86_64_centos7工具如何使用
查看>>
NN&DL4.1 Deep L-layer neural network简介
查看>>
NN&DL4.3 Getting your matrix dimensions right
查看>>
NN&DL4.7 Parameters vs Hyperparameters
查看>>
NN&DL4.8 What does this have to do with the brain?
查看>>
nnU-Net 终极指南
查看>>
No 'Access-Control-Allow-Origin' header is present on the requested resource.
查看>>
No 'Access-Control-Allow-Origin' header is present on the requested resource.
查看>>
NO 157 去掉禅道访问地址中的zentao
查看>>