centos install jdk
安装之前先查看一下有无系统自带jdk
1 | rpm -qa |grep java |
如果有就使用批量卸载命令
1 | rpm -qa | grep java | xargs rpm -e --nodeps |
1 | rpm -qa |grep java |
1 | rpm -qa | grep java | xargs rpm -e --nodeps |
1 | cd /usr/local |
1 | wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo |
1 | rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key |
如果不能安装就到官网下载jenkis的rmp包,官网地址(http://pkg.jenkins-ci.org/redhat-stable/)
一. 官方下载地址:https://jenkins.io/download/
二. 镜像下载地址:http://mirrors.jenkins-ci.org/
1 | wget http://mirror.serverion.com/jenkins/redhat-stable/jenkins-2.235.1-1.1.noarch.rpm |
1 | yum install -y jenkins |