Skip to main content

Command Palette

Search for a command to run...

Setting Up Jenkins on AWS Linux: A Step-by-Step Guide

Published
2 min read
Setting Up Jenkins on AWS Linux: A Step-by-Step Guide
N

👋 Welcome to my Hashnode profile! I'm a passionate technologist with expertise in AWS, DevOps, Kubernetes, Terraform, Datree, and various cloud technologies. Here's a glimpse into what I bring to the table: 🌟 Cloud Aficionado: I thrive in the world of cloud technologies, particularly AWS. From architecting scalable infrastructure to optimizing cost efficiency, I love diving deep into the AWS ecosystem and crafting robust solutions. 🚀 DevOps Champion: As a DevOps enthusiast, I embrace the culture of collaboration and continuous improvement. I specialize in streamlining development workflows, implementing CI/CD pipelines, and automating infrastructure deployment using modern tools like Kubernetes. ⛵ Kubernetes Navigator: Navigating the seas of containerization is my forte. With a solid grasp on Kubernetes, I orchestrate containerized applications, manage deployments, and ensure seamless scalability while maximizing resource utilization. 🏗️ Terraform Magician: Building infrastructure as code is where I excel. With Terraform, I conjure up infrastructure blueprints, define infrastructure-as-code, and provision resources across multiple cloud platforms, ensuring consistent and reproducible deployments. 🌳 Datree Guardian: In my quest for secure and compliant code, I leverage Datree to enforce best practices and prevent misconfigurations. I'm passionate about maintaining code quality, security, and reliability in every project I undertake. 🌐 Cloud Explorer: The ever-evolving cloud landscape fascinates me, and I'm constantly exploring new technologies and trends. From serverless architectures to big data analytics, I'm eager to stay ahead of the curve and help you harness the full potential of the cloud. Whether you need assistance in designing scalable architectures, optimizing your infrastructure, or enhancing your DevOps practices, I'm here to collaborate and share my knowledge. Let's embark on a journey together, where we leverage cutting-edge technologies to build robust and efficient solutions in the cloud! 🚀💻

If you're looking to streamline your software development process, Jenkins is an indispensable tool. With its automation capabilities, Jenkins simplifies tasks like building, testing, and deploying applications. In this guide, we'll walk through the steps to install Jenkins on an AWS Linux instance, enabling you to harness its power for your projects.

Prerequisites

Before we begin, make sure you have:

- An AWS Linux instance up and running.

- SSH access to the instance.

- Basic knowledge of Linux commands.

Step 1: Update System Packages

First, let's ensure our system packages are up-to-date:

sudo dnf update

Step 2: Install Java Development Kit (JDK)

Jenkins requires Java to run. We'll install Amazon Corretto, a no-cost, multiplatform, production-ready distribution of the Open Java Development Kit (OpenJDK).

sudo dnf install java-17-amazon-corretto -y

java -version

Verify that Java is installed correctly by checking its version.

Step 3: Add Jenkins Repository

We need to add the Jenkins repository to our system:

sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo

Step 4: Import Jenkins Repository Key

To ensure the authenticity of the packages from the Jenkins repository, import the repository key:

sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io-2023.key

Step 5: Install Jenkins

Now, let's install Jenkins using the following command:

sudo dnf install jenkins -y

Step 6: Start and Enable Jenkins Service

Once Jenkins is installed, start the Jenkins service and enable it to start on system boot:

sudo systemctl start jenkins
sudo systemctl enable jenkins

Step 7: Access Jenkins Web Interface

Jenkins is now up and running on your AWS Linux instance. You can access its web interface using your instance's public IP address or domain name followed by port 8080 (the default Jenkins port). Open a web browser and navigate to:

http://your_instance_public_ip_or_domain:8080

Follow the on-screen instructions to complete the Jenkins setup wizard, including unlocking Jenkins and installing recommended plugins.

Conclusion

Congratulations! You've successfully installed Jenkins on your AWS Linux instance. With Jenkins configured, you're ready to automate your software development workflows, saving time and increasing efficiency in your projects. Explore Jenkins further to discover its extensive range of features and customization options tailored to your specific needs. Happy building!

More from this blog

NavyaDevops

78 posts

DevOps Engineer with advanced skills in cloud technologies. Proven track record in optimizing development and deployment processes. Dedicated to innovation and scalability in software development.