OpenGeo Suite Linux Server Installation

In this post we want to explain how OpenGeo Suite can be easily and rapidly installed in a linux box. We assume to work on Linux but the same can be applied to Windows servers or Mac OS X machines equipped with a specific package.
However, given that we worked with several linux installations and that such installations are the most proper choice for the management in production environment, we now describe how it is easy to install it through an APT-GET repository.
Hereafter is our Ubuntu target server description [as VMware virtual machine on ESXi infrastructure]:

Server Value
OS Ubuntu 10.04 Linux 32-bit
Virtual Memory 2 GB
Virtual CPU 1

Run the following command shell as sudo.

First of all, import OpenGeo GPG key by executing:
[crayon lang=”bash”]
$ sudo wget -qO- http://apt.opengeo.org/gpg.key | apt-key add –
[/crayon]
Tip: Since sometime an error associated with “apt-key” command is displayed, check if some distro treats pipe differently and retype “sudo” or alternatively split that up.
[crayon lang=”bash”]
$ sudo wget -qO- http://apt.opengeo.org/gpg.key > gpg.key
$ sudo apt-key add gpg.key
[/crayon]
Add the APT repository for OpenGeo Suite:
[crayon lang=”bash”]
$ sudo echo “deb http://apt.opengeo.org/ubuntu lucid main” >> /etc/apt/sources.list
[/crayon]

Update APT:
[crayon lang=”bash”]
$ sudo apt-get update
[/crayon]

Execute a search for packages available:
[crayon lang=”bash”]
$ sudo apt-cache search opengeo
[/crayon]
Tip: The search has to return at least one result otherwise the repository hasn’t been added correctly.

Make OpenGeo Suite package (opengeo-suite) installed:
[crayon lang=”bash”]
$ sudo apt-get install opengeo-suite
[/crayon]

Post installation

Once the installation process is ended you can display the applications provided by the suite through an Apache Web Server.
To do this, enable a proxy into Apache. First of all, create a suitable configuration for it:
[crayon lang=”bash”]
$ 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
[/crayon]

Then add a proxy-pass configuration for the local Tomcat container by setting:
[crayon lang=”bash”]
$ 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 ‘‘ >> /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 ‘
‘ >> /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 /geoeditor http://localhost:8080/geoeditor’ >> /etc/apache2/sites-available/default”
$ sudo sh -c “echo ‘ProxyPassReverse /geoeditor http://localhost:8080/geoeditor’ >> /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 ‘ProxyPass /opengeo-docs http://localhost:8080/opengeo-docs’ >> /etc/apache2/sites-available/default”
$ sudo sh -c “echo ‘ProxyPassReverse /opengeo-docs http://localhost:8080/opengeo-docs’ >> /etc/apache2/sites-available/default”
$ sudo sh -c “echo ‘ ‘ >> /etc/apache2/sites-available/default”
$ sudo sh -c “echo ‘‘ >> /etc/apache2/sites-available/default”
[/crayon]

Alternatively, use the script at this location here.

Finally, restart Apache by executing:
[crayon lang=”bash”]
$ sudo service apache2 restart
[/crayon]