Previously I have looked at Flask (Python) and Django (Python) web servers running on the Raspberry Pi. Today I am going to look at Apache Tomcat, a web server which is more geared towards running Java based applications.
I’m currently looking at Java and so will be using the JDK on my Raspberry Pi. For this install I am using a Raspberry Pi 3 and Raspbian Stretch.
Install Java Development Kit (JDK)
- sudo apt-get update
- sudo apt-get install default-jdk
- java -version
- sudo nano /etc/environment

Install Apache Tomcat
- https://tomcat.apache.org/whichversion.html
- sudo apt-get install tomcat8
- Open a web browser and navigate to the your Raspberry Pis IP address with :8080 on the end, if you need to find the ip address open terminal and type ifconfig. The :8080 is to tell the browser to connect to the port 8080

Installing a webapp (Jenkins in this example)
Java webapps come in .war format. For this example I’m using Jenkins (https://jenkins.io/download/).
- Download the .war file from https://jenkins.io/download/
- Copy the file from the download location to /var/lib/tomcat8/webapps e.g. sudo cp /home/pi/Downloads/jenkins.war /var/lib/tomcat8/webapps/
- Open a browser to the Raspberry Pi IP address, port 8080 (:8080), /jenkins/
- Jenkins requires a key (the initial page says where the secrets file is) and then it is ready to configure







4 responses to “Installing Apache Tomcat / Jenkins (Raspberry Pi)”
[…] the Raspberry Pi running Apache Tomcat it is time to secure it. HTTP (non-secure) traffic may be okay for a closed home/test environment […]
LikeLike
[…] Handy post from Geek Tech Stuff. […]
LikeLike
[…] Earlier on today I used Python (via Flask, some HTML and my Raspberry Pi) to help turn my Amazon Kindle into an eInk digital clock. This was cool and I was happy until I decided I wanted to do the same thing via Java and TomCat. […]
LikeLike
[…] I originally looked at installing Jenkins as a Java web app on my Raspberry Pi during this post: https://geektechstuff.com/2019/05/26/installing-apache-tomcat-jenkins-raspberry-pi/ . I am now hoping to expand a little bit more on using Jenkins by building a freestyle project that […]
LikeLike