Install Jenkins on Ubuntu in Azure VM
Install Jenkins on Ubuntu in Azure VM
Select Create a resource option and then choose Virtual Machine Option:
In Virtual Machine page choose create option and proceed with following steps:
Select the name , resource group and OS for the VM along with the security option, size of the
server, user name, password and key generation.
In this page don't change anything unless it needs to be modified. It is advised not to change
anything .
After clicking create download the security key generated as it is very important to
connect with the VM.
Wait for Deployment of the VM.
Set the port to 8080 to make the vm accessible in that port address:
Now we have to connect the VM to our system:
For that open command prompt and type the following command : ssh -i
path-of-the-key-downloaded AzureUsername@IP-of-VM
Once connected you can assess the Azure vm with Ubuntu and from there you can
continue with the linux command for installing jenkins:
Installation op Jenkins:
Change Host Name to Jenkins
sudo hostnamectl set-hostname Jenkins
Install Java 11
sudo apt install default-jdk -y
Maven Installation
Maven is a popular build tool used for building Java applications. Please click here to learn more about
Maven. You can install Maven by executing below command:
Jenkins Setup
Install Jenkins
sudo apt install jenkins -y
The above screenshot should confirm that Jenkins is successfully installed.
Now Go to Azure Portal console. Click on Jenkins VM, Copy the public IP address.
Unlock Jenkins
You may get screen, enter the below command in Git bash( Ubuntu console)