postgreSQL和postGis安装和启动问题

转引:

 

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.

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值