Installing and configuring Jenkins
Deploy and configure the Jenkins automation server on your AWS EC2 instance.
Step 1: The below command to installs Jenkins on your system using the apt package manager. The -y flag automatically confirms all prompts during the installation process, ensuring seamless installation without manual intervention.
sudo apt install jenkins -y
Step 2: The below commands enable and checks the status of the Jenkins service using systemctl. It provides information about whether Jenkins is running, stopped, or encountering any issues.
sudo systemctl enable jenkins
sudo systemctl status Jenkins
4. Configuring Jenkins
Access the Jenkins web interface using the instance’s public IP address and port number to begin configuring and managing your Jenkins server and automation pipelines.
Step 1: Obtain Initial Admin Password.
After accessing Jenkins through your browser via “HTTP://<instance-ip>:8080”, you’ll be prompted to provide the initial admin password. This password is located in the file “/var/lib/jenkins/secrets/initialAdminPassword”. Copy the password from this file and paste it into the command shell prompt. Subsequently, you’ll receive a unique code for Jenkins initialization.
Step 2: Set Jenkins Administrator Password.
Once you’ve obtained the initial admin password from Step 1, paste it into the prompt labeled “Administrator password” in the Jenkins web interface. This step enables you to authenticate as the administrator and proceed with Jenkins setup and configuration.
Step 3: Create the First Admin User.
In this step, you will create the first admin user for your system, granting initial administrative privileges to manage and configure the platform.
Step 4: Install Suggested Plugins.
After setting up the administrator password, click on the “Install suggested plugins” button in the Jenkins web interface. This action initiates the installation of the recommended plugins, which are essential for Jenkins functionality and features.
Step 5: Jenkins Setup Completion.
With the installation and configuration completed, Jenkins is now ready for use. Navigate to the Jenkins dashboard and click on “New Item” to create a new job. From here, you can begin configuring and running your automated build and deployment pipelines.
Install Jenkins on Amazon EC2: Step-by-Step GuidePrerequisites
Jenkins configuration in the EC2 instance on the Amazon Web Service Platform includes all steps in detail, which helps the user easily set up your Jenkins tools on the EC2 instance for continuous integration and continuous development. Nowadays, Jenkins has become a more popular tool as compared to others, and it is open source. It is free, and it is lightweight. Jenkins using the 8080 port. Jenkins code is available for everyone to contribute and add more features to this tool. It has a strong community and it has a number of plugins to do any type of work related to continuous integration and continuous development.
Prerequisites
- We need to set up an Amazon account.
- Amazon Linux instance.
Contact Us