Installing Apache Tomcat / Jenkins (Raspberry Pi)

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
Java 8 is installed
Java 8 is installed

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
Apache Tomcat is installed and displays the "It works!" page
Apache Tomcat is installed and displays the “It works!” page

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
Jenkins is configuring
Jenkins is configuring

 

Jenkins is ready
Jenkins is ready

 

4 responses to “Installing Apache Tomcat / Jenkins (Raspberry Pi)”

  1. Securing Apache Tomcat (Raspberry Pi) – Geek Tech Stuff Avatar

    […] 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 […]

    Like

  2. Using a Kindle as an eInk Clock (Java) – Geek Tech Stuff Avatar

    […] 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. […]

    Like

  3. Jenkins – Connecting To GitHub and some Python – Geek Tech Stuff Avatar

    […] 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 […]

    Like

Welcome to GeekTechStuff

my home away from home and where I will be sharing my adventures in the world of technology and all things geek.

The technology subjects have varied over the years from Python code to handle ciphers and Pig Latin, to IoT sensors in Azure and Python handling Bluetooth, to Ansible and Terraform and material around DevOps.

Let’s connect