[postgis-users] install with freebsd

Craig Miller craig at millerfam.net
Tue Sep 23 13:52:26 PDT 2003


Here are some notes I took last week.

Install FreeBSD 4.8

cvsup the ports collection

Do the following as root  E.g.
$ su -
Password:  <enter your password>
# cd /root

Install postgresql

cd /usr/ports/databases/postgresql7
make
make install

Install proj4
cd /root
fetch ftp://ftp.remotesensing.org/pub/proj/proj-4.4.7.tar.gz
gzip -dc proj-4.4.7.tar.gz | tar xvf -
cd proj-4.4.7
./configure
make
make install

Install postgis
#  cd /root
#  fetch http://postgis.refractions.net/postgis-0.7.5.tar.gz
#  gzip -dc postgis-0.7.5.tar.gz | tar xvf -
#  cd postgis-0.7.5

#  vi Makefile
/USE_PROJ=0
:s/USE_PROJ=0/USE_PROJ=1/
:wq

#  gmake PGSQL_SRC=/usr/ports/databases/postgresql7/work/postgresql-7.3.4
#  gmake PGSQL_SRC=/usr/ports/databases/postgresql7/work/postgresql-7.3.4
install

Initialize PostgreSQL
# cd /usr/local/share/postgresql
# su -l pgsql -c "initdb -E UNICODE"
# /usr/local/etc/rc.d/010.pgsql.sh start

Enable remote access
edit ~pgsql/data/postgresql.conf
uncomment tcpip=false, and change it to tcpip=true
edit ~pgsql/data/pg_hba.conf and add an entry to trust the host you want
to connect from.
# su -l pgsql pg_ctl restart

Read a few docs -- get familiar
For postmaster settings, see /usr/local/pgsql/data/postgresql.conf
For more tips, read /usr/local/pgsql/post-install-notes
For complete PostgreSQL docs, look in /usr/local/share/postgresql
For PostGIS docs, look in /usr/local/share/postgresql/contrib

Play with it

Create your database
# cd /usr/local/share/postgresql/contrib
# su -l pgsql -c "createdb -E UNICODE <yourtestdatabase>"

Add plpgsql support
# su -l pgsql -c "createlang plpgsql <yourtestdatabase>"

Add all the postgis extensions, and create the postgis tables (e.g.
spatial ref sys.
# su -l pgsql -c "psql -d <yourtestdatabase> -f
/usr/local/share/postgresql/contrib/postgis.sql"

Populate the Spatial Ref System tables.
# su -l pgsql -c "psql -d <yourtestdatabase> -f
/usr/local/share/postgresql/contrib/spatial_ref_sys.sql"


<quote who="Ricardo Javier Aranibar León">
> Hi list,
> I'm a newbie, I download postgis-0.7.5.tar.gz and I have installed
> freebsd 4.8 with postgresql 7.3 but when I'll intall
> postgis-0.7.5.tar.gz  when I run make I have this error: Makefile
> error line 25.
>
> Makefile error line 29.
>
> Makefile error line 33.
> I like to know how I can Installed postgis in Freebsd?
>  
> REgards,
>  
> Ricardo.
>  
> PD: Sorry for my enghish grammar I from BoliviaLas mejores tiendas, los
> precios mas bajos, entregas en todo el mundo, YupiMSN Compras:  Haz clic
> aquí...


-- 
Craig Miller
craig at millerfam.net





More information about the postgis-users mailing list