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

CSS to achieve single-select folding menu function

Don’t introduce a front-end UI framework unless i...

How to create components in React

Table of contents Preface Component Introduction ...

Detailed explanation of fetch network request encapsulation example

export default ({ url, method = 'GET', da...

The actual process of encapsulating axios in the project

Table of contents Preface Benefits of axios encap...

win2008 server security settings deployment document (recommended)

I had been working on the project before the New ...

JavaScript to implement search data display

This article shares the data display code for Jav...

Ubuntu regularly executes Python script example code

Original link: https://vien.tech/article/157 Pref...

A brief analysis of the difference between FIND_IN_SET() and IN in MySQL

I used the Mysql FIND_IN_SET function in a projec...

Detailed graphic explanation of MySql5.7.18 character set configuration

Background: A long time ago (2017.6.5, the articl...

Zabbix3.4 method to monitor mongodb database status

Mongodb has a db.serverStatus() command, which ca...

Detailed explanation of nginx shared memory mechanism

Nginx's shared memory is one of the main reas...

How to use Vue's idea to encapsulate a Storage

Table of contents background Function Purpose Ide...

Detailed explanation of the process of installing MySQL on Ubuntu 18.04.4

Let's take a look at the process of installin...

mysql startup failure problem and scenario analysis

1. One-stop solution 1. Problem analysis and loca...