Jenkins安装及卸载

1、到Jenkins官网(https://jenkins.io/download/  )下载最新版本对应系统版本

2、上传rpm包,并安装: rpm -ivh jenkins-2.127-1.1.noarch.rpm

3、安装完成之后使用命令rpm -qc jenkins查看安装位置,如下:

[root@VM_147_103_ 3rd]# rpm -qc jenkins
/etc/init.d/jenkins
/etc/logrotate.d/jenkins
/etc/sysconfig/jenkins

4、编辑配置文件vim /etc/sysconfig/jenkins修改端口(我自己的改成了30078)

## Type:        integer(0:65535)
## Default:     8080
## ServiceRestart: jenkins
#
# Port Jenkins is listening on.
# Set to -1 to disable
#
JENKINS_PORT="30078"

5、启动命令为 service jenkins start

****如果启动报错,一般是java路径配置问题,修改如下:

vim /etc/init.d/jenkins

将:/usr/bin/java 改成自己的jdk路径

查询jdk路径:

[root@VM_147_103_ 3rd]# which java
/data/3rd/jdk1.8.0_152/bin/java

 

6、卸载jenkins

service jenkins stop

yum clean all

yum -y remove jenkins
1、rpm卸载
rpm -e jenkins

2、检查是否卸载成功
rpm -ql jenkins 

3、彻底删除残留文件:
find / -iname jenkins | xargs -n 1000 rm -rf

 

你可能感兴趣的:(基础知识,jenkins,jenkins安装,jenkins卸载)