Jenkins部署
Posted 罗穆瑞,卡子火,crabluo,luomurui,kazih
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Jenkins部署相关的知识,希望对你有一定的参考价值。
yum安装方式
[root@kazihuo ~]# wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo
[root@kazihuo ~]# rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key
[root@kazihuo ~]# yum install -y jenkins
[root@kazihuo ~]# yum install java
[root@kazihuo ~]# java -version
openjdk version "1.8.0_65"
OpenJDK Runtime Environment (build 1.8.0_65-b17)
OpenJDK 64-Bit Server VM (build 25.65-b01, mixed mode)
[root@kazihuo ~]# systemctl start jenkins.service
注:当启动报错时,可能是java的版本不对应。
war包方式
此方式是基于java及tomcat环境。
[root@kazihuo ~]# java -version
openjdk version "1.8.0_65"
[root@kazihuo /usr/local/tomcat/bin]# ./version.sh
Server version: Apache Tomcat/8.5.15
[root@kazihuo /usr/local/tomcat/webapps]# wget http://mirrors.jenkins.io/war-stable/latest/jenkins.war
[root@kazihuo ~]# /usr/local/tomcat/bin/catalina.sh start
[root@kazihuo /usr/local/tomcat/logs]# cat catalina.out #通过日志提取页面登陆密码,或者通过jenkins初始化页面显示的对应路径查看密码!
*************************************************************
Jenkins initial setup is required. An admin user has been created and a password generated.
Please use the following password to proceed to installation:
1cf0ebf28ae8454c903ba0135116c5d3
This may also be found at: /root/.jenkins/secrets/initialAdminPassword
*************************************************************
验证:
192.168.10.11:8080/jenkins
以上是关于Jenkins部署的主要内容,如果未能解决你的问题,请参考以下文章