首先需要安装 Jenkins 的仓库。
执行下面的命令:
sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo
sudo rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key
sudo yum install jenkins
安装 Jenkins 稳定版本
sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat-stable/jenkins.repo
sudo rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key
sudo yum install jenkins
如果你没有安装 JDK,你需要安装 JDK ,否则,可以直接启动
sudo service jenkins start/stop/restart
sudo chkconfig jenkins on