当前位置:网站首页>Jenkins installation
Jenkins installation
2022-07-18 20:58:00 【Okay, okay】
Catalog
One 、 Basic environment preparation
1.jenkins official yum Source installation
3、 ... and 、 install javajdk、 install maven、 install node、 install git
4. Modify the installation source to Tsinghua image source
5、 ... and 、jenkins Global configuration
2.jenkins javajdk To configure
2. Configure nailing notifications
One 、 Basic environment preparation
A good basic environment can avoid some unnecessary mistakes
1. Turn off firewall
systemctl stop firewalld
2. close selinux
setenforce 0 sed -i "s/SELINUX=.*$/SELINUX=disabled/g" /etc/selinux/config
Two 、 install jenkins
1.jenkins official yum Source installation
sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
2. install jenkins
yum -y install java-1.8.0-openjdk jenkins systemctl restart jenkins
notes : here jenkins I can't get up , Probably jdk The problem may be changed jdk Give it a try
3、 ... and 、 install javajdk、 install maven、 install node、 install git
1.javajdk install
[[email protected] opt]# tar -xf jdk-17_linux-x64_bin.tar.gz [[email protected] opt]# mv jdk-17 /usr/local/jdk [[email protected] opt]# vi /etc/profile export JAVA_HOME=/usr/local/jdk export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar export PATH=$JAVA_HOME/bin:$PATH[[email protected] opt]# source /etc/profile
[[email protected] opt]# java -version
java version "17" 2021-09-14 LTS
Java(TM) SE Runtime Environment (build 17+35-LTS-2724)
Java HotSpot(TM) 64-Bit Server VM (build 17+35-LTS-2724, mixed mode, sharing)
2.maven install
[[email protected] opt]# tar -xf apache-maven-3.5.4-bin.tar.gz [[email protected] opt]# mv apache-maven-3.5.4-bin /usr/lcoal/maven [[email protected] opt]# vi /etc/profile #maven export MAVEN_HOME=/usr/local/maven export PATH=$MAVEN_HOME/bin:$PATH[[email protected] opt]# source /etc/profile
[[email protected] opt]# mvn -v
Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-18T02:33:14+08:00)
Maven home: /usr/local/maven
Java version: 17, vendor: Oracle Corporation, runtime: /usr/local/jdk
Default locale: zh_CN, platform encoding: UTF-8
OS name: "linux", version: "3.10.0-1160.el7.x86_64", arch: "amd64", family: "unix"
3.git install
[[email protected] opt]# yum -y install git [[email protected] opt]# which git /usr/bin/git
4.node install
[[email protected] opt]# tar -xf node-v16.10.0-linux-x64.tar.xz [[email protected] opt]# mv node-v16.10.0-linux-x64 /usr/local/nodejs [[email protected] opt]# vi /etc/profile #node export NODE_HOME=/usr/local/nodejs export PATH=$NODE_HOME/bin:$PATH export NODE_PATH=$NODE_HOME/lib/node_modules[[email protected] opt]# source /etc/profile
[[email protected] opt]# node -v
v16.10.0
[[email protected] opt]# npm -v
7.24.0
[[email protected] opt]# npm install -g cnpm --registry=https://registry.npm.taobao.org # My installation package does not have this command, so I need to install the following , If your installation package has this command, you can skip this step
[[email protected] opt]# cnpm -v
[email protected] (/usr/local/nodejs/lib/node_modules/cnpm/lib/parse_argv.js)
[email protected] (/usr/local/nodejs/lib/node_modules/cnpm/node_modules/npm/lib/npm.js)
[email protected] (/usr/local/nodejs/bin/node)
[email protected] (/usr/local/nodejs/lib/node_modules/cnpm/node_modules/npminstall/lib/index.js)
prefix=/usr/local/nodejs
linux x64 3.10.0-1160.el7.x86_64
registry=https://registry.npmmirror.com
Four 、jenkins initialization
1. initialization jenkins






2. Sinicization jenkins




3. modify admin password


4. Modify the installation source to Tsinghua image source



https://mirrors.tuna.tsinghua.edu.cn/jenkins/updates/update-center.json Replace the address in the upgrade site with this .
5、 ... and 、jenkins Global configuration

1.jenkins maven To configure

2.jenkins javajdk To configure

3.jenkins git To configure

4.jenkins node To configure
node One needs to be installed nodejs Only plug-ins can be configured

-----------------
Restart after installation jenkins Then go back to the global configuration ,k You can see more than one nodejs

I don't think the installation package cnpm Therefore, you need to manually execute the following commands to install cnpm, If you don't have one, do it again
npm install -g cnpm --registry=https://registry.npm.taobao.org
6、 ... and 、 The pit I stepped on ( Come here jenkins The installation of is complete , Here are some additions )
1.jenkins If there is a problem with startup, it cannot be started normally or an error is reported ,
I'm changing jdk solve
2. The initialization phase shows that it is offline ,
https://www.cnblogs.com/socketqiang/p/10974191.html
If there is anything not mentioned, please add it in the comment area .
7、 ... and 、 Add
1. Configure mailbox
Email authorization code method , I won't write next , The following links are
https://jingyan.baidu.com/article/fedf0737af2b4035ac8977ea.html
(1) Configure the plug-ins that need to be installed in the mailbox Mailer Plugin, If not, install the following
(2)



2. Configure nailing notifications
(1) Installing a plug-in
DingTalk Install the plug-in
(2) Create a nail robot







(3) Setting nails

(4) Add nail robot to the project
Versions may vary from location to location , Some versions are operated after construction , Mine is General Inside

3. Forget the password
vi /var/lib/jenkins/users/admin_*/config.xml Find the tape pass Replace one line of the bar with the following , Then save, exit and restart , The password becomes 123456789 <passwordHash>#jbcrypt:$2a$10$Kas7FMng/zw19kOHdv41WO45mVmFgdl80gTm4xRyOCubsmF76v7B.</passwordHash>
边栏推荐
- 嵌入式开发:加速固件开发的7个技巧
- 整蛊小程序(宝宝,我是天下第一大傻X)代码
- R语言使用pcauchy函数生成柯西分布累积分布函数数据、使用plot函数可视化柯西分布累积分布函数数据(Cauchy distribution)
- Pytorch 深度可分离卷积和MobileNet_v1
- 博客从 CloudBase 迁移至云主机
- 程序员都看不懂的代码 渐隐渐现1920-500(1)
- Applet page navigation
- R语言ggplot2可视化:ggplot2可视化密度图(density plot)并使用geom_vline函数添加均值竖线、添加均值数值标签(Mean Line or Vertical Line )
- app安全检测指南学习笔记
- Unity-2D像素晶格化消融
猜你喜欢

EPIC-KBS9工控机刷机文档

Mathematical modeling - Classification Model (based on logistic regression)

什么是产业规划?产业园区该如何做好产业规划
![[untitled]](/img/36/fb28ed9218edd1daeb5757653a8655.png)
[untitled]

Win10 如何将FAT32格式磁盘不用格式化无损转化为NFTS格式

【缓存】一种新的缓存 Caffeine Cach 介绍

20. Network principles - Basic Concepts

There is something that turns vscode into an idea effect

浅谈数组方法重构再封装-forEach-Map——push(),unshift(),shift(),Map(),filter(),every(),some(), reduce()

redis实现分布式锁
随机推荐
Sword finger offer 54 The k-th node of binary search tree
摸清企业选址动机及需求,高效开展招商引资工作
小程序页面导航
有点东西,竟然把VSCode玩成了IDEA的效果
数据统计分析案例(对比分析、销量定比分析、同比、双坐标图、环比、shift、贡献度分析(帕累托法则)、差异化分析、resample、季节性波动分析)
The first ide overlord in the universe, replaced...
Trickery applet (baby, I'm the biggest fool in the world x) code
R语言ggplot2可视化:使用ggpubr包的ggecdf函数可视化经验累积密度分布函数曲线(Empirical cumulative density function)
基于 Servlet 项目——博客系统
劍指 Offer 57. 和為s的兩個數字
Sword finger offer 55 - I. depth of binary tree
Redis - 槽管理命令详解
Nexus5 root brush
R语言使用dplyr包的arrange函数进行dataframe排序、arrange函数基于一个字段(变量)进行降序排序实战
剑指 Offer 54. 二叉搜索树的第k大节点
World Tour Finals 2019 D - Distinct Boxes 题解
SkyWalking 针对 gRPC 的负载均衡和自动扩容实践
Have you met these use case design questions during the interview?
nexus5 root 刷机
[untitled]