Last active
August 29, 2015 14:14
-
-
Save gpprojekt-marcin/72ed148c20b8da814b09 to your computer and use it in GitHub Desktop.
GIS
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
#!/bin/bash |
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
#!/bin/bash | |
#ADD SOFTWARE SOURCES | |
#Mosh - Mobile Shell | |
echo "deb http://ppa.launchpad.net/keithw/mosh/ubuntu trusty main" | tee /etc/apt/sources.list.d/mosh.list && \ | |
echo "deb-src http://ppa.launchpad.net/keithw/mosh/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/mosh.list && \ | |
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 7BF6DFCD | |
#Ubuntu GIS | |
echo "deb http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu trusty main" | tee /etc/apt/sources.list.d/ubuntugis.list && \ | |
echo "deb-src http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/ubuntugis.list && \ | |
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 314DF160 | |
#PostGIS | |
echo 'deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main' $PG_MAJOR > /etc/apt/sources.list.d/pgdg.list | |
gpg --keyserver pgp.mit.edu --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 | |
apt-key adv --keyserver pgp.mit.edu --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8 | |
#Java | |
echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | debconf-set-selections && \ | |
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list && \ | |
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list && \ | |
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886 | |
apt-get update && apt-get upgrade && apt-get install unattended-upgrades | |
#SOFTWARE INSTALATION | |
#Apache2, mapservers & utilities | |
apt-get install -y apache2 mapserver-bin cgi-mapserver libapache2-mod-fcgid qgis-server git php5 php5-dev php-pear mosh php5-imagick imagemagick locales | |
echo "ServerName localhost" >> /etc/apache2/apache2.conf | |
#PostGIS | |
localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 | |
export LANG=en_US.utf8 | |
export PG_MAJOR=9.4 | |
apt-get install -y postgresql-common && sed -ri 's/#(create_main_cluster) .*$/\1 = false/' /etc/postgresql-common/createcluster.conf | |
apt-get install -y postgresql-$PG_MAJOR postgresql-contrib-$PG_MAJOR postgresql-$PG_MAJOR-postgis-2.1 | |
#Java & Tomcat + Mapfish print.war | |
apt-get install -y oracle-java8-installer oracle-java8-set-default | |
update-java-alternatives -s java-8-oracle | |
#export TOMCAT_VERSION=8.0.15 | |
#wget http://archive.apache.org/dist/tomcat/tomcat-8/v${TOMCAT_VERSION}/bin/apache-tomcat-${TOMCAT_VERSION}.tar.gz -O #/tmp/catalina.tar.gz && tar xzf /tmp/catalina.tar.gz -C /opt && ln -s /opt/apache-tomcat-${TOMCAT_VERSION} /opt/tomcat && rm #/tmp/catalina.tar.gz | |
#export CATALINA_HOME=/opt/tomcat | |
#export PATH=$PATH:$CATALINA_HOME/bin | |
#echo 'export CATALINA_HOME=/opt/tomcat' > /opt/tomcat/bin/setenv.sh | |
#echo 'export JAVA_HOME=/usr/lib/jvm/java-8-oracle' >> /opt/tomcat/bin/setenv.sh | |
#echo 'export JAVA_OPTS="-Djava.awt.headless=true -server -Xmx2048M -Xms64m -XX:MaxPermSize=256m"' >> /opt/tomcat/bin/setenv.sh | |
#chmod +x /opt/tomcat/bin/setenv.sh | |
apt-get install -y tomcat7 | |
echo 'export JAVA_HOME=/usr/lib/jvm/java-8-oracle' >> /usr/share/tomcat7/bin/setenv.sh | |
echo 'export JAVA_OPTS="-Djava.awt.headless=true -server -Xmx2048M -Xms64m -XX:MaxPermSize=256m"' >> /usr/share/tomcat7/bin/setenv.sh | |
chmod +x /usr/share/tomcat7/bin/setenv.sh | |
#wget https://repo1.maven.org/maven2/org/mapfish/print/print-servlet/2.1.0/print-servlet-2.1.0.war -O print.war | |
wget https://repo1.maven.org/maven2/org/mapfish/print/print-servlet/2.1.0/print-servlet-2.1.0-IMG-MAGICK.war -O print.war | |
#wget https://repo1.maven.org/maven2/org/mapfish/print/print-servlet/3.0/print-servlet-3.0.war -O print.war | |
mv print.war /var/lib/tomcat7/webapps/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment