Jenkins maven svn tomcat automatic deployment and installation, jenkinsmaven
Jenkins + svn + tomcat Remote Deployment
1. jdk installation:
1. Download Jdk from the official oracle website. decompress it to/usr/local and rename it jdk.
2. environment variable configuration vi/etc/profile
Export JAVA_HOME =/usr/local/jdk
Export CLASSPATH =.: $ {JAVA_HOME}/jre/lib/rt. jar: $ {JAVA_HOME}/lib/tools. jar
Export PATH = $ PATH: $ {JAVA_HOME}/bin
Save the file and make the environment variable take effect. source/etc/profile
Ii. Install maven:
: Download maven
Download, decompress the package, and rename it maven.
Add Environment Variables
Vi/etc/profile
Export MAVEN_HOME = "usr/local/maven"
Export PATH = $ MAVEN_HOME/bin: $ PATH
Save source/etc/profile
Verify Installation
[Root @ localhost workspace] # mvn-v
Apache Maven 3.5.2 (138edd61fd100ec658bfa2d307c43b76940a5d7d; 2017-10-18T15: 58: 13 + 08: 00)
Maven home:/usr/local/maven
Java version: 1.8.0 _ 144, vendor: Oracle Corporation
Java home:/usr/local/jdk/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.10.0-327.13.1.el7.x86 _ 64", arch: "amd64", family: "unix"
You have mail in/var/spool/mail/root
Tomcat 7 download: tomcat download
Download and decompress jenkins
My tomcat Directory:/workspace/wwwroot/jenkins/
Jenkins war package download
Download CLICK: Address
Put jenkins. war in/workspace/wwwroot/jenkins/webapps
Jenkins workspace configuration: vim/etc/profile export JENKINS_HOME =/workspace/jenkins_workspace save source/etc/profile
Export
Modify/workspace/wwwroot/jenkins/conf/service. xml
ConnectionTimeout = "20000"
RedirectPort = "8443" type = "regxph" text = "yourobjectname"/>
Three ports and three ports cannot be occupied
Save the modification. Restart tomcat sh/workspace/wwwroot/jenkins/bin/startup. sh; tail-f/workspace/wwwroot/jenkins/logs/catalina. out.
Use ip + port + project name to access ip: 8001/jenkins
System settings-global tool configuration jdk Configuration
Maven Configuration
Create a maven Project
Svn Configuration
Account Password Configuration
Build a project
Configure an ssh remote release project