Last active
August 29, 2015 13:56
-
-
Save kehh/9130507 to your computer and use it in GitHub Desktop.
Install opengeo suite
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 | |
# setup repository | |
sudo wget -qO- http://apt.opengeo.org/gpg.key | apt-key add - | |
sudo chmod 655 /etc/apt/sources.list | |
sudo echo "deb http://apt.opengeo.org/suite/v4/ubuntu precise main" >> /etc/apt/sources.list | |
sudo chmod 644 /etc/apt/sources.list | |
sudo apt-get update | |
# install opengeo suite | |
sudo apt-get -y install opengeo-suite | |
# install and config apache | |
sudo apt-get install -y apache2 | |
sudo ln -s /etc/apache2/mods-available/proxy.conf /etc/apache2/mods-enabled/proxy.conf | |
sudo ln -s /etc/apache2/mods-available/proxy.load /etc/apache2/mods-enabled/proxy.load | |
sudo ln -s /etc/apache2/mods-available/proxy_http.load /etc/apache2/mods-enabled/proxy_http.load | |
# add tomcat proxy | |
sudo chmod 666 /etc/apache2/sites-available/default | |
sudo sed -i '$d' /etc/apache2/sites-available/default | |
sudo sh -c "echo ' ' >> /etc/apache2/sites-available/default" | |
sudo sh -c "echo 'ProxyRequests Off' >> /etc/apache2/sites-available/default" | |
sudo sh -c "echo '# Remember to turn the next line off if you are proxying to a NameVirtualHost' >> /etc/apache2/sites-available/default" | |
sudo sh -c "echo 'ProxyPreserveHost On' >> /etc/apache2/sites-available/default" | |
sudo sh -c "echo ' ' >> /etc/apache2/sites-available/default" | |
sudo sh -c "echo '<Proxy *>' >> /etc/apache2/sites-available/default" | |
sudo sh -c "echo ' Order deny,allow' >> /etc/apache2/sites-available/default" | |
sudo sh -c "echo ' Allow from all' >> /etc/apache2/sites-available/default" | |
sudo sh -c "echo '</Proxy>' >> /etc/apache2/sites-available/default" | |
sudo sh -c "echo ' ' >> /etc/apache2/sites-available/default" | |
sudo sh -c "echo 'ProxyPass /geoserver http://localhost:8080/geoserver' >> /etc/apache2/sites-available/default" | |
sudo sh -c "echo 'ProxyPassReverse /geoserver http://localhost:8080/geoserver' >> /etc/apache2/sites-available/default" | |
sudo sh -c "echo 'ProxyPass /geoexplorer http://localhost:8080/geoexplorer' >> /etc/apache2/sites-available/default" | |
sudo sh -c "echo 'ProxyPassReverse /geoexplorer http://localhost:8080/geoexplorer' >> /etc/apache2/sites-available/default" | |
sudo sh -c "echo 'ProxyPass /geowebcache http://localhost:8080/geowebcache' >> /etc/apache2/sites-available/default" | |
sudo sh -c "echo 'ProxyPassReverse /geowebcache http://localhost:8080/geowebcache' >> /etc/apache2/sites-available/default" | |
sudo sh -c "echo 'ProxyPass /dashboard http://localhost:8080/dashboard' >> /etc/apache2/sites-available/default" | |
sudo sh -c "echo 'ProxyPassReverse /dashboard http://localhost:8080/dashboard' >> /etc/apache2/sites-available/default" | |
sudo sh -c "echo 'ProxyPass /recipes http://localhost:8080/recipes' >> /etc/apache2/sites-available/default" | |
sudo sh -c "echo 'ProxyPassReverse /recipes http://localhost:8080/recipes' >> /etc/apache2/sites-available/default" | |
sudo sh -c "echo ' ' >> /etc/apache2/sites-available/default" | |
sudo sh -c "echo '</VirtualHost>' >> /etc/apache2/sites-available/default" | |
sudo chmod 644 /etc/apache2/sites-available/default | |
sudo apachectl restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment