How to run a Jenkins WAR file
Run a Jenkins war file
The easiest way to install Jenkins and run the popular CI/CD tools is to simply download the jenkins.war file and run the Jenkins war at the command line.
Whether your run Jenkins in Windows or a Linux distro like Ubuntu or Red Hat, the Java command used to run the Jenkins war file is the same:
java -jar jenkins.war
After the jenkins.jar file runs, the administrative console will be available on port 8080.
http://localhost:8080
Jenkins localhost 8080 not working
It’s worth noting that in order for this command to run, you must have the JDK installed. Java version 8 is the oldest release Jenkins CI will support. The latest LTS release, Java 11, is recommended. So if you do have a problem where Jenkins on localhost 8080 is not working, verify that the JDK is installed and the Java utilities in the JDK’s bin directory are on the PATH:
C:\jenkins\warfile> java -version openjdk version "11.0.9" 2020-10-20 OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.9+11) OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.9+11, mixed mode)
Jenkins WAR file installation
The first run of the Jenkins war file will create a folder named .jenkins under the user’s home directory, and a configuration routine will run. On subsequent startups, you will be taken immediately to the Jenkins login page.
To simplify future start ups, create a file named jenkins-startup.bat if you’re on Windows, or jenkins-startup.sh on Linux, and just type the command used to run a Jenkins jar file in there. From then on, you simply run the batch file or shell script to start Jenkins, and you don’t need to retype the Java command into the DOS prompt or the Linux terminal window.d