How to use the Jenkins Installer
There are a number of ways to install Jenkins on Windows.
The laziest approach it to simply install VMWare and run a Bitnami Jenkins image. It comes pre-configured with all of the Jenkins software already installed, so you pretty much just download the image and then it’s plug and play.
Jenkins installation options
For more low-level control of Jenkins you can simply run the Jenkins WAR file at the command line. If you have downloaded the Jenkins WAR file, the following command will run Jenkins from the command line:
java -jar jenkins.war
In fact, if you have Tomcat running on your Windows machine, you could just drop the Jenkins WAR file in the webapps folder and Jenkins will install automatically. But there is an easier install option.
But by far the easiest way to perform a Jenkins installation on Windows, especially if you already have the JDK installed, is to use the Jenkins installer.
Jenkins installer benefits
Compared to running the Jenkins WAR file or deploying Jenkins to Tomcat, there are definitely benefits that come with the Jenkins installer, three of which include:
- Easy to use installation wizard
- Jenkins registration with Windows services
- An uninstaller in Windows Programs Management
Jenkins Home on Windows
One annoyance with the Jenkins installer is that is buries the Jenkins Home location under the Windows root. When you run the Jenkins WAR, it’s normally found in a folder named .jenkins under the user’s home directory.
My assumption is that this Jenkins home location will work for all users, as opposed to putting it in a user’s home folder which can’t be accessed by other accounts. Nevertheless, it is a pretty deep bury.
If you would like to set the home folder to somewhere more accessible, you can set the JENKINS_HOME environment variable after the Jenkins installer for windows finishes.
Initial Jenkins Windows setup
After the Jenkins installer completes, there will still be a few initial install steps to complete. You will need to provide the secret token hidden in the Jenkins home folder to prove you have access to the machine Jenkins was installed on. You’ll also need to select the Jenkins plugins you wish to install and finally add an administrative user.
Once that’s done, you’re ready to create as many build jobs, shared Jenkins libraries and declarative pipelines as you like.