Install Docker and Jenkins in Red hat 8.1/centOs

Hi there! 👋 I'm Ritik Gupta, a passionate tech enthusiast and lifelong learner dedicated to exploring the vast world of technology. From untangling complex data structures and designing robust system architectures to navigating the dynamic landscape of DevOps, I aim to make challenging concepts easy to understand. With hands-on experience in building scalable solutions and optimizing workflows, I share insights from my journey through coding, problem-solving, and system design. Whether you're here for interview tips, tutorials, or my take on real-world tech challenges, you're in the right place! When I’m not blogging or coding, you can find me contributing to open-source projects, exploring new tools, or sipping on a good cup of coffee ☕. Let’s learn, grow, and innovate together!
What is a package manager in Linux?
An operating system's package manager is a tool that enables users to install, uninstall, upgrade, configure, and manage software packages. The package manager can be a command-line tool like apt-get or pacman or a graphical program like a software center.
What is a package?
A package is usually referred to as an application, but it could be a GUI application, a command line tool, or a software library (required by other software programs). A package is essentially an archive file containing the binary executable, configuration file, and sometimes information about the dependencies.
Different kinds of package managers
Package managers differ based on the packaging system, but the same packaging system may have more than one package manager.
For example, RPM has Yum and DNF, package managers. For DEB, you have apt-get, command line-based package managers.
Install docker on Rhel using yum
To install docker in Rhel 8
create a repolist for the docker using the command
cd /etc/yum.repos.dand create a repo file here
usingvim docker.repothen write the source
[docker] baseurl=https://download.docker.com/linux/cen... gpgcheck=0check the reposlist using the
yum repolist.Install docker using the command
yum install docker-ce -y --nobest.start the docker services using the
systemctl start docker.systemctl is the systemd command for start services start on a Linux system
systemctl enable docker.check the status of docker in your system using
systemctl status docker.
Install jenkins on Rhel using yum
start with creating a repo but this time we will download the repo using the wget command.
sudo wget -O /etc/yum.repos.d/jenkins.repo \ https://pkg.jenkins.io/redhat-stable/jenkins.repo sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.keyupgrade yum using the
yum upgradeinstall the jenkins and other dependencies.
sudo yum install java-11-openjdk sudo yum install jenkins sudo systemctl daemon-reloadstart the jenkins services and enables it.
systemctl start jenkins systemctl enable jenkinscheck the status of jenkins using
systemctl status jenkinsit will output like this

Now out next step is to unlock jenkins
Browse to
http://localhost:8080(or whichever port you configured for Jenkins when installing it) and wait until the Unlock Jenkins page appears.From the Jenkins console log output, copy the automatically-generated alphanumeric password

On the Unlock Jenkins page, paste this password into the Administrator password field and click Continue.
click on install suggested plugins.

Now it will start installing the plugins reguired.

After the installation create first admin user page will appears

after the Admin creation it will ask for configure url.

jenkins is installed and configured.





