Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Detailed explanation of the process of installing Jenkins in CentOS 7

2025-01-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Install Jenkins through Yum

I. installation

# yum Source Import wget-O / etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo# Import key rpm-- import https://pkg.jenkins.io/redhat-stable/jenkins.io.key# install yum install-y jenkins

II. Open ports

# Port can be modified in / etc/sysconfig/jenkins file. Default is 8080firewall-cmd-- add-port=8080/tcp-- permanentfirewall-cmd-- reload.

3. Configure Java path

# modify jenkins startup script vim / etc/init.d/jenkins# modify candidates add java optional path: / usr/java/jdk1.8.0_181/bin/javacandidates= "/ etc/alternatives/java/usr/lib/jvm/java-1.8.0/bin/java/usr/lib/jvm/jre-1.8.0/bin/java/usr/lib/jvm/java-1.7.0/bin/java/usr/lib/jvm/jre-1.7 .0 / bin/java/usr/bin/java/usr/java/jdk1.8.0_181/bin/java "

4. Start Jenkins and set boot

# reload service (due to the previous modification of Jenkins startup script) systemctl daemon-reload# startup Jenkins service systemctl start jenkins# sets the Jenkins service to boot # because Jenkins is not Native Service, you need to use the chkconfig command instead of the systemctl command / sbin/chkconfig jenkins on

5. Initialization of Jenkins

Use cat / var/lib/jenkins/secrets/initialAdminPassword to view the password, enter it on the Jenkins administration page to unlock it, and then you can visualize it!

When you start for the first time, you may encounter a page that says "Please wait while Jenkins is getting ready to work." edit the / var/lib/jenkins/hudson.model.UpdateCenter.xml file, and change the "https://updates.jenkins.io/update-center.json"" to "http://mirror.xmission.com/jenkins/updates/update-center.json"".

VI. Other

6.1 set the time zone of Jenkins to Beijing time

Open [system Management]-> [script Command Line] and run the following command

System.setProperty ('org.apache.commons.jelly.tags.fmt.timeZone',' Asia/Shanghai')

The above is the whole content of this article, I hope it will be helpful to your study, and I also hope that you will support it.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report