我想构建并运行以下应用程序https://github.com/sdeleuze/geospatial-messenger
我对后端和数据库的经验很少,因此我需要以下安装步骤的指导:
在application.yml上自定义数据库配置。
application.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
答案 0 :(得分:1)
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)
答案 1 :(得分:0)
您已经安装了PostgreSQL,因此只需要PostGIS即可工作。对于Ubuntu,最好使用UbuntuGIS。您可以添加UbuntuGIS存储库并从中安装PostGIS。 http://trac.osgeo.org/ubuntugis/wiki/QuickStartGuide。
另一种方法是使用PostgreSQL的存储库http://trac.osgeo.org/postgis/wiki/UsersWikiPostGIS24UbuntuPGSQL10Apt