Skip to content

Instantly share code, notes, and snippets.

@aserafin
Last active August 19, 2021 19:17
Show Gist options
  • Select an option

  • Save aserafin/fe367c743ddb4ef2ec45 to your computer and use it in GitHub Desktop.

Select an option

Save aserafin/fe367c743ddb4ef2ec45 to your computer and use it in GitHub Desktop.

Revisions

  1. aserafin revised this gist Oct 12, 2015. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions install.sh
    Original file line number Diff line number Diff line change
    @@ -30,6 +30,8 @@ make && make install
    chmod 777 /usr/local/lib/libSFCGAL.*
    cp /usr/local/lib/libSFCGAL.* /usr/lib/postgresql/9.4/lib

    ldconfig -v | grep -i sfcgal

    su - postgres
    psql -c "create database postgis_test;"
    psql postgis_test -c "create extension postgis;"
  2. aserafin revised this gist Oct 12, 2015. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion install.sh
    Original file line number Diff line number Diff line change
    @@ -27,7 +27,8 @@ cd postgis-2.1.8
    ./configure --with-sfcgal=/usr/local/bin/sfcgal-config
    make && make install

    chmod 755 /usr/local/lib/libSFCGAL.*
    chmod 777 /usr/local/lib/libSFCGAL.*
    cp /usr/local/lib/libSFCGAL.* /usr/lib/postgresql/9.4/lib

    su - postgres
    psql -c "create database postgis_test;"
  3. aserafin revised this gist Oct 12, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install.sh
    Original file line number Diff line number Diff line change
    @@ -22,7 +22,7 @@ cd ..

    # build postgis from source
    wget http://download.osgeo.org/postgis/source/postgis-2.1.8.tar.gz
    tar zxvf postgis-2.1.8
    tar zxvf postgis-2.1.8.tag.gz
    cd postgis-2.1.8
    ./configure --with-sfcgal=/usr/local/bin/sfcgal-config
    make && make install
  4. aserafin revised this gist Oct 10, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install.sh
    Original file line number Diff line number Diff line change
    @@ -27,7 +27,7 @@ cd postgis-2.1.8
    ./configure --with-sfcgal=/usr/local/bin/sfcgal-config
    make && make install

    chmod 755 libSFCGAL.*
    chmod 755 /usr/local/lib/libSFCGAL.*

    su - postgres
    psql -c "create database postgis_test;"
  5. aserafin revised this gist Oct 10, 2015. 1 changed file with 4 additions and 1 deletion.
    5 changes: 4 additions & 1 deletion install.sh
    Original file line number Diff line number Diff line change
    @@ -18,6 +18,7 @@ apt-get install -y postgresql-9.4
    wget https://github.com/Oslandia/SFCGAL/archive/v1.0.tar.gz
    tar zxvf v1.0.tar.gz
    cd SFCGAL-1.0 && cmake . && make && make install
    cd ..

    # build postgis from source
    wget http://download.osgeo.org/postgis/source/postgis-2.1.8.tar.gz
    @@ -26,8 +27,10 @@ cd postgis-2.1.8
    ./configure --with-sfcgal=/usr/local/bin/sfcgal-config
    make && make install

    chmod 755 libSFCGAL.*

    su - postgres
    psql -c "create database postgis_test;"
    psql postgis_test -c "create extension postgis;"
    psql postgis_test < /usr/share/postgresql/9.4/contrib/postgis-2.1/sfcgal.sql
    psql -c "select postgis_sfcgal_version();"
    psql postgis_test -c "select postgis_sfcgal_version();"
  6. aserafin revised this gist Oct 8, 2015. 1 changed file with 5 additions and 10 deletions.
    15 changes: 5 additions & 10 deletions install.sh
    Original file line number Diff line number Diff line change
    @@ -2,27 +2,22 @@

    # add postgresql official repository to apt
    apt-get update
    /etc/apt/sources.list << "deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main"
    echo "deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main" >> /etc/apt/sources.list
    wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
    apt-get update

    # install required libraries
    apt-get install -y autoconf build-essential cmake docbook-mathml docbook-xsl libboost-dev libboost-thread-dev libboost-filesystem-dev libboost-system-dev libboost-iostreams-dev libboost-program-options-dev libboost-timer-dev libcunit1-dev libgdal-dev libgeos++-dev libgeotiff-dev libgmp-dev libjson0-dev libjson-c-dev liblas-dev libmpfr-dev libopenscenegraph-dev libpq-dev libproj-dev libxml2-dev postgresql-server-dev-9.4 xsltproc git build-essential wget

    # add cfgal debian repositories to sources list
    /etc/apt/sources.list << "deb http://debian.cgal.org jessie main"
    /etc/apt/sources.list << "deb-src http://debian.cgal.org jessie main"
    apt-get update
    apt-get install libcgal11 libcgal-dev
    apt-get install -y libcgal-dev

    # install postgresql-9.4 server
    apt-get install postgresql-9.4
    apt-get install -y postgresql-9.4

    # build sfcgal from source
    wget https://github.com/Oslandia/SFCGAL/archive/v1.0.tar.gz
    tar zxvf v1.0.0.tar.gz
    cd SFCGAL-1.0.0 && cmake . && make && make install
    tar zxvf v1.0.tar.gz
    cd SFCGAL-1.0 && cmake . && make && make install

    # build postgis from source
    wget http://download.osgeo.org/postgis/source/postgis-2.1.8.tar.gz
  7. aserafin revised this gist Oct 8, 2015. 1 changed file with 24 additions and 1 deletion.
    25 changes: 24 additions & 1 deletion install.sh
    Original file line number Diff line number Diff line change
    @@ -6,10 +6,33 @@ apt-get update
    wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
    apt-get update
    # install require libraries
    # install required libraries
    apt-get install -y autoconf build-essential cmake docbook-mathml docbook-xsl libboost-dev libboost-thread-dev libboost-filesystem-dev libboost-system-dev libboost-iostreams-dev libboost-program-options-dev libboost-timer-dev libcunit1-dev libgdal-dev libgeos++-dev libgeotiff-dev libgmp-dev libjson0-dev libjson-c-dev liblas-dev libmpfr-dev libopenscenegraph-dev libpq-dev libproj-dev libxml2-dev postgresql-server-dev-9.4 xsltproc git build-essential wget
    # add cfgal debian repositories to sources list
    /etc/apt/sources.list << "deb http://debian.cgal.org jessie main"
    /etc/apt/sources.list << "deb-src http://debian.cgal.org jessie main"
    apt-get update
    apt-get install libcgal11 libcgal-dev
    # install postgresql-9.4 server
    apt-get install postgresql-9.4
    # build sfcgal from source
    wget https://github.com/Oslandia/SFCGAL/archive/v1.0.tar.gz
    tar zxvf v1.0.0.tar.gz
    cd SFCGAL-1.0.0 && cmake . && make && make install
    # build postgis from source
    wget http://download.osgeo.org/postgis/source/postgis-2.1.8.tar.gz
    tar zxvf postgis-2.1.8
    cd postgis-2.1.8
    ./configure --with-sfcgal=/usr/local/bin/sfcgal-config
    make && make install
    su - postgres
    psql -c "create database postgis_test;"
    psql postgis_test -c "create extension postgis;"
    psql postgis_test < /usr/share/postgresql/9.4/contrib/postgis-2.1/sfcgal.sql
    psql -c "select postgis_sfcgal_version();"
  8. aserafin revised this gist Oct 8, 2015. 1 changed file with 6 additions and 0 deletions.
    6 changes: 6 additions & 0 deletions install.sh
    Original file line number Diff line number Diff line change
    @@ -7,3 +7,9 @@ wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-
    apt-get update
    # install require libraries
    # install postgresql-9.4 server
    apt-get install postgresql-9.4
    # build sfcgal from source
  9. aserafin revised this gist Oct 8, 2015. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions install.sh
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,9 @@
    #!/bin/bash

    # add postgresql official repository to apt
    apt-get update
    /etc/apt/sources.list << "deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main"
    wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
    apt-get update
    # install require libraries
  10. aserafin created this gist Oct 8, 2015.
    7 changes: 7 additions & 0 deletions install.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    #!/bin/bash

    apt-get update
    /etc/apt/sources.list << "deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main"
    wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
    apt-get update