[postgis-users] Re: Compiliing PostGIS vs PostgresSQL

Steve Rector srector at dgso.org
Tue Oct 7 11:53:45 PDT 2003


This is what I have used on Mandrake, it should work similarly on redhat.
Before rebuilding postgresql you will need to make sure the dependencies
are satisfied. This may require installing additional rpms.1). Install the postgresql source rpm.
2). cd to /usr/src/redhat/SPECS
3). do an rpmbuild -bb postgresql.spec (command may be different on redhat)
4). cd to /usr/src/redhat/BUILD/postgresql-7.3.2/contrib
5). copy your postgis source to the contrib directory
6). untar your source in contrib (tar xvfz postgis-xxx.tar.gz)
7). change to the postgis directory created.
8). do a make and make install
9). check that it installed in the proper directories. It may install with
the prefix /usr/local10). If necessary change to install location and copy files to proper
directories.11). On mandrake libraries should be in /usr/lib/pgsql
12). On mandrake pgsql2shp and shp2pgsql should be in /usr/bin
13). On mandrake contrib files are in /usr/share/pgsql/contrib
14). If libraries are not in correct location the postgis.sql file will
kick up errors when trying to create the tables.
Redhat should be similar, but YMMV. Hope this helps. If you are going to
use geos you will need to add the LDFLAGS=-lstdc++ before the configure
line in your postgresql.spec file and rebuild and install postgresql
first.
Steve
> Send postgis-users mailing list submissions to
> 	postgis-users at postgis.refractions.net
>
> To subscribe or unsubscribe via the World Wide Web, visit
> 	http://postgis.refractions.net/mailman/listinfo/postgis-users
> or, via email, send a message with subject or body 'help' to
> 	postgis-users-request at postgis.refractions.net
>
> You can reach the person managing the list at
> 	postgis-users-owner at postgis.refractions.net
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of postgis-users digest..."
>
>
> Today's Topics:
>
>   1. Re: Compiliing PostGIS vs PostgresSQL (Emilio Mayorga)
>   2. RE: Compiliing PostGIS vs PostgresSQL (Darren Houston)
>
>
> ----------------------------------------------------------------------
>
> Date: Mon, 06 Oct 2003 22:15:18 -0700
> From: Emilio Mayorga <emiliom at u.washington.edu>
> To: postgis-users at postgis.refractions.net
> Subject: Re: [postgis-users] Compiliing PostGIS vs PostgresSQL
> Message-ID: <3F824BE6.6060400 at u.washington.edu>
> Content-Type: text/plain; charset=us-ascii; format=flowed
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Precedence: list
> Reply-To: PostGIS Users Discussion
> <postgis-users at postgis.refractions.net> Message: 1
>
>
> Darren,
>
> Could you post your instructions to the list? I am exactly in the same
> situation as Danny (RedHat 8, upgraded PostgreSQL to 7.3.2 from an
> RPM).  It'd be great not to have to reinstall PostgreSQL.
>
> Thanks.
>
> -Emilio
>
>
> ---------------------- multipart/alternative attachment
> Hello Danny.
>
> You don't have to re-install PostgreSQL from source. What you can do is
> compile PostgreSQL from source to mimick your RedHat installation. I'll
>  send another e-mail in 1 hour telling you how.
>
>
> ------------------------------
>
> Date: Tue, 07 Oct 2003 00:21:53 -0600
> From: Darren Houston <darren.houston at edu.sait.ca>
> To: 'Emilio Mayorga ' <emiliom at u.washington.edu>,
> 	<postgis-users at postgis.refractions.net>
> Subject: RE: [postgis-users] Compiliing PostGIS vs PostgresSQL
> Message-ID:
> <C7DEE42B9B49D211AA8000A0C9ADFB3003535CDD at bus5.is.sait.ab.ca>
> Content-Type: multipart/alternative;
> boundary="Boundary_(ID_NRHEOIWUaW6/5u9SG6HMqA)"
> MIME-Version: 1.0
> Precedence: list
> Reply-To: PostGIS Users Discussion
> <postgis-users at postgis.refractions.net> Message: 2
>
> This message is in MIME format. Since your mail reader does not
> understand this format, some or all of this message may not be legible.
>
> --Boundary_(ID_NRHEOIWUaW6/5u9SG6HMqA)
> Content-type: text/plain; charset=iso-8859-1
> Content-transfer-encoding: 7BIT
>
> Sorry everyone. I e-mailed these instructions many hours ago, but only
> to myself, so I thought it was from the Users' list when the message
> showed in my inbox.
>
> Here are my instructions for installing PostGIS with the default
> PostgreSQL from RPM and/or fresh Linux operating system install.
>
> You should already have a PostgreSQL directory structure such as this
> in your system;
>
> /usr/include/pgsql
>
> /usr/share/pgsql
>
> /usr/lib/pgsql
>
> /var/lib/pgsql
>
> Now, you can install PostGIS into these directories or you can mimic a
> PostgreSQL install in another directory such as /usr/local/pgsql. I
> like to install PostGIS alone in /usr/local/pgsql to make it easier for
> updates. I'll give instructions for both methods. Make sure PostgreSQL
> is shut down (no postmaster process running).
>
> For PostGIS installation into /usr/local/pgsql;
>
> 1) Download postgresql-7.X.X.tar.gz, un-zip and un-tar (match the
> current version of PostgreSQL installed on your system).
>
> 2) Run the configure script with --prefix=/usr/local/pgsql and then run
> make. You don't need to run make install.
>
> 3) Create these directories manually;
>
>   /usr/local/pgsql/bin
>   /usr/local/pgsql/doc
>   /usr/local/pgsql/include
>   /usr/local/pgsql/lib
>   /usr/local/pgsql/man
>   /usr/local/pgsql/share
>
> 4) Install PostGIS as per Refractions instructions.
>
> You will notice PostGIS sitting in the directories in /usr/local/pgsql.
> I like to enter each directory and copy the PostGIS files to a folder
> in that directory stipulating PostGIS's version. This is how I keep
> multiple PostGIS versions on my system.
>
> For PostGIS installation into default RedHat (and other Linux versions)
> PostgreSQL install;
>
> 1) Move the following directories to *.bak (or some other name)
>
>   mv /usr/include/pgsql /usr/include/pgsql.bak
>      /usr/share/pgsql
>      /usr/lib/pgsql
>      /var/lib/pgsql
>
> You have to move the directories because PostgreSQL will see those
> directories and then configure itself to install to /*/*/postgres
> instead of /*/*/pgsql.
>
> 2) Download postgresql-7.X.X.tar.gz, un-zip and un-tar (match the
> current version of PostgreSQL installed on your system).
>
> 3) Run the configure script with --prefix=/usr and then run make. You
> don't need to run make install.
>
> 4) Move the previous directories to their original names
>
>   mv /usr/include/pgsql.bak /usr/include/pgsql
>
> 5) Install PostGIS as per Refractions instructions.
>
> Hope this has enough info. E-mail me if you get in a bind and I'll help
> you out.
>
> Darren H.
>
> --Boundary_(ID_NRHEOIWUaW6/5u9SG6HMqA)
> Content-type: text/html; charset=iso-8859-1
> Content-transfer-encoding: 7BIT
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
> <HTML>
> <HEAD>
> <META HTTP-EQUIV="Content-Type" CONTENT="text/html;
> charset=iso-8859-1"> <META NAME="Generator" CONTENT="MS Exchange Server
> version 5.5.2653.12"> <TITLE>RE: [postgis-users] Compiliing PostGIS vs
> PostgresSQL</TITLE> </HEAD>
> <BODY>
>
> <P><FONT SIZE=2>Sorry everyone. I e-mailed these instructions many
> hours ago, but only to myself, so I thought it was from the Users' list
> when the message showed in my inbox.</FONT></P>
>
> <P><FONT SIZE=2>Here are my instructions for installing PostGIS with
> the default PostgreSQL from RPM and/or fresh Linux operating system
> install. </FONT></P>
>
> <P><FONT SIZE=2>You should already have a PostgreSQL directory
> structure such as this in your system;</FONT> </P>
>
> <P><FONT SIZE=2>/usr/include/pgsql </FONT>
> </P>
>
> <P><FONT SIZE=2>/usr/share/pgsql </FONT>
> </P>
>
> <P><FONT SIZE=2>/usr/lib/pgsql </FONT>
> </P>
>
> <P><FONT SIZE=2>/var/lib/pgsql </FONT>
> </P>
>
> <P><FONT SIZE=2>Now, you can install PostGIS into these directories or
> you can mimic a PostgreSQL install in another directory such as
> /usr/local/pgsql. I like to install PostGIS alone in /usr/local/pgsql
> to make it easier for updates. I'll give instructions for both methods.
> Make sure PostgreSQL is shut down (no postmaster process
> running).</FONT></P>
>
> <P><FONT SIZE=2>For PostGIS installation into /usr/local/pgsql; </FONT>
> </P>
>
> <P><FONT SIZE=2>1) Download postgresql-7.X.X.tar.gz, un-zip and un-tar
> (match the current version of PostgreSQL installed on your system).
> </FONT></P>
>
> <P><FONT SIZE=2>2) Run the configure script with
> --prefix=/usr/local/pgsql and then run make. You don't need to run make
> install.</FONT> </P>
>
> <P><FONT SIZE=2>3) Create these directories manually; </FONT>
> </P>
>
> <P><FONT SIZE=2>   /usr/local/pgsql/bin </FONT>
> <BR><FONT SIZE=2>   /usr/local/pgsql/doc </FONT>
> <BR><FONT SIZE=2>   /usr/local/pgsql/include </FONT>
> <BR><FONT SIZE=2>   /usr/local/pgsql/lib </FONT>
> <BR><FONT SIZE=2>   /usr/local/pgsql/man </FONT>
> <BR><FONT SIZE=2>   /usr/local/pgsql/share </FONT>
> </P>
>
> <P><FONT SIZE=2>4) Install PostGIS as per Refractions instructions.
> </FONT> </P>
>
> <P><FONT SIZE=2>You will notice PostGIS sitting in the directories in
> /usr/local/pgsql. I like to enter each directory and copy the PostGIS
> files to a folder in that directory stipulating PostGIS's version. This
> is how I keep multiple PostGIS versions on my system.</FONT></P>
>
> <P><FONT SIZE=2>For PostGIS installation into default RedHat (and other
> Linux versions) PostgreSQL install; </FONT> </P>
>
> <P><FONT SIZE=2>1) Move the following directories to *.bak (or some
> other name) </FONT> </P>
>
> <P><FONT SIZE=2>   mv /usr/include/pgsql
> /usr/include/pgsql.bak </FONT> <BR><FONT
> SIZE=2>      /usr/share/pgsql </FONT>
> <BR><FONT SIZE=2>      /usr/lib/pgsql </FONT>
> <BR><FONT SIZE=2>      /var/lib/pgsql </FONT>
> </P>
>
> <P><FONT SIZE=2>You have to move the directories because PostgreSQL
> will see those directories and then configure itself to install to
> /*/*/postgres instead of /*/*/pgsql.</FONT></P>
>
> <P><FONT SIZE=2>2) Download postgresql-7.X.X.tar.gz, un-zip and un-tar
> (match the current version of PostgreSQL installed on your system).
> </FONT></P>
>
> <P><FONT SIZE=2>3) Run the configure script with --prefix=/usr and then
> run make. You don't need to run make install. </FONT> </P>
>
> <P><FONT SIZE=2>4) Move the previous directories to their original
> names </FONT> </P>
>
> <P><FONT SIZE=2>   mv /usr/include/pgsql.bak
> /usr/include/pgsql </FONT> </P>
>
> <P><FONT SIZE=2>5) Install PostGIS as per Refractions instructions.
> </FONT> </P>
>
> <P><FONT SIZE=2>Hope this has enough info. E-mail me if you get in a
> bind and I'll help you out. </FONT> </P>
>
> <P><FONT SIZE=2>Darren H.</FONT>
> </P>
>
> </BODY>
> </HTML>
>
> --Boundary_(ID_NRHEOIWUaW6/5u9SG6HMqA)--
>
> ------------------------------
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
> End of postgis-users Digest, Vol 12, Issue 3
> ********************************************








More information about the postgis-users mailing list