Linux installation steps for Jenkins and various problem solving (page access initialization password)

Linux installation steps for Jenkins and various problem solving (page access initialization password)

1. Prepare the Java environment, jdk1.8

Check whether Java is installed. If not, install the Java environment first: java -version

2. 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.repo
sudo rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key
sudo yum install jenkins

(2) Install the latest version

sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo
sudo rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key
sudo yum install jenkins

(3) Select a version and wait for the installation to complete

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", etc. can be configured here.
(3) /var/lib/jenkins/: The default JENKINS_HOME.
(4) /var/log/jenkins/jenkins.log: Jenkins log file.

(1) Modify the default port number

Edit the file: vim /etc/sysconfig/jenkins

Find JENKINS_PORT and change the default port number (8080). I changed it to 8081.

(2) Modify the JDK configuration

Edit the file: vim /etc/init.d/jenkins

Find candidates and add your own jdk java path in the first line

Note: Linux view jdk installation path command - which java

(3) Modify the firewall configuration: Choose one of the following methods to execute

(1) Open port 8081 and restart the firewall:
Open port 8081: firewall-cmd --zone=public --add-port=8081/tcp --permanent
Restart the firewall: firewall-cmd --reload

(2) Turn off the firewall: systemctl stop firewalld

4.Jenkins start/restart/stop commands

Linux command line:

(1) Start: service jenkins start
(2) Restart: service jenkins restart
(3) Stop: service jenkins stop

Enter Jenkins through the browser

(1) Log in: http://your own IP:8081/
(2) Close: http://your own IP:8081/exit
(3) Restart: http://your own IP:8081/restart
(4) Reload: http://your own IP:8081/reload

5. Log in to Jenkins via browser

(1) Unlock Jenkins:

Enter the command: cat /var/lib/jenkins/secrets/initialAdminPassword

Copy the administrator password into the input box: 92aa3b378394496fb9cd7f0c300

6. Install plugins according to your needs

Summarize

The above is the steps for installing Jenkins on Linux and various problem solving (page access initialization password) introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!
If you find this article helpful, please feel free to reprint it and please indicate the source. Thank you!

You may also be interested in:
  • Docker installation of Jenkins full process and stepping on the guide
  • Getting Started Tutorial on Jenkins Installation and Plugin Management Configuration
  • Jenkins environment setup download and installation process
  • Install Jenkins with Docker and solve the problem of initial plugin installation failure
  • How to install Jenkins on CentOS 8
  • Detailed instructions for installing Jenkins on Ubuntu 16.04
  • Analysis and solution of time zone problem in Jenkins installation

<<:  WeChat applet picker multi-column selector (mode = multiSelector)

>>:  mysql-8.0.16 winx64 latest installation tutorial with pictures and text

Recommend

Solution to MySQL Chinese garbled characters problem

1. The Chinese garbled characters appear in MySQL...

js to achieve star flash effects

This article example shares the specific code of ...

How to write HTML head in mobile device web development

Copy code The code is as follows: <head> &l...

HTML basic summary recommendation (title)

HTML: Title Heading is defined by tags such as &l...

Quickjs encapsulates JavaScript sandbox details

Table of contents 1. Scenario 2. Simplify the und...

Briefly explain the use of group by in sql statements

1. Overview Group by means to group data accordin...

Vue uses OSS to upload pictures or attachments

Use OSS to upload pictures or attachments in vue ...

Docker image optimization (from 1.16GB to 22.4MB)

Table of contents The first step of optimization:...

Website background music implementation method

For individual webmasters, how to make their websi...

Summary of solutions to common Linux problems

1. Connect Centos7 under VMware and set a fixed I...

How to avoid duplication of data when inserting in MySql batch

Table of contents Preface 1. insert ignore into 2...

Understanding MySQL precompilation in one article

1. Benefits of precompilation We have all used th...