0
0
Jenkinsdevops~10 mins

Jenkins WAR file execution - Step-by-Step Execution

Choose your learning style9 modes available
Process Flow - Jenkins WAR file execution
Download jenkins.war
Open terminal/command prompt
Run: java -jar jenkins.war
Jenkins server starts
Access Jenkins via browser at localhost:8080
Unlock Jenkins with initial admin password
Configure Jenkins and start using
This flow shows how to start Jenkins by running the WAR file with Java, then access and unlock Jenkins in the browser.
Execution Sample
Jenkins
java -jar jenkins.war
Starts the Jenkins server by running the WAR file with Java.
Process Table
StepActionCommand/OutputSystem State
1Download Jenkins WAR filejenkins.war downloadedWAR file ready on disk
2Open terminalTerminal readyReady to run commands
3Run Jenkins WARjava -jar jenkins.warJenkins server starting...
4Jenkins server startup logsLoading plugins... Jenkins is fully up and runningJenkins server running on port 8080
5Open browserNavigate to http://localhost:8080Browser connected to Jenkins server
6Unlock JenkinsEnter initial admin password from fileJenkins unlocked, ready for setup
7Configure JenkinsSetup wizard runsJenkins configured and ready to use
💡 Jenkins server is running and accessible via browser after setup
Status Tracker
VariableStartAfter Step 3After Step 4After Step 6Final
jenkins.warNot downloadedDownloadedDownloadedDownloadedDownloaded
Jenkins ServerStoppedStartingRunningRunningRunning
Browser AccessNoNoNoYes (locked)Yes (unlocked)
Admin PasswordNot retrievedNot retrievedNot retrievedRetrieved and enteredEntered
Key Moments - 3 Insights
Why do we use 'java -jar jenkins.war' to start Jenkins?
Because Jenkins is packaged as a WAR file that runs on a Java server, so the command tells Java to run that WAR file as a web application. See execution_table step 3.
What does 'Unlock Jenkins' mean and why is it needed?
Unlocking Jenkins means entering the initial admin password to secure the server before setup. This happens after Jenkins starts (step 6) to prevent unauthorized access.
Why do we access Jenkins at http://localhost:8080 after starting the WAR file?
Because Jenkins runs a web server on port 8080 by default, so the browser connects to that address to interact with Jenkins. See execution_table step 5.
Visual Quiz - 3 Questions
Test your understanding
Look at the execution table, what is the system state after step 4?
AJenkins WAR file is still downloading
BJenkins server is running on port 8080
CBrowser has connected to Jenkins
DJenkins is locked and not running
💡 Hint
Check the 'System State' column for step 4 in the execution_table
At which step do we enter the initial admin password to unlock Jenkins?
AStep 6
BStep 5
CStep 3
DStep 7
💡 Hint
Look for 'Unlock Jenkins' action in the execution_table
If we change the port Jenkins runs on, which step's system state would change?
AStep 1
BStep 6
CStep 4
DStep 7
💡 Hint
The port is part of the Jenkins server running state shown in step 4
Concept Snapshot
Jenkins WAR file execution:
- Download jenkins.war file
- Run with: java -jar jenkins.war
- Jenkins starts on port 8080
- Access via browser at http://localhost:8080
- Unlock with initial admin password
- Configure Jenkins and start using
Full Transcript
To run Jenkins from the WAR file, first download the jenkins.war file. Then open your terminal or command prompt. Run the command 'java -jar jenkins.war' to start the Jenkins server. The server will start and listen on port 8080 by default. Open your web browser and go to http://localhost:8080. Jenkins will ask you to unlock it by entering the initial admin password found in a file on your system. After unlocking, you can configure Jenkins using the setup wizard and start using it.