CentOS安装PostgreSQL
发布日期:2021-05-20 11:48:18 浏览次数:18 分类:精选文章

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

版本信息

CentOS版本:CentOS-7-x86_64-Minimal-1810

PostgreSQL版本: PostgreSQL 10.10, 64-bit

第一部分:PostgreSQL的安装

1、安装rpm文件

yum install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm

2、安装客户端

yum install postgresql10

3、安装服务端

yum install postgresql10-server

4、初始化

/usr/pgsql-10/bin/postgresql-10-setup initdb

5、设置自动启动并且启动postgresql服务

systemctl enable postgresql-10 
systemctl start postgresql-10

PostgreSQL的安装比较简单,上有明确的操作步骤。

第二部分:创建用户和数据库

 

注意事项

在执行相关命令前,确保互联网连接正常,且权限足够。

以上操作均在root权限下执行。

 

上一篇:ProgresSql 连接 ssl off 错误
下一篇:ELK 索引生命周期管理(转)

发表评论

最新留言

留言是一种美德,欢迎回访!
[***.207.175.100]2025年05月03日 10时58分52秒