- Create a Google Cloud instance using f1-micro
- Select boot disk Ubuntu 19.04 minimal
- Allow HTTP and HTTPS traffic
sudo apt update && \
sudo apt install openjdk-8-jdk vim iputils-ping ufw -y
```bash | |
sudo ufw enable | |
sudo ufw allow 8080 | |
sudo ufw status | |
``` |
sudo apt update && \
sudo apt install openjdk-8-jdk vim iputils-ping ufw -y
sudo update-alternatives --config java
Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/lib/jvm/java-11-openjdk-amd64/bin/java 1111 auto mode
1 /usr/lib/jvm/java-11-openjdk-amd64/bin/java 1111 manual mode
2 /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java 1081 manual mode
Press <enter> to keep the current choice[*], or type selection number:
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
Confirm the service is running.
sudo systemctl status jenkins