Created
April 2, 2014 23:40
-
-
Save CARocha/9945550 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Please see the following blog post for a description of this cheatsheet: | |
# http://www.weogeo.com/blog/Tiles_a_la_WetSaw_Setting_up_the_WetSaw_Rendering_environment.html | |
# instantiate ami-08d97e61 as <del>micro</del> small or medium instace in Zone us-east-1d and then ssh to the instance | |
# Gotcha: micro instances don't have enough memory to compile mapnik: | |
# https://github.com/mapnik/mapnik/issues/1216 | |
# https://github.com/mapnik/mapnik/issues/1267 | |
# install post-release updates | |
sudo yum -y update | |
# Network tools | |
sudo yum -y install ssh* | |
# Dev Tools | |
sudo yum groupinstall -y 'Development Tools' | |
#to build from source there are more dependencies | |
sudo yum install -y boost-regex boost-system boost-python boost-filesystem boost-thread boost-devel | |
# pre-requisites for building GDAL | |
sudo yum install -y proj-epsg tar | |
#sudo yum install -y gdal # Gotcha! need to build from src with ./configure --with-libtiff=/usr/lib | |
curl -O http://download.osgeo.org/gdal/gdal-1.9.1.tar.gz | |
tar -xzf gdal-1.9.1.tar.gz | |
cd gdal-1.9.1 | |
./configure # GDAL's internal libtiff has support for BigTIFF | |
make | |
sudo make install | |
# yum install mapnik mapnik-devel mapnik-python # Gotcha! missing support for Gdal. compile below | |
# Python and spatial stuff | |
sudo yum -y install python-devel gdal gdal-python gdal-devel python-setuptools proj-epsg | |
# Mapnik and friends | |
#sudo yum -y install mapnik mapnik-devel mapnik-utils mapnik-python | |
sudo yum install -y gcc gcc-c++ | |
sudo yum install -y gsl | |
sudo yum install -y icu | |
sudo yum install -y proj-devel | |
sudo yum install -y libtool-ltdl-devel | |
sudo yum install -y libicu-devel | |
sudo yum install -y sqlite-devel | |
sudo yum install -y libxml2-devel | |
#sudo yum install -y gdal-devel | |
#sudo yum install -y libtiff-devel | |
sudo yum install -y pycairo-devel | |
sudo easy_install jonpy | |
#sudo easy_install lxml # FAIL | |
sudo STATIC_DEPS=true easy_install lxml # FTW! | |
sudo easy_install ipython | |
sudo easy_install nik2img | |
sudo easy_install Nikweb | |
sudo easy_install nose | |
sudo easy_install numscons | |
sudo yum install -y readline-devel # in the hopes that this will fix Python package readline | |
#sudo easy_install readline # FAILs but might not be needed | |
sudo easy_install PIL | |
sudo yum install -y libtool-ltdl | |
sudo yum install -y libjpeg-devel # fixes missing dependency jpeg (JPEG C library) | |
sudo yum install -y tar | |
#### MAPNIK | |
cd /usr/local/src | |
sudo git clone https://github.com/mapnik/mapnik.git | |
cd mapnik | |
sudo chown -R ec2-user:ec2-user /usr/local/src/mapnik/ | |
sudo python scons/scons.py configure INPUT_PLUGINS=shape,gdal,ogr,sqlite | |
make | |
sudo make install | |
#there's a bug where the mapnik python packages can't be found. To fix: | |
#- Create /etc/ld.so.conf.d/mapnik.conf with contents: /usr/local/lib | |
#- sudo ldconfig | |
#mapnik should now be accessible from inside python | |
#### WeoGeo | |
# Now that setuptools is installed, use it to install pip | |
sudo easy_install pip | |
# now install fiona with pip | |
sudo pip install fiona WeoGeoAPI | |
# Clone WetSaw | |
git clone git://github.com/WeoGeo/wetsaw.git |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment