Configuring Amazon Elastic Beanstalk with PostGIS

前端 未结 6 946
自闭症患者
自闭症患者 2021-01-05 09:47

Does anyone have any experience setting up Amazon Elastic Beanstalk with PostGIS (so that I can take advantage of Geodjango)?

There are a number of features that th

6条回答
  •  滥情空心
    2021-01-05 10:11

    Open ssh shell of your aws beanstalk. Execute below command step by step. You will get working postgis.

    cd /home/ec2-user
    
    sudo yum -y install gcc gcc-c++ make cmake libtool libcurl-devel libxml2-devel rubygems swig fcgi-devel libtiff-devel freetype-devel curl-devel libpng-devel giflib-devel libjpeg-devel cairo-devel freetype-devel readline-devel openssl-devel python27 python27-devel
    
    # PROJ
    wget http://download.osgeo.org/proj/proj-4.8.0.tar.gz
    tar -zxvf proj-4.8.0.tar.gz
    cd proj-4.8.0
    ./configure
    make
    sudo make install
    cd ..
    
    # GEOS
    wget http://download.osgeo.org/geos/geos-3.4.2.tar.bz2
    tar -xvf geos-3.4.2.tar.bz2
    cd geos-3.4.2
    ./configure
    make
    sudo make install
    cd ..
    
    # GDAL
    wget http://download.osgeo.org/gdal/1.10.1/gdal-1.10.1.tar.gz
    tar -zxvf gdal-1.10.1.tar.gz
    cd gdal-1.10.1
    ./configure
    make
    sudo make install
    cd ..
    
    # PostGIS
    wget http://download.osgeo.org/postgis/source/postgis-2.1.0.tar.gz
    tar -xvf postgis-2.1.0.tar.gz
    cd postgis-2.1.0
    ./configure
    make
    sudo make install
    cd ..
    

    Then create a symbolic link:

    ln -s /usr/local/lib/libgdal.so /usr/lib/libgdal.so.1
    /sbin/ldconfig
    

提交回复
热议问题