How to Install Jenkins on CentOS?

How to Install Jenkins on CentOS?

INSTALLATION:

Jenkins is an open-source software package for continuous software development. It is used to automate parts of the build, testing, delivery, and deployment of applications.

Step-1: Download Jenkins repositories.

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

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

$ sudo dnf upgrade

Step-2: Add required dependencies for the jenkins package.

$ sudo dnf install fontconfig java-17-openjdk

$ sudo dnf install jenkins

Start Jenkins Service

To start the Jenkins service and enable it at startup, enter the following.

$ sudo systemctl start jenkins

$ sudo systemctl enable jenkins

To display the status of the Jenkins service, enter the following.

$ sudo systemctl status jenkins

Step 3: Open file.

vi jenkins

and paste below script in the file.

YOURPORT=8080

PERM="--permanent"

SERV="$PERM --service=jenkins"

firewall-cmd $PERM --new-service=jenkins

firewall-cmd $SERV --set-short="Jenkins ports"

firewall-cmd $SERV --set-description="Jenkins port exceptions"

firewall-cmd $SERV --add-port=$YOURPORT/tcp

firewall-cmd $PERM --add-service=jenkins

firewall-cmd --zone=public --add-service=http --permanent

firewall-cmd --reload

Step 4: Go to web browser and paste below url in the address bar.

https://localhost:8080


Thanks to our interns who participated in this initiative.


Thank you for reading this article. We are happy to prepare articles as per your request. Please comment on which tool you want installation process. Also please comment in any issues with above installation.

要查看或添加评论,请登录

AIMaster.live的更多文章

社区洞察

其他会员也浏览了