Win10下PostgreSQL10与PostGIS安装

最近在使用矢量数据,因此需要用空间数据库存储一下,这里就用到了PostgreSQL10与PostGIS。这里将如何下载安装和安装过程中遇到的问题记录下来。

1.下载和安装PostgreSQL10

访问官网:https://www.postgresql.org/,之后跳转到官网,在官网选择【Download】
之后,跳转到下载页面,如下图选择:

在新的页面,会看到其实是有两个组织给出的安装包的,Interactive installer by EnterpriseDB和Graphical installer by BigSQL,强烈建议选择【Interactive installer by EnterpriseDB】下的下载方式,原因后面会讲。这里下载的文件是:

之后下载安装即可。

期间可能遇到VC runtime的问题,结局方案为:

管理员运行cmd,工作目录切换到postgresql安装文件所在目录,运行postgresql-10.2-1-windows-x64.exe –install_runtimes 0 即可

2.下载和安装PostGIS

访问官网:http://postgis.net/,之后跳转到官网,在官网选择【Download】,之后安装到PostgreSQL的目录下即可:
之前必须下载那个版本的PostgreSQL的原因是(链接:点击打开链接):
The installers are designed to work with EnterpriseDb PostgreSQL distributions. If you are using BigSQL distribution use the PostGIS available via the BigSQL distribution. If you are on BigSQL (PostgreSQL 9.5+) and need items not available in BigSQL distribution (e.g. SFCGAL, pgRouting, or development versions of PostGIS), you can use the binaries in the experimental section. Note the path you copy to in BigSQL is a little different (e.g. postgresql/lib instead of lib).
意思就是PostGIS的安装版是为EnterpriseDb PostgreSQL准备的。

转载自:https://blog.csdn.net/LWJ285149763/article/details/79380643

You may also like...