Jenkins

Install Jenkins with WAR Files

A WAR (Web Application Archive) file is a package file which contains a collection of Java-based web applications, resources, and servlets that can be bundled and deployed to a web server or servlet container.

It is a JAR (Java Archive) file which is designed to be deployed to a web server or servlet container. It is typically used to package and deploy the Java Servlets, JSPs (JavaServer Pages), and other resources that make up a Java-based web application.

The Jenkins Web application Archive (WAR) file bundles Winstone which is a Jetty servlet container wrapper. This allows the WAR file to be run on any platform with a supported installed Java version.

In this tutorial, we will discuss how we can install Jenkins using the provided WAR file.

Requirements:

Minimum hardware requirements:

  1. 256 MB of RAM
  2. 1 GB of drive space.

For demonstration, we will use a Debian 11 server.

Install the Java JDK on Debian 11

We need to install the Java JDK on our target system to work with WAR files. To install the OpenJDK on Debian, use the following command:

Start by updating the package manager index:

sudo apt update

Install OpenJDK using the package manager:

sudo apt install openjdk-14-jdk

This installs the OpenJDK 14 JDK (Java Development Kit) package and its dependencies.

Verify the installation by checking the version of the Java compiler:

javac -version

This should print the version number of the Java compiler, indicating that the JDK is installed and is working correctly.

Once complete, we can proceed and run the Jenkins from the WAR file.

Run Jenkins Using the WAR File

Start by downloading the Jenkins WAR file.

Open the terminal and navigate to the download directory.

Run the following command:

$ java -jar jenkins.war

Once completed, navigate to the following Jenkins address:

http://localhost:8080

Wait for the Jenkins unlock window and configure the username and password.

Conclusion

This short tutorial discussed how to install and configure the OpenJDK on Debian 11. We also discussed how to run Jenkins from a WAR file.

About the author

John Otieno

My name is John and am a fellow geek like you. I am passionate about all things computers from Hardware, Operating systems to Programming. My dream is to share my knowledge with the world and help out fellow geeks. Follow my content by subscribing to LinuxHint mailing list