การติดตั้ง Jenkins on Ubuntu 18.04


Step 1 Install Java

$ sudo apt-get update
$ sudo apt-get install openjdk-11-jdk -y

Step 2 Install Jenkins

$ 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 update
$ sudo apt install jenkins -y

Step 3 Start Service

$ systemctl start jenkins
$ sudo ufw allow 8080

Step 4 Check port

$ sudo ufw status

Step 5 Change Default Port

$ sudo iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080

Success