Skip to content

Checking your reading list…

Retry

Stay curious. Build better.

Appearance

Choose how BestHub looks on this device.

Changes apply immediately.

Search articles

Open Discover with these filters

Suggested searches

Operations 6 min read

Chapter 2: Installing Jenkins – Prerequisites, Deployment Methods, and Post‑Installation Configuration

This guide details the prerequisites, step‑by‑step installation methods (WAR, macOS, Windows, Linux/Docker), and post‑installation configuration of Jenkins, including unlocking, plugin management, user creation, update site configuration, slave node setup, and configuration file locations.

Chapter 2: Installing Jenkins

1. Prerequisites

1.1 Software Requirements

Java 8 – either the Java Runtime Environment (JRE) or the Java Development Kit (JDK) can be used. Install the JDK with:

yum -y install java

1.2 Hardware Requirements

Minimum configuration: 256 MB available memory, 1 GB available disk space (Docker recommends 10 GB).

Small‑team configuration: 1 GB+ memory, 50 GB+ disk space.

Note: If Jenkins is run in Docker, these requirements are not mandatory.

2. Installation & Deployment

2.1 Deploying from a WAR package

The Jenkins WAR archive can run on any operating system that supports Java. To deploy:

Place the downloaded WAR file in the desired Jenkins directory.

Start it with java -jar jenkins.war .

Observe the startup logs for any errors.

Access Jenkins via a browser at http://localhost:8080 .

Note: The HTTP port can be changed, e.g., java -jar jenkins.war -httpPort=9090.

2.2 Deploying on macOS

Download the package and install manually.

brew install jenkins – installs the latest version.

brew install jenkins-lts – installs the LTS version.

2.3 Installing on Windows

Download the installer package and follow the wizard.

2.4 Deploying on Linux (recommended)

Download the package.

rpm –ivh jenkins-2.150.3-1.1.noarch.rpm – install.

service jenkins start – start the service.

chkconfig jenkins on – enable start‑on‑boot.

3. Post‑Installation Configuration

3.1 Unlock Jenkins

On first access, Jenkins asks for an automatically generated password.

The password can be found in $JENKINS_HOME/secrets/initialAdminPassword or in the startup logs.

3.2 Customize Jenkins Plugins

After unlocking, you can install any number of plugins as part of the initialization.

You may choose recommended plugins or select custom ones; you can always remove plugins later via the plugin manager.

3.3 Create an Admin User

Create an administrator account to complete the initial setup.

3.4 Configure Update Site

Because the official update site can be slow, the Tsinghua University mirror is used.

Site URL: https://mirrors.tuna.tsinghua.edu.cn/jenkins/updates/update-center.json

3.5 Install Slave Nodes

Navigate to **Manage Jenkins → Manage Nodes**.

After creating a node, Jenkins provides a command to launch the agent; download agent.jar and run it.

Example launch command:

wget http://192.168.0.41/jnlpJars/agent.jar
java -jar agent.jar -jnlpUrl http://192.168.0.41/computer/test1/slave-agent.jnlp -secret 807b0135fb5b071d99930166ac4fc5dd0cf355e670a66da73120dfa2e8cebc5f -workDir "/var/lib/jenkins"

Successful start is indicated by the UI.

3.6 Jenkins Configuration File

When deployed via RPM, the configuration file resides at /etc/sysconfig/jenkins , where you can define startup parameters and ports.

About this article

For questions about attribution, corrections or content rights, please contactadmin@besthub.devand we will review it promptly.

dockerCI/CDLinuxWindowsinstallationmacOSJenkins

Discussion 0

Questions, practical examples and thoughtful responses.

Open full discussion