加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

postgreSQL和postGis安装和启动问题

发布时间:2020-12-13 17:58:06 所属栏目:百科 来源:网络整理
导读:转引: http://blog.csdn.net/sinboy/archive/2008/05/26/2482661.aspx 在写postgis配置时有点问题,正确配置如下: LDFLAGS=-lstdc++ ./configure --prefix=/usr/local/postgis --with-pgconfig=/opt/PostgreSQL/8.4/bin/pg_config --with-projdir=/usr/loc

转引:

http://blog.csdn.net/sinboy/archive/2008/05/26/2482661.aspx

在写postgis配置时有点问题,正确配置如下:

LDFLAGS=-lstdc++ ./configure --prefix=/usr/local/postgis --with-pgconfig=/opt/PostgreSQL/8.4/bin/pg_config --with-projdir=/usr/local/proj --with-geosconfig=/usr/local/geos/bin/geos-config

——————————————————————————————————————————————————————————

上面的再postgresql8.3和8.4下都没成功,真郁闷!下面的配成了。

我们在配置Postgres+postgis时,使用了postgresql8.3版本,其上自带了spatial extension(postgis)组件,安装非常方便。如果你使用的是linux系统,不要ssh,那样你是看不到交互的图形安装界面,从而导致失败,可通过vnc等远程桌面方式安装。另外,到目前为止,postgresql8.4上没有带postgis组件。

postgresql安装好后,如果不能远程访问可能有两方面的原因,一先用netstat查看一下postgresql的端口是否已经打开,二是看防火墙有无限制。如果端口未打开,请修改/opt/PostgreSQL/8.3/data/postgresql.conf ,设置为listen_addresses = '***.***.*.**' 即IP地址。 还要修改:/opt/PostgreSQL/8.3/data/pg_hba.conf中的下面:

# IPv4 local connections:
host all all 127.0.0.1/32 md5
host all all 0.0.0.0/0 md5

然后重启postgresql

然后按照Postgis文档步骤一步步来配置空间数据库

差不多就这么多了,有问题请大家再发问

————————————————————————————————————————————

当关不掉postgresql时,下面的方案确实起作用

Sometimes postgres does not want to shutdown by just issuing a pg_ctl stop as the postgres user. User might feel the need to “kill -9″ the postgres processes however this could be dangerous for PostgreSQL. Instead of trying to kill the PID follow the directions below in an attempt to stop postgres in an organized fashion.

  1. Attempt Normal Stop: bash-3.1$pg_ctl stop
  2. Attempt Smart Stop: bash-3.1$pg_ctl stop -m s
  3. Attempt Fast Stop: bash-3.1$pg_ctl stop -m f
  4. Attempt Immediate Stop: bash-3.1$pg_ctl stop-m i

The immediate stop almost always ends up stopping postgres if you are having trouble in stopping the processes. If the immediate stop does not work the issue should be investigated before attempting to kill -9 the PID.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读