Postgresql Postgres数据库的配置步骤
我想构建并运行以下应用程序 我在后端和数据库方面没有什么经验,因此我需要以下安装步骤的指导: 在application.yml上自定义数据库配置 application.ymlPostgresql Postgres数据库的配置步骤,postgresql,spring-boot,Postgresql,Spring Boot,我想构建并运行以下应用程序 我在后端和数据库方面没有什么经验,因此我需要以下安装步骤的指导: 在application.yml上自定义数据库配置 application.yml logging: level: org.springframework.web.servlet: INFO spring: datasource: platform: "postgis" driver-class-name: "org.postgis.DriverWrapper"
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
请概述我应该对数据库执行的步骤,以便根据文件对其进行配置
我在Ubuntu18.04上安装了PostgreSQL 10,你已经安装了PostgreSQL,所以你只需要PostGIS就可以了。对于Ubuntu,最好使用UbuntuGIS。您可以添加UbuntuGIS存储库并从中安装PostGIS
另一种方法是使用PostgreSQL的存储库A如果已经安装了UbuntuGIS,我应该做些什么来定制数据库吗?或者我应该启动数据库服务器并运行Gradle任务?我的意思是服务器如何知道它应该通过url响应:jdbc:postgresql\u postGIS://localhost/geospatial messenger这只是jdbc驱动程序,Gradle应该这样做。谢谢!但正如@Tejas Sarade所说,一切都自动运转。不管怎样,这可能对某人有用。谢谢你的评论。
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)