Refactor to use PostGIS database instead of gtfs tools
[busui.git] / postinstall
maxious 1 #!/bin/bash
maxious 2 #this script should be run from a fresh git checkout from github
maxious 3 #ami base must have yum install lighttpd-fastcgi, git, tomcat6
maxious 4 #screen php-cli php-gd tomcat6-webapps tomcat6-admin-webapps svn maven2
maxious 5 #http://www.how2forge.org/installing-lighttpd-with-php5-and-mysql-support-on-fedora-12
6
maxious 7 cp /root/aws.php /tmp/
maxious 8 mkdir /var/www/lib/staticmaplite/cache
maxious 9 chcon -h system_u:object_r:httpd_sys_content_t /var/www
10 chcon -R -h root:object_r:httpd_sys_content_t /var/www/*
Maxious 11 chcon -R -t httpd_sys_content_rw_t /var/www/lib/staticmaplite/cache
12 chmod -R 777 /var/www/lib/staticmaplite/cache
maxious 13 wget http://s3-ap-southeast-1.amazonaws.com/busresources/cbrfeed.zip \
14 -O /var/www/cbrfeed.zip
maxious 15
16 createdb transitdata
17 #made with pg_dump transitdata | gzip -c > transitdata.cbrfeed.sql.gz
18 gunzip /var/www/transitdata.cbrfeed.sql.gz
19 psql -d transitdata -f /var/www/transitdata.cbrfeed.sql
20 createlang -d transitdata plpgsql
21 psql -d transitdata -f /var/www/lib/postgis.sql
22 php /var/www/updatedb.php
maxious 23
24 wget http://s3-ap-southeast-1.amazonaws.com/busresources/Graph.obj \
25 -O /tmp/Graph.obj
26 rm -rfv /usr/share/tomcat6/webapps/opentripplanner*
27 wget http://s3-ap-southeast-1.amazonaws.com/busresources/opentripplanner-webapp.war \
28 -O /usr/share/tomcat6/webapps/opentripplanner-webapp.war
29 wget http://s3-ap-southeast-1.amazonaws.com/busresources/opentripplanner-api-webapp.war \
30 -O /usr/share/tomcat6/webapps/opentripplanner-api-webapp.war
31 /etc/init.d/tomcat6 restart
32