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:
- 256 MB of RAM
- 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:
Install OpenJDK using the package manager:
This installs the OpenJDK 14 JDK (Java Development Kit) package and its dependencies.
Verify the installation by checking the version of the Java compiler:
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:
Once completed, navigate to the following Jenkins address:
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.