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

Instructions for using MySQL isolation Read View

Which historical version can the current transact...

WHMCS V7.4.2 Graphical Installation Tutorial

1. Introduction WHMCS provides an all-in-one solu...

How to manually install MySQL 5.7 on CentOS 7.4

MySQL database is widely used, especially for JAV...

mysql delete multi-table connection deletion function

Deleting a single table: DELETE FROM tableName WH...

Solution to IDEA not being able to connect to MySQL port number occupation

I can log in to MYSQL normally under the command ...

jQuery+swiper component realizes the timeline sliding year tab switching effect

Result: Implementation code: Need to be used with...

Detailed explanation of long transaction examples in MySQL

Preface: The "Getting Started with MySQL&quo...

Understanding and application of JavaScript ES6 destructuring operator

Table of contents Preface The role of deconstruct...

Using NTP for Time Synchronization in Ubuntu

NTP is a TCP/IP protocol for synchronizing time o...

Docker's health detection mechanism

For containers, the simplest health check is the ...

Let's talk about Vue's mixin and inheritance in detail

Table of contents Preface Mixin Mixin Note (dupli...