We are committed to provide service 24 X 7

Deals, Shopping, Training, Tools

Learn how to – How To Install and Configure Jenkins on Arch Linux

Learn how to – How To Install and Configure Jenkins on Arch Linux.

In my recent article I explain how you can installing Jenkins on Ubuntu System and install Jenkins Server on CentOS 8. In this guide, we’ll cover installation and configuration of Jenkins on Arch Linux. Jenkins is an open-source server-based automation server forked from Hudson project with support for Git, Source Control Management, and SVN. Jenkins is capable of running scheduled automated builds and test suits of managed software projects.

For Ubuntu, see: How to Install Jenkins on Ubuntu

For CentOS refer to: CentOS 7 and CentOS 8 articles.

Jenkins package for Arch Linux is available on official Pacman Repositories.

Install Jenkins Server on Arch Linux

  • Root access
  • Java OpenJDK 8
  • Internet access to download Packages

Install Jenkins on Arch Linux using the command:

sudo pacman -S jenkins

Proceed with the installation:

Total Download Size:   132.65 MiB
Total Installed Size:  279.96 MiB

:: Proceed with installation? [Y/n] y

After the package has been installed, check default Java set on your Arch Linux machine. Install Java 17.

sudo pacman -S  vim jre17-openjdk

If you have java-7-openjdk set as default, Jenkins service will fail to start:

$ archlinux-java status 
Available Java environments:
  java-11-openjdk (default)
  java-17-openjdk

Set installed Java as default.

sudo archlinux-java set  java-17-openjdk

Check default version again to confirm:

$ archlinux-java get
java-17-openjdk

$ archlinux-java status
Available Java environments:
  java-11-openjdk
  java-17-openjdk (default)

Update JAVA path:

$ sudo vim /etc/conf.d/jenkins
JAVA=/usr/lib/jvm/default/bin/java

Start Jenkins application:

sudo systemctl daemon-reload
sudo systemctl restart jenkins
sudo systemctl enable jenkins

Check application status to confirm that it is running:

$ systemctl status jenkins
● jenkins.service - Extendable continuous integration server
     Loaded: loaded (/usr/lib/systemd/system/jenkins.service; enabled; preset: disabled)
     Active: active (running) since Sat 2022-10-29 22:49:04 UTC; 5s ago
   Main PID: 1464 (sh)
      Tasks: 15 (limit: 2324)
     Memory: 170.5M
        CPU: 5.132s
     CGroup: /system.slice/jenkins.service
             ├─1464 /bin/sh -c "eval $JENKINS_COMMAND_LINE"
             └─1465 /usr/lib/jvm/default/bin/java -Xmx512m -jar /usr/share/java/jenkins/jenkins.war --webroot=/var/cache/jenkins --httpPort=8090

Oct 29 22:49:07 arch-linux jenkins[1465]:         at winstone.HostGroup.initHost(HostGroup.java:65)
Oct 29 22:49:07 arch-linux jenkins[1465]:         at winstone.HostGroup.<init>(HostGroup.java:44)
Oct 29 22:49:07 arch-linux jenkins[1465]:         at winstone.Launcher.<init>(Launcher.java:150)
Oct 29 22:49:07 arch-linux jenkins[1465]:         at winstone.Launcher.main(Launcher.java:389)
Oct 29 22:49:07 arch-linux jenkins[1465]:         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Oct 29 22:49:07 arch-linux jenkins[1465]:         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
Oct 29 22:49:07 arch-linux jenkins[1465]:         at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Oct 29 22:49:07 arch-linux jenkins[1465]:         at java.base/java.lang.reflect.Method.invoke(Method.java:568)
Oct 29 22:49:07 arch-linux jenkins[1465]:         at executable.Main.main(Main.java:355)
Oct 29 22:49:10 arch-linux jenkins[1465]: 2022-10-29 22:49:10.174+0000 [id=1]        WARNING        o.e.j.s.handler.ContextHandler#setContextPath: Empty contextPath

The configuration file of the daemon running Jenkins is located at /etc/conf.d/jenkins

If all is okay, proceed to configure Jenkins from UI. Open http://localhost:8090 with your browser and start setting up Jenkins.

Obtain Jenkins default administrator password:

$ sudo cat /var/lib/jenkins/secrets/initialAdminPassword
1f24a7140dbe4dc79aa45b3e9c4c89c

Enter the password on Administrator Password box and click continue. The next page will ask you to install recommended plugins or plugins that suit your desired Jenkins usage. if not sure, select installation of recommended plugins.

Wait for plugins installation to finish.

Then create a user account to login with:

Set Jenkins URL and click “Save and Finish”

You should get to Jenkins Administration dashboard where you can start creating Jobs, builds, pipelines e.t.c.

If you are new to Jenkins, Check a Getting Started Guide.

Also check:

Cart

Your Cart is Empty

Back To Shop