Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Essential commands to install Jenkins on EC2 and other activities // Amazon Linux (Refer Demo.1 of DevOps Episodes)
COMMAND SINPPETS (Also follow detailed videos at youtube.binpipe.org)
# Installing Jenkins
.........................................................................
yum update
yum install java-1.8.0-openjdk-devel telnet git -y
sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo
sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
yum upgrade
yum install jenkins maven -y
yum install docker -y
docker ps
systemctl enable docker
systemctl start docker
sudo groupadd docker
sudo usermod -aG docker $USER
sudo usermod -aG docker jenkins
service jenkins restart
sudo systemctl daemon-reload
sudo systemctl start jenkins
sudo systemctl enable jenkins
docker ps
docker run -d -p 80:80 httpd
curl icanhazip.com
# Run Netdata (https://learn.netdata.cloud/docs/agent/packaging/docker)
docker run -d --name=netdata -p 19999:19999 -v netdataconfig:/etc/netdata -v netdatalib:/var/lib/netdata -v netdatacache:/var/cache/netdata -v /etc/passwd:/host/etc/passwd:ro -v /etc/group:/host/etc/group:ro -v /proc:/host/proc:ro -v /sys:/host/sys:ro -v /etc/os-release:/host/etc/os-release:ro --restart unless-stopped --cap-add SYS_PTRACE --security-opt apparmor=unconfined netdata/netdata
# Get Jenkins Initial Password
cat /var/lib/jenkins/secrets/initialAdminPassword
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment