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

Blog    

Recommend

How to modify the port mapping of a running Docker container

Preface When docker run creates and runs a contai...

Introduction to the use of MySQL official performance testing tool mysqlslap

Table of contents Introduction Instructions Actua...

A quick solution to accidentally delete MySQL data (MySQL Flashback Tool)

Overview Binlog2sql is an open source MySQL Binlo...

JavaScript destructuring assignment detailed explanation

Table of contents concept Array Destructuring Dec...

Master the commonly used HTML tags for quoting content in web pages

Use blockquote for long citations, q for short ci...

Detailed process of building mysql5.7.29 on centos7 of linux

1. Download MySQL 1.1 Download address https://do...

Summary of some of my frequently used Linux commands

I worked in operations and maintenance for two ye...

How to check whether a port is occupied in LINUX

I have never been able to figure out whether the ...

Mysql error: Too many connections solution

MySQL database too many connections This error ob...

SQL implements LeetCode (180. Continuous numbers)

[LeetCode] 180. Consecutive Numbers Write a SQL q...

Introduction to the steps of deploying redis in docker container

Table of contents 1 redis configuration file 2 Do...

Specific use of ES6 array copy and fill methods copyWithin() and fill()

Table of contents Batch copy copyWithin() Fill ar...

Pure CSS to achieve a single div regular polygon transformation

In the previous article, we introduced how to use...

Solution to multiple 302 responses in nginx proxy (nginx Follow 302)

Proxying multiple 302s with proxy_intercept_error...