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.

你可能感兴趣的:(数据库,linux,防火墙,kill,PostgreSQL,extension)