Overview:
One of the alternate ways of installing Jenkins on server is to use WAR (Web Application Archive) file. Remember that is not recommended to use this way of installation for production environment
Run Jenkins as war file installation:
- Install Java JDK 8 dependency library:
sudo apt install -y openjdk-8-jre
- Check if Java was installed properly:
java -version
- Download Jenkins war file:
wget http://mirrors.jenkins.io/war-stable/latest/jenkins.war
- Run Jenkins war file (
--prefix
flag specifies the URL path to access Jenkins dashboard):sudo java -jar jenkins.war --httpPort=80 --prefix=/dashboard
- After running the previous command you will get an output with initialAdmin password to configure Jenkins:
- Copy the password and unlock Jenkins server at
/dashboard
path:
Notes:
- This way of running Jenkins server is not recommended to run in production environment
- WAR (Web application archive) file can be run on any platform where Java is installed