How to Install Jenkins on Ubuntu: A Step-by-Step Guide

How to Install Jenkins on Ubuntu: A Step-by-Step Guide

ยท

2 min read


Table of contents

ABOUT JENKINS-

  1. Jenkins is an open-source automation server written in Java that runs on Windows, macOS, and other UNIX-like operating systems. It is free, community- supported, and a popular first-choice tool for Continuous Integration (CI).

  2. Jenkins automates the entire software development lifecycle.

  3. Jenkins was originally developed by Sun Microsystems in 2004 under the name Hudson.

  4. It can run on any major platform without any compatibility issues.

  5. Whenever developers write code, it is integrated with the code from other developers, and the combined codebase is then built, tested, and deployed. This process is known as Continuous Integration and Continuous Deployment (CI/CD). Jenkins plays a crucial role in automating and streamlining this process.

ADVANTAGES OF JENKINS-

  1. We can also deploy with Jenkins.

  2. You can use your community plugin

  3. Jenkins is not just a tool; it is a framework. i.e., you can do whatever you want, you just need plugins.

  4. Jenkins can also behave as one server.

  5. We can attach nodes (slaves) to Jenkins (Master).

  6. It has a lot of plugins available.

Setup & Install Jenkins in AWS EC2 Ubuntu Instance-

  1. Launch Instance

    a. Ubuntu 24.04 LTS (free tier)

    b. create key pair

    c. Enable Security Group-

    HTTP

    HTTPS

    SSH

    Custom TCP (Port- 8080 [served for Jenkins])

  2. Connect to the EC2 Instance connect

  3. Once inside the terminal, copy the following commands

     sudo apt update
    

  4. Go to pkg.jenkins.io

  5. Select this-

    This will open a page -

  6. Once installed Jenkins, copy the following commands

     sudo systemctl start Jenkins
     sudo systemctl enable Jenkins
     sudo systemctl status Jenkins
    

  7. After editing the inbound rules 8080(Anywhere), we can now copy the public IP and open it in our preferred browser.

    <Public_Ip>:8080

  8. copy the password by runing cat /var/lib/jenkins/initialAdmin..........

  9. paste it then your jenkins is setup and ready to go.

    Final Thoughts

    Thank you for following along with this step-by-step guide on how to install Jenkins on Ubuntu! ๐ŸŽ‰ I hope this tutorial made the process crystal clear and helped you set up Jenkins smoothly on your own system. ๐Ÿš€โœจ

    If you have any questions, run into issues, or just want to share your experience, feel free to drop a comment below. ๐Ÿ’ฌ๐Ÿ‘‡ Iโ€™m here to help and would love to hear how your setup went! ๐Ÿ™Œ

    Happy coding! ๐Ÿ‘จโ€๐Ÿ’ป๐Ÿ‘ฉโ€๐Ÿ’ป Keep building, keep automating! ๐Ÿ’ก๐Ÿ”ง

ย