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

 

3 thoughts on “Installing Apache Tomcat / Jenkins (Raspberry Pi)

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.