Created
October 15, 2020 14:02
-
-
Save fgianoli/3bad62b22298fcfaad412e2c860e738c to your computer and use it in GitHub Desktop.
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
------------------------------ | |
INSTALL GEOSERVER UNDER TOMCAT 8 | |
------------------------------ | |
//Install JAVA 8 for Geoserver | |
apt install openjdk-8-jdk | |
//Install Tomcat8 https://www.digitalocean.com/community/tutorials/how-to-install-apache-tomcat-8-on-ubuntu-16-04 | |
groupadd tomcat | |
sudo useradd -s /bin/false -g tomcat -d /opt/tomcat tomcat | |
mkdir /opt/tomcat | |
chmod -R 775 tomcat | |
chown -R tomcat:tomcat ./tomcat | |
cd /opt/tomcat | |
wget http://apache.spinellicreations.com/tomcat/tomcat-8/v8.5.54/bin/apache-tomcat-8.5.54.tar.gz //get the most updated link of tomcat here: https://tomcat.apache.org/download-80.cgi | |
tar xvzf apache-tomcat-8.5.54.tar.gz | |
nano ~/.bashrc // add to this file the following settings | |
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64 //pay attention to the name of the java version | |
export CATALINA_HOME=/opt/tomcat/apache-tomcat-8.5.54 | |
. ~/.bashrc | |
// to check if Tomcat8 is running | |
$CATALINA_HOME/bin/startup.sh | |
// create tomcat8 service file under: | |
nano /etc/systemd/system/tomcat.service | |
//paste these line, be carefull to the names of the packages | |
[Unit] | |
Description=Apache Tomcat Web Application Container | |
After=network.target | |
[Service] | |
Type=forking | |
Environment=JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64/jre | |
Environment=CATALINA_PID=/opt/tomcat/apache-tomcat-8.5.54/temp/tomcat.pid | |
Environment=CATALINA_HOME=/opt/tomcat/apache-tomcat-8.5.54 | |
Environment=CATALINA_BASE=/opt/tomcat/apache-tomcat-8.5.54 | |
Environment='CATALINA_OPTS=-Xms8192M -Xmx2048M -server -XX:+UseParallelGC' | |
Environment='JAVA_OPTS=-Djava.awt.headless=true -Djava.security.egd=file:/dev/./urandom' | |
ExecStart=/opt/tomcat/apache-tomcat-8.5.54/bin/startup.sh | |
ExecStop=/opt/tomcat/apache-tomcat-8.5.54/bin/shutdown.sh | |
User=tomcat | |
Group=tomcat | |
UMask=0007 | |
RestartSec=10 | |
Restart=always | |
[Install] | |
WantedBy=multi-user.target | |
// INSTALL GEOSERVER under Tomcat8 | |
// https://docs.geoserver.org/stable/en/user/installation/war.html#installation-war | |
cd //opt/tomcat/apache-tomcat-8.5.54/webapps | |
wget https://sourceforge.net/projects/geoserver/files/GeoServer/2.17.0/geoserver-2.17.0-war.zip | |
apt install unzip | |
unzip geoserver-2.17.0-war.zip | |
reboot tomcat |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment