From 03c4a6e75aaeba7d6a0cd544310cb998ca03ab15 Mon Sep 17 00:00:00 2001 From: Michael Jenkins Date: Wed, 29 Sep 2021 23:00:20 -0700 Subject: [PATCH] Add the commands for ubuntu install --- 01_04.md | 25 ------------------------- 01_05.md | 23 +++++++++++++++++++++++ 2 files changed, 23 insertions(+), 25 deletions(-) delete mode 100644 01_04.md create mode 100644 01_05.md diff --git a/01_04.md b/01_04.md deleted file mode 100644 index ec11311..0000000 --- a/01_04.md +++ /dev/null @@ -1,25 +0,0 @@ -# Learning Jenkins, 01-04: Install Jenkins as a Container - -# Prerequisites -You will need to have [Docker](https://docs.docker.com/get-docker/) installed on your local system. - -# Installation -In a terminal, run the following commands: - -``` -docker --version - -docker pull jenkins/jenkins:lts - -docker run --detach --publish 8080:8080 --volume jenkins_home:/var/jenkins_home --name jenkins jenkins/jenkins:lts - -docker exec jenkins cat /var/jenkins_home/secrets/initialAdminPassword -``` - -# Using the Initial Admin Password -Run the following command and copy the output: -``` -docker exec jenkins cat /var/jenkins_home/secrets/initialAdminPassword -``` - -Open a browser to [localhost:8080](http://localhost:8080) and enter the initial admin password. diff --git a/01_05.md b/01_05.md new file mode 100644 index 0000000..9356869 --- /dev/null +++ b/01_05.md @@ -0,0 +1,23 @@ +# Learning Jenkins, 01-05: Install Jenkins on Ubuntu + +# Prerequisites +You will need to have `root` permission on the target system, specifically so you can run commands using `sudo`. + +# Installation +In a terminal, run the following commands: +``` +wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add - +sudo sh -c 'echo deb https://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list' +sudo apt-get update -y +sudo apt-get -y install openjdk-11-jdk +sudo apt-get install jenkins +cat /var/lib/jenkins/secrets/initialAdminPassword +``` + +# Using the Initial Admin Password +Run the following command and copy the output: +``` +cat /var/lib/jenkins/secrets/initialAdminPassword +``` + +Open a browser to [localhost:8080](http://localhost:8080) and enter the initial admin password.