The process of building a Jenkins project under Linux (taking CentOS 7 as an example)

The process of building a Jenkins project under Linux (taking CentOS 7 as an example)

Take the deployment of https://gitee.com/tengge1/ShadowEditor as an example

1. Install JDK

1. Download jdk and install it using jdk-8u261-linux-x64.tar.gz as an example

2. Create a java folder

cd /usr/local mkdir java

3. Then unzip the jdk package

tar -zcvf jdk-8u261-linux-x64.tar.gz

4. Configure environment variables

vi /etc/profile

5. Join

insert image description here

6. Save and exit

:wq

7. Effective configuration file

source /etc/profile

8. Check the JDK version

java -version

2. Install node

1. Go to the official website to download the file that matches your system:

English website: https://nodejs.org/en/download/

Chinese website: http://nodejs.cn/download/

Take downloading node-v12.13.0-linux-x64.tar as an example

2. Unzip

cd /usr/local tar -xvf node-v12.13.0-linux-x64.tar

3. Check the node version

node -v

3. Install go

1. Download

Download address: https://golang.google.cn/dl/

insert image description here

Take go1.15.2.linux-amd64.tar.gz as an example

2. Unzip

cd /usr/local tar -zcvf go1.15.2.linux-amd64.tar.gz

3. Configure environment variables

vi /etc/profile

4. Join

insert image description here

Note: go get cannot be accessed directly in China, so you must first set up a proxy (to solve the problem that some go packages cannot be downloaded)

1). Enable the go modules feature to enable proxy mode

export GO111MODULE=on

2). Set the GOPROXY environment variable to set the proxy address

export GOPROXY=https://goproxy.io

5. Save and exit

:wq

6. Effective configuration file

source /etc/profile

7. Check the go version

go version

4. Install Jenkins

1. Download linux jenkins, official website address https://pkg.jenkins.io/redhat/

2. Create a folder in the root directory

mkdir jenkins

3. After downloading, put jenkins-2.174-1.1.noarch.rpm into the jenkins directory

Enter the jenkins directory and decompress it. Decompression command:

rpm -ivh jenkins-2.174-1.1.noarch.rpm

After successful decompression, check the directory where Jenkins is installed

whereis jenkins

4. Find the jdk installation path

ps -ef | grep java

insert image description here

5. Modify the /etc/init.d/jenkins file and configure the jdk installation path

vi /etc/init.d/jenkins

insert image description here

6. Start Jenkins

service jenkins start

7. Visit http://serverIP:8080/ and enter the jenkins password

8. Install Jenkins custom recommended plugins

9. Create Jenkins User

10. Configure git and enter the global tool configuration. Now Jenkins is installed and you can log in.

insert image description here

4. Build the project

1. Create a new view

2. Create a new task

3. Configure the project, configure the git project

insert image description here

4. Build triggers

insert image description here

5. Configure the shell command, then apply and save

insert image description here

6. Click Build, the blue ball indicates a successful build

insert image description here

7. Enter the Linux server and start the project (nohup usage: run commands without hanging up)

cd /var/lib/jenkins/workspace/ShadowEditor/build
nohup ./ShadowEditor serve >> ShadowEditor.out 2>&1 &

insert image description here

8. Visit http://ip:2020

Summarize

This is the end of this article about the Jenkins project building process under Linux (taking CentOS7 as an example). For more relevant content about building Jenkins on Linux, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • How to install Jenkins on CentOS 8
  • Detailed explanation of the installation process of Jenkins on CentOS 7
  • Automatic deployment using Jenkins on CentOS7
  • A detailed introduction to setting up Jenkins on Tencent Cloud Server

<<:  Implementation of MySQL5.7 mysqldump backup and recovery

>>:  JavaScript anti-shake and throttling explained

Recommend

A question about border-radius value setting

Problem Record Today I was going to complete a sm...

Using MySQL database in docker to achieve LAN access

1. Get the mysql image docker pull mysql:5.6 Note...

Solution to mysql error when modifying sql_mode

Table of contents A murder caused by ERR 1067 The...

Things to note when designing web pages for small-screen mobile devices

The reason is that this type of web page originate...

About the overlap of margin value and vertical margin in CSS

Margin of parallel boxes (overlap of double margi...

Examples of clearfix and clear

This article mainly explains how to use clearfix a...

Four modes of Oracle opening and closing

>1 Start the database In the cmd command windo...

Detailed explanation of data types in JavaScript basics

Table of contents 1. Data Type 1.1 Why do we need...

Docker packages the local image and restores it to other machines

1. Use docker images to view all the image files ...

Complete steps to implement face recognition login in Ubuntu

1. Install Howdy: howdy project address sudo add-...

CSS scroll bar style modification code

CSS scroll bar style modification code .scroll::-...

Vue uses GraphVis to develop an infinitely expanded relationship graph

1. Go to the GraphVis official website to downloa...

Analysis of mysql view functions and usage examples

This article uses examples to illustrate the func...