postgresql - Postgres db 的配置步骤
问题描述
我想构建并运行以下应用程序https://github.com/sdeleuze/geospatial-messenger
我对后端和数据库的经验很少,所以我需要一些指导来完成以下安装步骤:
在 application.yml 上自定义数据库配置。
应用程序.yml
logging:
level:
org.springframework.web.servlet: INFO
spring:
datasource:
platform: "postgis"
driver-class-name: "org.postgis.DriverWrapper"
url: "jdbc:postgresql_postGIS://localhost/geospatial-messenger"
username: "postgres"
mvc:
async:
request-timeout: 1000000
请概述我应该对我的数据库执行的步骤以根据文件对其进行配置。
我在 Ubuntu 18.04 上有 PostgreSQL 10
解决方案
After installation of PostgreSQL10, please follow the below steps :
1. Login to root user, run this command su – postgres
2. Locate the pg_hba.conf file by running select Query: select current_setting('hba_file');
3. Modify the pg_hba.conf file
4. Example : vim /prod/pgsql_10/pg_hba.conf command.
5. Press insert key where you want to modify and save it using esc + :wq
Example: host all all 10.10.11.183/32 md5
trust – without password authentication
md5 – with password authentication
6. After modification, we should restart the postgres service using this command
systemctl restart postgresql-10.service
7. Also modify the postgresql.conf file as same as pg_hba.conf file.
locate postgresql.conf
vim /prod/pgsql_10/postgresql.conf
8. After modification, we should restart the postgres service using this command
systemctl restart postgresql-10.service
9. To login postgres, run this command psql -U esb(user) postgres(DB)
推荐阅读
- vue.js - Vue JS 技术,用于在应用程序加载时从不同入口点获取数据
- typescript - 打字稿中空对象类型 {} 的目的是什么?
- android - 如何找到点击的地方或路径 VectorDrawable
- python - 如何在 seaborn FacetGrid 的条形顶部添加百分比?
- python - 如何制作一个按索引从列表中删除元素的函数
- javascript - 在 JavaScript 中使用 for 循环按顺序显示数字
- javascript - Popper.js 库如何在 Vue 实例中运行
- python - Openpyxl 保存损坏/不可读的文件。没有报错,只是shell重启
- python-3.x - 尝试通过 https 从 Windows 7 和 Windows Server 2016 传输大小超过 64kb 的 JSON 时 Python OpenSSL“WantWriteError”
- ansible - 如何通过ansible playbook将文件从控制器节点的/root复制到远程主机的/root