linux下修改pgsql的data路径,postgresql数据库安装以及修改数据文件路径

一:postgresql数据库的安装:两种方法1,安装包安装。2,yum安装 1.yum安装。 结合自己的操作系统下载postgresql镜像。之后会显示如何

一:postgresql数据库的安装:两种方法1,安装包安装。2,yum安装

1.yum安装。

结合自己的操作系统下载postgresql镜像。之后会显示如何使用yum安装和启动postgresql,如下图:

ccd6e1a0f7fc6eb1613059f384846184.png

Install the repository RPM:

yum install

Install the client packages:

yum install postgresql10

Optionally install the server packages:

yum install postgresql10-server

Optionally initialize the database and enable automatic start:

service postgresql-10 initdb

chkconfig postgresql-10 on

service postgresql-10 start

2).使用镜像安装。

1、下载postgresql最新版:或者在官网中选择对应的os系统和你想要的postgresql版本,然后点击下载企业版: