How to install & configure Jenkins on Debian/Ubuntu/ArchLinux
Jenkins is an open source continuous integration tool written in Java. The project was forked from Hudson after a dispute with Oracle. It provides 1000 of plugins to support building, deploying and automating any project. Many users calling Jenkins as a open source automation server.
Jenkins is a self-contained Java-based program, ready to run out-of-the-box, with packages for Windows, Mac OS X and other Unix-like operating systems.
Jenkins can be easily set up and configured through easy to use web interface. Jenkins can easily distribute work across multiple machines, helping drive builds, tests and deployments across multiple platforms faster and can be extended via its plugin architecture.
Prerequisites for Jenkins
Jenkins is running on servlet container such as Apache Tomcat. It’s required JAVA and Jenkins team suggested to install openJDK.
Install Jenkins on Debian/Ubuntu
We can easily install Jenkins on Debian/Ubuntu/LinuxMint system by adding Jenkins official repository.
[Install Jenkins stable] $ wget -q -O - http://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add - $ sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list' $ sudo apt-get update $ sudo apt-get install jenkins
Install latest Jenkins (Unstable)
$ wget -q -O - http://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add - $ sudo sh -c 'echo deb http://pkg.jenkins.io/debian binary/ > /etc/apt/sources.list.d/jenkins.list' $ sudo apt-get update $ sudo apt-get install jenkins
Install Jenkins on Arch Linux
We can easily install Jenkins on Arch Linux based system from distribution official repository.
$ sudo pacman -S jenkins
Start and Enable Jenkins Service
Run the following systemd & SysVinit commands to start and enable the jenkins service.
[Start, Enable & check the Status of Jenkins service on systemd system] $ sudo systemctl start jenkins $ sudo systemctl enable jenkins $ sudo systemctl status jenkins
[Start, Enable & check the Status of Jenkins service on SysVinit system]
$ sudo service jenkins start $ sudo service jenkins status $ sudo update-rc.d jenkins enable