栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

Jenkins保姆教程:一、CentOS 8 安装与卸载

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Jenkins保姆教程:一、CentOS 8 安装与卸载

环境配置:

系统:CentOS 8

JAVA:1.8.0        【安装教程】

安装

1、配置本地Yum安装源
wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo

[root@CentOS8 ~]# wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo
--2021-11-29 16:21:26--  https://pkg.jenkins.io/redhat-stable/jenkins.repo
Resolving pkg.jenkins.io (pkg.jenkins.io)... 151.101.110.133, 2a04:4e42:11::645
Connecting to pkg.jenkins.io (pkg.jenkins.io)|151.101.110.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 85
Saving to: ‘/etc/yum.repos.d/jenkins.repo’

/etc/yum.repos.d/jenkins 100%[================================>]      85  --.-KB/s    in 0s      

2021-11-29 16:21:28 (7.73 MB/s) - ‘/etc/yum.repos.d/jenkins.repo’ saved [85/85]


2、导入秘钥
rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key

[root@CentOS8 ~]# rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key

3、安装
yum install jenkins

[root@CentOS8 ~]# yum install jenkins
Repository epel is listed more than once in the configuration
Jenkins-stable                                                                  8.7 kB/s |  21 kB     00:02    
Dependencies resolved.
================================================================================================================
 Package                    Architecture            Version                      Repository                Size
================================================================================================================
Installing:
 jenkins                    noarch                  2.303.3-1.1                  jenkins                   69 M
Installing dependencies:
 daemonize                  x86_64                  1.7.8-1.el8                  epel                      27 k

Transaction Summary
================================================================================================================
Install  2 Packages

Total download size: 69 M
Installed size: 69 M

4、查看安装目录
rpm -ql jenkins

[root@CentOS8 ~]# rpm -ql jenkins
/etc/init.d/jenkins
/etc/logrotate.d/jenkins
/etc/sysconfig/jenkins
/usr/lib/jenkins
/usr/lib/jenkins/jenkins.war
/usr/sbin/rcjenkins
/var/cache/jenkins
/var/lib/jenkins
/var/log/jenkins

5、启动jenkins服务并设置开机启动
systemctl start jenkins
systemctl enable jenkins

[root@CentOS8 ~]# systemctl start jenkins

[root@CentOS8 ~]# systemctl enable jenkins
jenkins.service is not a native service, redirecting to systemd-sysv-install.
Executing: /usr/lib/systemd/systemd-sysv-install enable jenkins

卸载
# 停止jenkins服务
[root@CentOS8 ~]# systemctl stop jenkins

# 停止jenkins开机启动服务
[root@CentOS8 ~]# systemctl disable jenkins

# yum卸载jenkins
[root@CentOS8 ~]# yum -y remove jenkins

# 删除jenkins相关文件
[root@CentOS8 ~]# rm -rf /var/{lib,log,cache}/jenkins /usr/lib/jenkins /root/.jenkins
[root@CentOS8 ~]# rm -rf `sudo find /{etc,var,run} -name "jenkins*"`

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/618821.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号