<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jenkins Archives - Rhein-Ruhr-Informatik</title>
	<atom:link href="https://rhein-ruhr-informatik.de/category/articles/jenkins/feed/" rel="self" type="application/rss+xml" />
	<link>https://rhein-ruhr-informatik.de/category/articles/jenkins/</link>
	<description></description>
	<lastBuildDate>Tue, 11 Mar 2025 08:44:41 +0000</lastBuildDate>
	<language>de</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://rhein-ruhr-informatik.de/wp-content/uploads/2025/03/cropped-favicon-32x32.png</url>
	<title>Jenkins Archives - Rhein-Ruhr-Informatik</title>
	<link>https://rhein-ruhr-informatik.de/category/articles/jenkins/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Jenkins auf Ubuntu 22.04 LTS installieren und einige Administrationsaufgaben</title>
		<link>https://rhein-ruhr-informatik.de/2025/03/01/jenkins-auf-ubuntu-22-04-lts-installieren-und-einige-administrationsaufgaben/</link>
		
		<dc:creator><![CDATA[Rhein-Ruhr-Informatik]]></dc:creator>
		<pubDate>Sat, 01 Mar 2025 16:51:43 +0000</pubDate>
				<category><![CDATA[Artikel]]></category>
		<category><![CDATA[Jenkins]]></category>
		<category><![CDATA[Linux]]></category>
		<guid isPermaLink="false">https://rhein-ruhr-informatik.de/?p=454</guid>

					<description><![CDATA[<p>Übersicht Jenkins ist eine äußerst beliebte Open-Source-Webanwendung, die entwickelt wurde, um den Softwareentwicklungsprozess zu rationalisieren und zu automatisieren. Es ist ein Eckpfeiler für Continuous Integration (CI) und Continuous Delivery (CD)-Pipelines und ermöglicht es Entwicklern und DevOps-Teams, Anwendungen effizient zu erstellen, zu testen und bereitzustellen. Jenkins installieren&#160;&#160;&#160;&#160;&#160; Es gibt viele Methoden,<a class="moretag" href="https://rhein-ruhr-informatik.de/2025/03/01/jenkins-auf-ubuntu-22-04-lts-installieren-und-einige-administrationsaufgaben/"> Weiterlesen&#8230;</a></p>
<p>The post <a href="https://rhein-ruhr-informatik.de/2025/03/01/jenkins-auf-ubuntu-22-04-lts-installieren-und-einige-administrationsaufgaben/">Jenkins auf Ubuntu 22.04 LTS installieren und einige Administrationsaufgaben</a> appeared first on <a href="https://rhein-ruhr-informatik.de">Rhein-Ruhr-Informatik</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><img fetchpriority="high" decoding="async" width="408" height="389" src="https://rhein-ruhr-informatik.de/wp-content/uploads/2024/10/image-17.png" alt="" class="wp-image-455" style="width:306px;height:auto" srcset="https://rhein-ruhr-informatik.de/wp-content/uploads/2024/10/image-17.png 408w, https://rhein-ruhr-informatik.de/wp-content/uploads/2024/10/image-17-300x286.png 300w, https://rhein-ruhr-informatik.de/wp-content/uploads/2024/10/image-17-13x12.png 13w" sizes="(max-width: 408px) 100vw, 408px" /></figure></div>


<p><strong>Übersicht</strong></p>



<p>Jenkins ist eine äußerst beliebte Open-Source-Webanwendung, die entwickelt wurde, um den Softwareentwicklungsprozess zu rationalisieren und zu automatisieren. Es ist ein Eckpfeiler für Continuous Integration (CI) und Continuous Delivery (CD)-Pipelines und ermöglicht es Entwicklern und DevOps-Teams, Anwendungen effizient zu erstellen, zu testen und bereitzustellen<strong>.</strong></p>



<p><strong>Jenkins installieren&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</strong></p>



<p>Es gibt viele Methoden, um Jenkins in Ubuntu zu installieren. Bevor wir jedoch mit der Installation von Jenkins beginnen, müssen wir bereits die Java JRE (Java Runtime Environment) installiert haben. OpenJDK ist eine Open-Source-Implementierung der Java-Plattform. Es bietet die Kernkomponenten, die zum Ausführen von Java-Anwendungen erforderlich sind.</p>



<p>Wir werden mit der Ubuntu-22.04-Version arbeiten.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="1019" height="322" src="https://rhein-ruhr-informatik.de/wp-content/uploads/2025/03/image-8.png" alt="" class="wp-image-774" srcset="https://rhein-ruhr-informatik.de/wp-content/uploads/2025/03/image-8.png 1019w, https://rhein-ruhr-informatik.de/wp-content/uploads/2025/03/image-8-300x95.png 300w, https://rhein-ruhr-informatik.de/wp-content/uploads/2025/03/image-8-768x243.png 768w, https://rhein-ruhr-informatik.de/wp-content/uploads/2025/03/image-8-18x6.png 18w" sizes="(max-width: 1019px) 100vw, 1019px" /></figure>



<p>Lassen Sie uns OpenJDK-11 installieren. Die Schritte zum Installieren dieser Distribution auf unserem System über die Putty-Schnittstelle werden nachfolgend beschrieben. Als Erstes werden wir die archivierte OpenJDK-11-Datei der offiziellen Website [<a href="https://jdk.java.net/archive/" target="_blank" rel="noreferrer noopener">https://jdk.java.net/archive/</a>] herunterladen.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><img decoding="async" width="992" height="558" src="https://rhein-ruhr-informatik.de/wp-content/uploads/2024/10/image-18.png" alt="" class="wp-image-456" style="width:742px;height:auto" srcset="https://rhein-ruhr-informatik.de/wp-content/uploads/2024/10/image-18.png 992w, https://rhein-ruhr-informatik.de/wp-content/uploads/2024/10/image-18-300x169.png 300w, https://rhein-ruhr-informatik.de/wp-content/uploads/2024/10/image-18-768x432.png 768w, https://rhein-ruhr-informatik.de/wp-content/uploads/2024/10/image-18-18x10.png 18w" sizes="(max-width: 992px) 100vw, 992px" /><figcaption class="wp-element-caption"><em>OpenJDK download</em></figcaption></figure></div>


<p>Dann können wir über die WinSCP-App auf unser Linux (Ubuntu)-Umgebung zugreifen, um sie als Binärdatei zu übertragen.</p>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="522" src="https://rhein-ruhr-informatik.de/wp-content/uploads/2024/10/image-19-1024x522.png" alt="" class="wp-image-457" style="width:792px;height:auto" srcset="https://rhein-ruhr-informatik.de/wp-content/uploads/2024/10/image-19-1024x522.png 1024w, https://rhein-ruhr-informatik.de/wp-content/uploads/2024/10/image-19-300x153.png 300w, https://rhein-ruhr-informatik.de/wp-content/uploads/2024/10/image-19-768x392.png 768w, https://rhein-ruhr-informatik.de/wp-content/uploads/2024/10/image-19-18x9.png 18w, https://rhein-ruhr-informatik.de/wp-content/uploads/2024/10/image-19.png 1086w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption"><em>OpenJDK file transfer</em></figcaption></figure></div>


<p>Nachdem wir die Archivdatei in unserer Umgebung haben, müssen wir sie zuerst über die Befehlszeile extrahieren.</p>



<p><strong>tar -xvzf openjdk-17.0.1_linux-x64_bin.tar.gz</strong></p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="62" src="https://rhein-ruhr-informatik.de/wp-content/uploads/2025/03/image-9-1024x62.png" alt="" class="wp-image-776" srcset="https://rhein-ruhr-informatik.de/wp-content/uploads/2025/03/image-9-1024x62.png 1024w, https://rhein-ruhr-informatik.de/wp-content/uploads/2025/03/image-9-300x18.png 300w, https://rhein-ruhr-informatik.de/wp-content/uploads/2025/03/image-9-768x47.png 768w, https://rhein-ruhr-informatik.de/wp-content/uploads/2025/03/image-9-18x1.png 18w, https://rhein-ruhr-informatik.de/wp-content/uploads/2025/03/image-9.png 1090w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Da die Datei nur Lese- und Schreibrechte hat, werden wir ihr die Ausführungsberechtigung wie folgt erteilen:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="54" src="https://rhein-ruhr-informatik.de/wp-content/uploads/2025/03/image-10-1024x54.png" alt="" class="wp-image-777" srcset="https://rhein-ruhr-informatik.de/wp-content/uploads/2025/03/image-10-1024x54.png 1024w, https://rhein-ruhr-informatik.de/wp-content/uploads/2025/03/image-10-300x16.png 300w, https://rhein-ruhr-informatik.de/wp-content/uploads/2025/03/image-10-768x41.png 768w, https://rhein-ruhr-informatik.de/wp-content/uploads/2025/03/image-10-18x1.png 18w, https://rhein-ruhr-informatik.de/wp-content/uploads/2025/03/image-10.png 1090w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Wenn wir dann auflisten, erhalten wir:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="66" src="https://rhein-ruhr-informatik.de/wp-content/uploads/2025/03/image-11-1024x66.png" alt="" class="wp-image-778" srcset="https://rhein-ruhr-informatik.de/wp-content/uploads/2025/03/image-11-1024x66.png 1024w, https://rhein-ruhr-informatik.de/wp-content/uploads/2025/03/image-11-300x19.png 300w, https://rhein-ruhr-informatik.de/wp-content/uploads/2025/03/image-11-768x49.png 768w, https://rhein-ruhr-informatik.de/wp-content/uploads/2025/03/image-11-18x1.png 18w, https://rhein-ruhr-informatik.de/wp-content/uploads/2025/03/image-11.png 1090w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Jetzt können wir OpenJDK-17 mit dem folgenden Befehl installieren:</p>



<p><strong>sudo apt install openjdk-17-jdk -y</strong></p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="167" src="https://rhein-ruhr-informatik.de/wp-content/uploads/2025/03/image-12-1024x167.png" alt="" class="wp-image-780" srcset="https://rhein-ruhr-informatik.de/wp-content/uploads/2025/03/image-12-1024x167.png 1024w, https://rhein-ruhr-informatik.de/wp-content/uploads/2025/03/image-12-300x49.png 300w, https://rhein-ruhr-informatik.de/wp-content/uploads/2025/03/image-12-768x125.png 768w, https://rhein-ruhr-informatik.de/wp-content/uploads/2025/03/image-12-18x3.png 18w, https://rhein-ruhr-informatik.de/wp-content/uploads/2025/03/image-12.png 1090w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Da jedoch OpenJDK-17 bereits in meiner Umgebung installiert ist, wird die neueste Version angezeigt.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="85" src="https://rhein-ruhr-informatik.de/wp-content/uploads/2025/03/image-13-1024x85.png" alt="" class="wp-image-781" srcset="https://rhein-ruhr-informatik.de/wp-content/uploads/2025/03/image-13-1024x85.png 1024w, https://rhein-ruhr-informatik.de/wp-content/uploads/2025/03/image-13-300x25.png 300w, https://rhein-ruhr-informatik.de/wp-content/uploads/2025/03/image-13-768x64.png 768w, https://rhein-ruhr-informatik.de/wp-content/uploads/2025/03/image-13-18x2.png 18w, https://rhein-ruhr-informatik.de/wp-content/uploads/2025/03/image-13.png 1090w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<pre class="wp-block-code"><code></code></pre>



<p>Nach der Installation überprüfen wir, ob der Jenkins-Dienst aktiv ist.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="220" src="https://rhein-ruhr-informatik.de/wp-content/uploads/2025/03/image-14-1024x220.png" alt="" class="wp-image-782" srcset="https://rhein-ruhr-informatik.de/wp-content/uploads/2025/03/image-14-1024x220.png 1024w, https://rhein-ruhr-informatik.de/wp-content/uploads/2025/03/image-14-300x64.png 300w, https://rhein-ruhr-informatik.de/wp-content/uploads/2025/03/image-14-768x165.png 768w, https://rhein-ruhr-informatik.de/wp-content/uploads/2025/03/image-14-18x4.png 18w, https://rhein-ruhr-informatik.de/wp-content/uploads/2025/03/image-14.png 1090w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<pre class="wp-block-code"><code>  
  root@master:/home/bekber1# systemctl
  status jenkins
  ● jenkins.service
  - Jenkins Continuous Integration Server
  &nbsp;&nbsp;&nbsp;&nbsp;
  Loaded: loaded (/lib/systemd/system/jenkins.service; enabled; vendor
  preset: enabled)
  &nbsp;&nbsp;&nbsp;&nbsp;
  Active: active (running) since Tue 2024-09-03 06:34:13 UTC; 2h 58min
  ago
  &nbsp;&nbsp;
  Main PID: 18413 (java)
  &nbsp;&nbsp;&nbsp;&nbsp;
  &nbsp;Tasks: 63 (limit: 2178)
  &nbsp;&nbsp;&nbsp;&nbsp;
  Memory: 791.1M
  &nbsp;&nbsp;&nbsp;&nbsp;
  CGroup: /system.slice/jenkins.service
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; └─18413 /usr/bin/java
  -Djava.awt.headless=true -jar /usr/share/java/jenkins.war
  --webroot=/var/cache/jenkins/war --httpPort=xxx
  
</code></pre>



<p>Wir können also sehen, dass der Jenkins-Dienst aktiv ist. Um jetzt über den Webbrowser auf Jenkins zugreifen zu können, müssen wir die Standard-UFW-Firewall konfigurieren.</p>



<p>Öffnen Sie dem Port 8080, indem Sie die folgenden Befehle ausführen:</p>



<pre class="wp-block-code"><code> 
  root@master:/home/bekber1#
  ufw allow 8080
  Rule
  added
  Rule
  added (v6)
  &nbsp;
  root@master:/home/bekber1#
  ufw status
  Status:
  active<span style="color:red;mso-ansi-language:EN-US"></span>
 </code></pre>


<div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><img loading="lazy" decoding="async" width="846" height="642" src="https://rhein-ruhr-informatik.de/wp-content/uploads/2024/10/image-24.png" alt="" class="wp-image-462" style="width:660px;height:auto" srcset="https://rhein-ruhr-informatik.de/wp-content/uploads/2024/10/image-24.png 846w, https://rhein-ruhr-informatik.de/wp-content/uploads/2024/10/image-24-300x228.png 300w, https://rhein-ruhr-informatik.de/wp-content/uploads/2024/10/image-24-768x583.png 768w, https://rhein-ruhr-informatik.de/wp-content/uploads/2024/10/image-24-16x12.png 16w" sizes="auto, (max-width: 846px) 100vw, 846px" /></figure></div>


<p>In der Putty-CLI verwenden wir den folgenden Befehl, um das Administrator-Kennwort zu erhalten:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="28" src="https://rhein-ruhr-informatik.de/wp-content/uploads/2024/10/image-25-1024x28.png" alt="" class="wp-image-463" srcset="https://rhein-ruhr-informatik.de/wp-content/uploads/2024/10/image-25-1024x28.png 1024w, https://rhein-ruhr-informatik.de/wp-content/uploads/2024/10/image-25-300x8.png 300w, https://rhein-ruhr-informatik.de/wp-content/uploads/2024/10/image-25-768x21.png 768w, https://rhein-ruhr-informatik.de/wp-content/uploads/2024/10/image-25-18x1.png 18w, https://rhein-ruhr-informatik.de/wp-content/uploads/2024/10/image-25.png 1089w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Wir kopieren das standardmäßig bereitgestellte Kennwort und fügen es in das im obigen Bild gezeigte Feld ein, bevor wir auf die Schaltfläche &#8222;Weiter&#8220; klicken. Danach können wir loslegen.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="940" height="702" src="https://rhein-ruhr-informatik.de/wp-content/uploads/2024/10/image-26.png" alt="" class="wp-image-464" srcset="https://rhein-ruhr-informatik.de/wp-content/uploads/2024/10/image-26.png 940w, https://rhein-ruhr-informatik.de/wp-content/uploads/2024/10/image-26-300x224.png 300w, https://rhein-ruhr-informatik.de/wp-content/uploads/2024/10/image-26-768x574.png 768w, https://rhein-ruhr-informatik.de/wp-content/uploads/2024/10/image-26-16x12.png 16w" sizes="auto, (max-width: 940px) 100vw, 940px" /></figure>



<p>Nach der Installation und Konfiguration müssen wir unseren ersten Admin-Benutzer erstellen, wie im folgenden Bild gezeigt:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="896" height="639" src="https://rhein-ruhr-informatik.de/wp-content/uploads/2024/10/image-27.png" alt="" class="wp-image-465" srcset="https://rhein-ruhr-informatik.de/wp-content/uploads/2024/10/image-27.png 896w, https://rhein-ruhr-informatik.de/wp-content/uploads/2024/10/image-27-300x214.png 300w, https://rhein-ruhr-informatik.de/wp-content/uploads/2024/10/image-27-768x548.png 768w, https://rhein-ruhr-informatik.de/wp-content/uploads/2024/10/image-27-18x12.png 18w" sizes="auto, (max-width: 896px) 100vw, 896px" /></figure>



<p>Jetzt können wir auf &#8222;Speichern und fortfahren&#8220; klicken und erhalten dann die Jenkins-URL, wie unten gezeigt:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="881" height="611" src="https://rhein-ruhr-informatik.de/wp-content/uploads/2024/10/image-28.png" alt="" class="wp-image-466" srcset="https://rhein-ruhr-informatik.de/wp-content/uploads/2024/10/image-28.png 881w, https://rhein-ruhr-informatik.de/wp-content/uploads/2024/10/image-28-300x208.png 300w, https://rhein-ruhr-informatik.de/wp-content/uploads/2024/10/image-28-768x533.png 768w, https://rhein-ruhr-informatik.de/wp-content/uploads/2024/10/image-28-18x12.png 18w" sizes="auto, (max-width: 881px) 100vw, 881px" /></figure>



<p>Jetzt ist Jenkins bereit und wir können es starten und verwenden.</p>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="1024" height="331" src="https://rhein-ruhr-informatik.de/wp-content/uploads/2024/10/image-30-1024x331.png" alt="" class="wp-image-468" srcset="https://rhein-ruhr-informatik.de/wp-content/uploads/2024/10/image-30-1024x331.png 1024w, https://rhein-ruhr-informatik.de/wp-content/uploads/2024/10/image-30-300x97.png 300w, https://rhein-ruhr-informatik.de/wp-content/uploads/2024/10/image-30-768x248.png 768w, https://rhein-ruhr-informatik.de/wp-content/uploads/2024/10/image-30-18x6.png 18w, https://rhein-ruhr-informatik.de/wp-content/uploads/2024/10/image-30.png 1089w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption"><em>Beginnen Sie mit Jenkins</em></figcaption></figure></div>

<div class="wp-block-image">
<figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="1024" height="297" src="https://rhein-ruhr-informatik.de/wp-content/uploads/2024/10/image-31-1024x297.png" alt="" class="wp-image-469" srcset="https://rhein-ruhr-informatik.de/wp-content/uploads/2024/10/image-31-1024x297.png 1024w, https://rhein-ruhr-informatik.de/wp-content/uploads/2024/10/image-31-300x87.png 300w, https://rhein-ruhr-informatik.de/wp-content/uploads/2024/10/image-31-768x223.png 768w, https://rhein-ruhr-informatik.de/wp-content/uploads/2024/10/image-31-18x5.png 18w, https://rhein-ruhr-informatik.de/wp-content/uploads/2024/10/image-31.png 1090w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption"><em>Melden Sie sich bei Jenkins an</em></figcaption></figure></div>

<div class="wp-block-image">
<figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="1024" height="279" src="https://rhein-ruhr-informatik.de/wp-content/uploads/2024/10/image-32-1024x279.png" alt="" class="wp-image-470" srcset="https://rhein-ruhr-informatik.de/wp-content/uploads/2024/10/image-32-1024x279.png 1024w, https://rhein-ruhr-informatik.de/wp-content/uploads/2024/10/image-32-300x82.png 300w, https://rhein-ruhr-informatik.de/wp-content/uploads/2024/10/image-32-768x209.png 768w, https://rhein-ruhr-informatik.de/wp-content/uploads/2024/10/image-32-18x5.png 18w, https://rhein-ruhr-informatik.de/wp-content/uploads/2024/10/image-32.png 1090w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption"><em>Jenkins-Dashboard</em></figcaption></figure></div>


<p>Jenkins-Administrator-Kennwort ändert, wenn es verlorengeht:</p>



<p>Wenn wir das Jenkins-Admin-Passwort für den Webbrowser vergessen haben, sollten wir die folgenden Schritte befolgen, um es zurückzusetzen:</p>



<p>Zunächst müssen wir herausfinden, wo sich die config.xml-Datei befindet:</p>



<pre class="wp-block-code"><code>root@master:/home/bekber1# cd /var/lib/jenkins/ </code></pre>



<p>Wir müssen die config.xml-Datei öffnen und die folgende Zeile in der Konfigurationsdatei ändern:</p>



<pre class="wp-block-code"><code>root@master:/var/lib/jenkins# vim config.xml</code></pre>



<p>Wenn Sie diese Datei in der CLI zusammenfügen, können Sie die Zeile <code>"&lt;useSecurity&gt;true&lt;/useSecurity&gt;"</code> sehen. Wir ändern sie von &#8222;<strong>true</strong>&#8220; auf &#8222;<strong>false</strong>&#8220; und starten anschließend den Jenkins-Dienst neu wie folgt:</p>



<p><code>systemctl restart jenkins&nbsp;</code></p>



<p>Nach diesen Schritten aktualisieren wir die Seite des Webbrowsers und gelangen auf die Jenkins-Seite, um die Änderungen vorzunehmen, da sie nun ungesichert ist.</p>



<p>Der erste Schritt besteht darin, &#8222;<strong>Manage Jenkins</strong>&#8220; auszuwählen und anschließend in der Dropdown-Liste &#8222;<strong>Security Realm</strong>&#8220; &#8222;<strong>Jenkins&#8216; own user database</strong>&#8220; auszuwählen. Wir speichern dies und schließen das Fenster.</p>



<p>Danach können wir unter &#8222;<strong>Manage Jenkins</strong>&#8220; -&gt; &#8222;<strong>Security</strong>&#8220; -&gt; &#8222;<strong>Users</strong>&#8220; auf die Schaltfläche &#8222;<strong>Einstellungen</strong>&#8220; klicken und unter &#8222;<strong>Kennwort</strong>&#8220; das Kennwort ändern.</p>



<p><strong>So erstellen Sie einen integrierten Node-Agenten</strong></p>



<p>In Jenkins sind Agents unerlässlich für die Ausführung von Build-Jobs. Die Schritte, die wir befolgen sollten, sind:</p>



<p>Wir müssen .ssh in /var/lib/jenkins/.ssh/known_host konfigurieren.</p>



<p>-wir erstellen den Ordner namens .ssh</p>



<pre class="wp-block-code"><code>root@master:/var/lib/jenkins#mkdir -p /var/lib/jenkins/.ssh
root@master:/var/lib/jenkins# chown -R jenkins:jenkins .ssh
root@master:/var/lib/jenkins#ssh-keyscan -H agent1 &gt;&gt; /var/lib/jenkins/.ssh/known_host

</code></pre>



<p>Wenn es nicht funktioniert, z. B.</p>



<pre class="wp-block-code"><code>root@master:/etc/ssh# ssh-keyscan -H agent1 &gt;&gt; /var/lib/jenkins/.ssh/known_hosts
getaddrinfo agent1: Temporary failure in name resolution
getaddrinfo agent1: Temporary failure in name resolution
getaddrinfo agent1: Temporary failure in name resolution
getaddrinfo agent1: Temporary failure in name resolution
getaddrinfo agent1: Temporary failure in name resolution

</code></pre>



<p>Dann müssen wir die IP-Adresse von agent1 in der <code>/etc/hosts</code>-Datei hinzufügen.&nbsp;</p>



<p>Zur Ermittlung der IP-Adresse von agent1 nutzen wir den Befehl</p>



<pre class="wp-block-code"><code>root@master:/etc/ssh# dig agent1
 
; &lt;&lt;&gt;&gt; DiG 9.16.48-Ubuntu &lt;&lt;&gt;&gt; agent1
;; global options: +cmd
;; Got answer:
;; -&gt;&gt;HEADER&lt;&lt;- opcode: QUERY, status: SERVFAIL, id: 15329
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
 
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;agent1.                                IN      A
 ;; Query time: 0 msec
;; SERVER: &lt;MyIpAddress&gt;#53(&lt;MyIpAddress&gt;)
;; WHEN: Sun Mar 10 10:33:06 UTC 2024
;; MSG SIZE  rcvd: 35

</code></pre>



<p>und bearbeiten wir die /etc/hosts-Datei mit dem Nano-Editor wie folgt:</p>



<pre class="wp-block-code"><code>root@master:/etc# cat hosts
&lt;MyIpAddress&gt;localhost
&lt;MyIpAddress&gt;linux-0
&lt;MyIpAddress&gt;master
&lt;MyIpAddress&gt;node1
&lt;MyIpAddress&gt;node2
&lt;MyIpAddress&gt; agent1    ----------&gt; mit dem Nano- oder Vim-Editor müssen wir die IP-Adresse von agent1 hinzufügen.
/etc/hosts
# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
</code></pre>



<p>Nach Ausführung des Befehls ssh-keyscan -H agent1 &gt;&gt; /var/lib/jenkins/.ssh/known_hosts erhalten wir die Auflösung:</p>



<pre class="wp-block-code"><code>root@master:/etc# ssh-keyscan -H agent1 &gt;&gt; /var/lib/jenkins/.ssh/known_hosts
# agent1:22 SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.11
# agent1:22 SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.11
# agent1:22 SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.11
# agent1:22 SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.11
# agent1:22 SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.11
</code></pre>



<p>Jenkins agent1 am Port 22 wird aufgelöst:</p>



<pre class="wp-block-code"><code>root@master:/etc# cd /var/lib/jenkins/.ssh/
root@master:/var/lib/jenkins/.ssh# ll
total 12
drwxr-xr-x  2 jenkins jenkins 4096 Mar 10 10:11 ./
drwxr-xr-x 15 jenkins jenkins 4096 Mar 10 10:05 ../
-rw-r--r--  1 jenkins jenkins  978 Mar 10 10:36 known_hosts

root@master:/var/lib/jenkins/.ssh# cat known_hosts
|1|UMnpRmZeDMTxf8bAmPYanyzeE54=|C7tpVgwzVbu7FDJG4fUiDVN3L4I= ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBAunO9x3A5IInM2Qqqf4wwWBEokfH8pRiMVcrjNTNn7hCZrgi75hbRbV+dG8hy2xhUtDlywP0k0S/+qpSwoVd7E=
|1|nPGx2tNNjsRAU6ZYf7UqlI1iGcM=|TqWQT18KAS56FgREOVEfVUvvILQ= ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDTy0gPfw8tQ7T2VkFlp82regznVnrZx7tlsgLqlOWVqzhCPrA4/V0DlOsHRjDKUFNnrH+LgOSSAmZwqRrHYyy6Oe+BkmXU4v5a8oZPA1xYRSL/Q1YDYhiMeySilDDzUQwy6HqcmlpPHdPFsl/S/vQIoCAlP5PbS9/GYXILJJj2bxVjqq/nWeC3QywDsoch02XxPpQORk3qFPKDAbc8AWn26v/zHXFgjEig0vW+el1gjkKe8scNTvjVhRot31gD3SdM39SpEspD+Unkw0EhI60hnQeZjiunRUM9/Za2sw3cFGOCXOySDPrkZ2mm10geTZVDF4JTm+pdsv8cmLOUSooRWg+t8R6MK7ZDmeW1aRScpy5R8je0fuGU7XX/P+RNs27TFJQevE0EwWcTYMtBMQunuuqGFBVUBIOMZzwKeipojx9mGXhDp+TiHsQRXq/9nIOdiDfrub658RUJBgZsaX7fAsnnMMbjf0qBSXdikNoQHm+SrvxI4I7L7XawidSqWkU=
|1|1JIhNCOumg+yjaTgMMYtcGAkC6o=|B/ZgF81ZU+t+8AbByBU3hwp68X0= ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFLr95lmAUl1k0+zxfhzG4B9fvrvPtddpxOCII+abRfO

root@master:/var/lib/jenkins/.ssh#
</code></pre>



<p>Jenkins-Logs:</p>



<pre class="wp-block-code"><code>Warning: no key algorithms provided; JENKINS-42959 disabled
SSHLauncher{host='agent1', port=22, credentialsId='linux-0', jvmOptions='', javaPath='', prefixStartSlaveCmd='', suffixStartSlaveCmd='', launchTimeoutSeconds=60, maxNumRetries=10, retryWaitTime=15, sshHostKeyVerificationStrategy=hudson.plugins.sshslaves.verifiers.KnownHostsFileKeyVerificationStrategy, tcpNoDelay=true, trackCredentials=true}
&#91;03/10/24 10:43:30] &#91;SSH] Opening SSH connection to agent1:22.
Searching for agent1 in /var/lib/jenkins/.ssh/known_hosts
Searching for agent1:22 in /var/lib/jenkins/.ssh/known_hosts
&#91;03/10/24 10:43:30] &#91;SSH] SSH host key matches key in Known Hosts file. Connection will be allowed.
&#91;03/10/24 10:43:31] &#91;SSH] Authentication successful.
&#91;03/10/24 10:43:32] &#91;SSH] The remote user's environment is:
BASH=/usr/bin/bash
.
.
.
&lt;===&#91;JENKINS REMOTING CAPACITY]===&gt;channel started
Remoting version: 3206.vb_15dcf73f6a_9
Launcher: SSHLauncher
Communication Protocol: Standard in/out
This is a Unix agent
Agent successfully connected and online
</code></pre>



<p><strong>Zusammenfassung</strong></p>



<p>Jenkins ist ein wertvolles Werkzeug zur Automatisierung von Softwareentwicklungsprozessen. Durch das Verständnis seiner Kernfunktionen, Installation, Konfiguration, Sicherheit und Agentenverwaltung können Sie Jenkins effektiv nutzen, um Ihre CI/CD-Pipelines zu verbessern und hochwertige Software zu liefern.</p>



<p><strong>Referenz:</strong></p>



<p><a href="https://community.jenkins.io/t/can-i-create-agent-for-built-in-node/1183">https://community.jenkins.io/t/can-i-create-agent-for-built-in-node/1183</a></p>



<p><a href="https://jdk.java.net/archive">https://jdk.java.net/archive</a></p>



<p></p>
<p>The post <a href="https://rhein-ruhr-informatik.de/2025/03/01/jenkins-auf-ubuntu-22-04-lts-installieren-und-einige-administrationsaufgaben/">Jenkins auf Ubuntu 22.04 LTS installieren und einige Administrationsaufgaben</a> appeared first on <a href="https://rhein-ruhr-informatik.de">Rhein-Ruhr-Informatik</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
