Detailed installation process of Jenkins on Linux

Detailed installation process of Jenkins on Linux

Involved

			contos7
			jdk1.8
			jenkins-2.190.3-1.1

1. Install JDK

#Method 1:

		Xiaobai recommends downloading directly with the command yum install java-1.8.0-openjdk* -y

## Method 2:

		Download the official JDK1.8 package:
			http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
			
		Copy to the server:
			There are many ways to do this: I download xftp7 and then drag it in directly		
		Unzip:
			tar -zxvf jdk-****-linux-x64.tar.gz
			
		Open the configuration environment variables:
			vim/etc/profiles

Configuration as shown

insert image description here

		Update environment variables: 
			Source /etc/profile
		Input View:
			Java -version

insert image description here

As shown in the figure: indicates success

2. Install Jenkins

		Command to switch to your own download directory and download directly with command wget http://pkg.jenkins-ci.org/redhat-stable/jenkins-2.190.3-1.1.noarch.rpm
		Download and install directly rpm -ivh jenkins-2.190.3-1.1.noarch.rpm

Installation successful as shown

insert image description here

3. Modify Jenkins configuration

		vi /etc/syscofig/jenkins
		Modify the port as follows:
		JENKINS_PORT="8888"

4. Start Jenkins

		Start command: systemctl start jenkins

As shown in the figure: indicates success

insert image description here

If the following error occurs (it must be the second method to install JDK)

Job for jenkins.service failed because the control process exited with error code. See “systemctl status jenkins.service” and “journalctl -xe” for details.

solve:

 	Open the file: vim /etc/init.d/jenkins  
 	Configure the JDK path in Jenkins

As shown in the figure:

insert image description here

After configuration, execute the following commands in sequence

Run the systemctl daemon-reload command to reload the configuration file. Run the systemctl start jenkins command to start Jenkins.
Execute the systemctl status jenkins.service command to view the status of the Jenkins service.

As shown in the figure: indicates success

insert image description here

5. Open the server port and access it through the browser

	CentoS7
			1. Open the firewall systemctl start firewalld
			2. Open the specified port firewall-cmd --zone=public --add-port=8888/tcp --permanent
			 Command meaning:
			--zone #scope --add-port=8888/tcp #Add port, the format is: port/communication protocol --permanent #Permanently effective, without this parameter, it will become invalid after restart 3. Restart the firewall firewall-cmd --reload
			4. Check the port number netstat -ntlp // View all current TCP ports

	Visit: http://192.168.5.53:8888

As shown in the figure: indicates success

insert image description here

6. Get the administrator password

	Command input:
		cat /var/lib/jenkins/secrets/initialAdminPassword

7. Customizing Jenkins

		It is recommended to click "Select plugin to install"
		Then on the next screen, uncheck all the selected plugins. Because Jenkins connects to the official by default, the speed is very slow and will fail, so skip the plugin installation first.

8. Create the first administrator user

		1) Create a user according to the prompts (no big problem)
		2) Instance configuration (default is fine)
		3) If you see Jenkins is ready, it means everything is fine. Click Start and wait for a while.

This is the end of this article about the super detailed process of installing Jenkins on liunx. For more relevant content about installing Jenkins on liunx, please search for previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope everyone will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • How to use the publish html report plugin to display HTML reports in Jenkins
  • Docker builds Jenkins and automates the steps of packaging and deploying projects
  • Jenkins configuration Maven project packaging, deployment, and release
  • How to implement shell scripting to execute tasks on a regular basis in Jenkins
  • The process of deploying a project to another host using Jenkins
  • Exception handling during primary use of Jenkins

<<:  Advantages and disadvantages of Table layout and why it is not recommended

>>:  CSS example code to hide the scroll bar and scroll the content

Recommend

How to hide rar files in pictures

You can save this logo locally as a .rar file and...

Tutorial on how to install htop on CentOS 8

If you are looking to monitor your system interac...

Complete steps for mounting a new data disk in CentOS7

Preface I just bought a new VPS. The data disk of...

Detailed explanation of tinyMCE usage and experience

Detailed explanation of tinyMCE usage initializat...

Share the responsive frameworks commonly used by web design masters (summary)

This article introduces and shares the responsive...

Detailed description of HTML table border control

Only show the top border <table frame=above>...

How to install nginx in docker and configure access via https

1. Download the latest nginx docker image $ docke...

Interviewer asked how to achieve a fixed aspect ratio in CSS

You may not have had any relevant needs for this ...

Detailed explanation of how to install MariaDB 10.2.4 on CentOS7

CentOS 6 and earlier versions provide MySQL serve...

my.cnf parameter configuration to optimize InnoDB engine performance

I have read countless my.cnf configurations on th...

Methods and steps for deploying go projects based on Docker images

Dependence on knowledge Go cross-compilation basi...

Detailed explanation of common commands in Docker repository

Log in docker login Complete the registration and...

12 Useful Array Tricks in JavaScript

Table of contents Array deduplication 1. from() s...

Vue globally introduces scss (mixin)

Table of contents 1. mixin.scss 2. Single file us...