「Jenkins」- 安装(Debian)

  CREATED BY JENKINSBOT

安装运行环境

安装 JDK/JRE 包(Jenkins 使用 Java 开发的,需要安装运行环境):

# Debian GNU/Linux 10 (buster)
apt-get install -y openjdk-11-jre

Jenkins Regular releases (Weekly) on Debian 10

Debian Jenkins Packages

# 08/19/2020

wget -q -O - https://pkg.jenkins.io/debian/jenkins.io.key | apt-key add -
echo 'deb https://pkg.jenkins.io/debian binary/' > /etc/apt/sources.list.d/jenkins.list
apt-get update

apt-get install -y jenkins
/lib/systemd/systemd-sysv-install enable jenkins
systemctl start jenkins.service

# 浏览器访问 http://127.0.0.1:8080 以进行初始化

Debian 8.2 and Jenkins 2.156

Debian/Ubuntu

# 04/04/2019

#!/bin/sh

wget -q -O - https://pkg.jenkins.io/debian/jenkins.io.key | apt-key add -
echo "deb http://pkg.jenkins.io/debian-stable binary/" > /etc/apt/sources.list.d/jenkins.list

apt-get update
apt-get install -y jenkins

# 如果你要手动指定自己的JDK版
# 修改/etc/default/jenkin文件,追加如下行在开始
JAVA_HOME="/opt/openjdk-1.8"
PATH="$JAVA_HOME/bin:$PATH"

参考文献

Jenkins download and deployment
Installing Jenkins