In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces how to install Jenkins in Linux. It is very detailed and has a certain reference value. Friends who are interested must finish it!
1. Prepare the java environment, jdk1.8
Check if java is installed, and if not, install java environment first: java-version
two。 Install Jenkins
Official website: https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+on+Red+Hat+distributions#InstallingJenkinson
(1) install the stable version
Sudo wget-O / etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat-stable/jenkins.reposudo rpm-- import https://jenkins-ci.org/redhat/jenkins-ci.org.keysudo yum install jenkins
(2) install the latest version
Sudo wget-O / etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.reposudo rpm-- import https://jenkins-ci.org/redhat/jenkins-ci.org.keysudo yum install jenkins
(3) Select a version and wait for the installation to be completed
3. Configure Jenkins
Description: default installation directory
(1) / usr/lib/jenkins/:jenkins installation directory, where the WAR package will be placed.
(2) / etc/sysconfig/jenkins:jenkins configuration file, "Port", "JENKINS_HOME" and so on can be configured here.
(3) / var/lib/jenkins/: default JENKINS_HOME.
(4) / var/log/jenkins/jenkins.log:Jenkins log file.
(1) modify the default port number
Edit file: vim / etc/sysconfig/jenkins
Find JENKINS_PORT and change the default port number (8080) to 8081 here.
(2) modify jdk configuration
Edit file: vim / etc/init.d/jenkins
Find the java path where candidates added his own jdk on the first line
Note: linux command to view jdk installation path-- which java
(3) modify firewall configuration: choose a way to execute
(1) Open port 8081, and then restart the firewall:
Open port 8081: firewall-cmd-zone=public-add-port=8081/tcp-permanent
Restart the firewall: firewall-cmd-- reload
(2) disable the firewall: systemctl stop firewalld
4.Jenkins start / restart / stop command
Linux command line:
(1) start: service jenkins start
(2) restart: service jenkins restart
(3) stop: service jenkins stop
The browser goes to Jenkins
(1) Log in: http:// 's own IP:8081/
(2) disable: http:// 's own IP:8081/exit
(3) restart: http:// 's own IP:8081/restart
(4) reload: http:// 's own IP:8081/reload
5. Log in to Jenkins by browser
(1) unlock Jenkins:
Enter command: cat / var/lib/jenkins/secrets/initialAdminPassword
Copy the administrator password to the page input box: 92aa3b378394496fb9cd7f0c300
6. Install plug-ins according to your own needs
What is Linux system Linux is a free-to-use and free-spread UNIX-like operating system, is a POSIX-based multi-user, multi-task, multi-threaded and multi-CPU operating system, using Linux can run major Unix tools, applications and network protocols.
The above is all the contents of the article "how to install Jenkins in Linux". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
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: 244
*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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.