Created
June 6, 2013 18:56
-
-
Save jfirebaugh/5723962 to your computer and use it in GitHub Desktop.
OSM Rails Port install script for ami-c139a8f1
This file contains hidden or 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
sudo gem install bundler | |
git clone git://github.com/openstreetmap/openstreetmap-website.git | |
cd openstreetmap-website/ | |
sudo bundle install | |
cp config/example.application.yml config/application.yml | |
cp config/example.database.yml config/database.yml | |
<edit database.yml: openstreetmap/openstreetmap> | |
bundle exec rake db:create | |
psql -d openstreetmap -c "CREATE EXTENSION btree_gist;" | |
psql -d osm_test -c "CREATE EXTENSION btree_gist;" | |
bundle exec rake db:migrate | |
cd db/functions | |
make libpgosm.so | |
psql -d openstreetmap -c "CREATE FUNCTION maptile_for_point(int8, int8, int4) RETURNS int4 AS '/home/ubuntu/openstreetmap-website/db/functions/libpgosm.so', 'maptile_for_point' LANGUAGE C STRICT;" | |
psql -d osm_test -c "CREATE FUNCTION maptile_for_point(int8, int8, int4) RETURNS int4 AS '/home/ubuntu/openstreetmap-website/db/functions/libpgosm.so', 'maptile_for_point' LANGUAGE C STRICT;" | |
psql -d openstreetmap -c "CREATE FUNCTION tile_for_point(int4, int4) RETURNS int8 AS '/home/ubuntu/openstreetmap-website/db/functions/libpgosm.so', 'tile_for_point' LANGUAGE C STRICT;" | |
psql -d osm_test -c "CREATE FUNCTION tile_for_point(int4, int4) RETURNS int8 AS '/home/ubuntu/openstreetmap-website/db/functions/libpgosm.so', 'tile_for_point' LANGUAGE C STRICT;" | |
psql -d openstreetmap -c "CREATE FUNCTION xid_to_int4(xid) RETURNS int4 AS '/home/ubuntu/openstreetmap-website/db/functions/libpgosm.so', 'xid_to_int4' LANGUAGE C STRICT;" | |
psql -d osm_test -c "CREATE FUNCTION xid_to_int4(xid) RETURNS int4 AS '/home/ubuntu/openstreetmap-website/db/functions/libpgosm.so', 'xid_to_int4' LANGUAGE C STRICT;" | |
cd ../.. | |
bundle exec rake test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment