Skip to content

Instantly share code, notes, and snippets.

@darinpope
Last active August 22, 2024 11:53
Show Gist options
  • Save darinpope/b7c52280a31debbf3d19f5a9a75bdfe9 to your computer and use it in GitHub Desktop.
Save darinpope/b7c52280a31debbf3d19f5a9a75bdfe9 to your computer and use it in GitHub Desktop.

Gist for https://youtu.be/0EevQXwBV2A

Install Temurin JDK

From Deb installation on Debian or Ubuntu:

  • Ensure the necessary packages are present:

    • apt install -y wget apt-transport-https curl
  • Download the Eclipse Adoptium GPG key:

    • mkdir -p /etc/apt/keyrings
    • wget -O - https://packages.adoptium.net/artifactory/api/gpg/key/public | tee /etc/apt/keyrings/adoptium.asc
  • Configure the Eclipse Adoptium apt repository:

    • echo "deb [signed-by=/etc/apt/keyrings/adoptium.asc] https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" | tee /etc/apt/sources.list.d/adoptium.list
  • Install Temurin 17

    • apt update
    • apt install temurin-17-jdk

Install Jenkins

From Jenkins Debian Packages:

  • Add repository key

    • curl -fsSL https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key | sudo tee /usr/share/keyrings/jenkins-keyring.asc > /dev/null
  • Create apt repository

    • echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] https://pkg.jenkins.io/debian-stable binary/ | sudo tee /etc/apt/sources.list.d/jenkins.list > /dev/null
  • Install Jenkins

    • apt update
    • apt install jenkins

Configure Jenkins

  • systemctl --full status jenkins
  • systemctl edit jenkins
[Service]
Environment="JAVA_OPTS=-Djava.awt.headless=true -Djava.net.preferIPv4Stack=true -Djava.io.tmpdir=/var/cache/jenkins/tmp/ -Dorg.apache.commons.jelly.tags.fmt.timeZone=America/New_York -Duser.timezone=America/New_York"
Environment="JENKINS_OPTS=--pluginroot=/var/cache/jenkins/plugins"
  • mkdir -p /var/cache/jenkins/tmp
  • chown -R jenkins:jenkins /var/cache/jenkins/tmp
  • systemctl show jenkins
  • systemd-analyze verify jenkins.service
  • systemctl start jenkins
  • systemctl --full status jenkins
  • journalctl -u jenkins -f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment