-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkins_Ubuntu_CentOS
More file actions
42 lines (28 loc) · 1.37 KB
/
Jenkins_Ubuntu_CentOS
File metadata and controls
42 lines (28 loc) · 1.37 KB
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
39
40
41
42
============= Install Jenkins If local Setup =========
============= Install Java On Ubuntu ==========
sudo wget -O /usr/share/keyrings/jenkins-keyring.asc https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key
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
sudo apt update
sudo apt install fontconfig openjdk-17-jre -y
sudo apt install -y jenkins
sudo systemctl start jenkins
sudo systemctl status jenkins
Jenkins URL ====>> http://Your-Machine-IP:8080
============= Install Java On CentOS/Rocky===========
Add Jenkins repo
curl --silent --location http://pkg.jenkins-ci.org/redhat-stable/jenkins.repo | sudo tee /etc/yum.repos.d/jenkins.repo
sed -i 's/gpgcheck=1/gpgcheck=0/' /etc/yum.repos.d/jenkins.repo
dnf update -y
sudo dnf install -y java-17-openjdk
sudo dnf install -y jenkins
sudo systemctl start jenkins
sudo systemctl status jenkins
sudo systemctl enable jenkins
sudo firewall-cmd --permanent --add-port=8080/tcp
sudo firewall-cmd --reload
Jenkins URL ====>> http://Your-Machine-IP:8080
========================= If Using Docker Containers =======
docker pull jenkins/jenkins
mkdir ~/jenkins
docker run --name jenkins -d -p 8080:8080 -v ~/jenkins:/var/jenkins_home --restart=on-failure jenkins/jenkins
Jenkins URL ====>> http://Your-Machine-IP:8080