1. 程式人生 > >linux學習:持續集成篇--安裝Jenkins持續集成平臺-05

linux學習:持續集成篇--安裝Jenkins持續集成平臺-05

持續集成 jenkins

一、Jenkins需要使用maven,所以首先安裝maven

1、解壓

[[email protected] tar]# tar -zxvf apache-maven-3.5.0-bin.tar.gz -C /opt

2、重命名

[[email protected] opt]# mv apache-maven-3.5.0/ maven

3、配置maven環境變量

export JAVA_HOME=/opt/jdk
export MAVEN_HOME=/opt/maven
export PATH=.:$JAVA_HOME/bin:MAVEN_HOME/bin:$PATH

刷新配置:

source /etc/profile

4、settings.xml配置

詳情查看http://1754966750.blog.51cto.com/7455444/1911760

二、安裝Jenkins

1、創建文件夾JenkinsHome

[[email protected] opt]# mkdir /opt/JenkinsHome

2、配置環境變量

export JAVA_HOME=/opt/jdk
export MAVEN_HOME=/opt/maven
export JENKINS_HOME=/opt/JenkinsHome
export PATH=.:$JAVA_HOME/bin:MAVEN_HOME/bin:$PATH

刷新配置:source /etc/profile

3、修改tomcat內存(tomcat/bin/catalina.sh)

JAVA_OPTS=‘-Xms256m -Xmx512m‘

4、上傳jenkins.war到tomcat,並且啟動

訪問:http://192.168.91.7:8080/jenkins

技術分享


技術分享

選擇安裝插件,左邊為所有插件,右邊可以自定義安裝

技術分享

當上面步驟完成之後,第一次運行Jenkins,需要設置管理員信息

技術分享


技術分享


技術分享

設置tomcat的字符集:server.xml

<Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" URIEncoding="UTF-8" />

本文出自 “我愛大金子” 博客,請務必保留此出處http://1754966750.blog.51cto.com/7455444/1941793

linux學習:持續集成篇--安裝Jenkins持續集成平臺-05