forked from LearningConatiner/HelpDocuments
-
Notifications
You must be signed in to change notification settings - Fork 0
/
JenkinsHelp
39 lines (27 loc) · 1.52 KB
/
JenkinsHelp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
This scope of this file is to provide commands that will help install /uninstall jenkins on ubuntu
1. Uninstall
To uninstall jenkins
sudo service jenkins stop
remove the package
sudo apt-get remove jenkins
sudo apt-get remove --auto-remove jenkins
2. Installation
On Debian-based distributions, such as Ubuntu, you can install Jenkins through apt.
Recent versions are available in an apt repository. Older but stable LTS versions are in this apt repository.
wget -q -O - https://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add -
sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
sudo apt-get update
sudo apt-get install jenkins
3. Post-install (Setup Wizard)
Create Admin User and Password for Jenkins
Jenkins is initially configured to be secure on first launch. Jenkins can no longer be accessed without a username and password and open ports are limited. During the initial run of Jenkins a security token is generated and printed in the console log:
*************************************************************
Jenkins initial setup is required. A security token is required to proceed.
Please use the following security token to proceed to installation:
41d2b60b0e4cb5bf2025d33b21cb
*************************************************************
4.open browser and connect to localhost:8080
select suggested plugins and next
all plugins get automatically installed from the updated repositories
4.ADd docker and jenkins to same user group
sudo gpasswd -a jenkins docker