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.
- Attempt Normal Stop: bash-3.1$pg_ctl stop
- Attempt Smart Stop: bash-3.1$pg_ctl stop -m s
- Attempt Fast Stop: bash-3.1$pg_ctl stop -m f
- 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.