1. Jenkins Download
Jenkins Download URL: http://jenkins-ci.org/
2. Jenkins Installation
(1) Installing the JDK
JDK Download: http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
Installation:
Unzip the downloaded Jdk:tar zxvf jdk-7u55-linux-x64.gz
Copy (Note:/usr/java folder does not exist): Cp-r jdk1.7.0_55//usr/java
environment variable settings:
Change/etc/profile file
Export Java_home=/usr/java
Export jre_home= $JAVA _home/jre
EXPORT  classpath=.: $JAVA _home/lib: $JRE _home/lib:$classpath
Export path= $PATH: $JAVA _home/bin:$jre_home/bin
# Source/etc/profile
Make environment variables effective
To set up symbolic connections for Java and Javac:
This is the default JDK (this system by default is JDK1.4) changed to the newly installed jdk1.7
#cd/usr/bin
#ln-S-f/usr/java/jre/bin/java
#ln-S-f/usr/java/bin/javac
(2) Ubuntu configuration install Tomcat
Tomcat Download: http://tomcat.apache.org/download-70.cgi
Tomcat Installation:
A) decompression
# tar ZXVF apache-tomcat-7.0.54.zip
b) Move to a different folder
# MV Apache-tomcat-7.0.55/home/tomcat/tomcat
c) Start the Tomcat service
# Cd/home/tomcat/tomcat/bin
#./startup.sh
d) Check whether the start is successful
Visit url:http://localhost:8080/in your native browser
e) Stop Service
#./shutdown.sh
Configuring Tomcat to be self-booting by Tomcat users (using JSVC)
A) compile and install Jsvc
# Export Catalina_home=/home/tomcat/tomcat
# CD $CATALINA _home/bin
# tar Xvfz commons-daemon-native.tar.gz
# CD Commons-daemon-1.0.8-native-src/unix
#./configure
# make
# CP Jsvc. /..
Changing the Tomcat configuration file
$ vi/home/tomcat/tomcat/conf/server.xml
Change the connector node for 8080port, add the following configuration
Uriencoding= "UTF-8"
(3)Linux installation maven
Maven Download: http://mirror.bit.edu.cn/apache/maven/binaries/apache-maven-3.2.1-bin.tar.gz
Installation:
#tar-ZXVF apache-maven-3.2.1-bin.tar.gz
#mv Apache-maven-3.2.1/home/tomcat/maven
#vim/etc/profile
Add the following content:
#maven
M2_home=/home/tomcat/maven
Path= $PATH: $M 2_home/bin
Export M2_home PATH
Then make the environment variable effective:
#source/etc/profile
Enter #mvn-v validation is successful.
(4) Copy the downloaded Jenkins.war to the Tomcat WebApps folder:
sudo cp jenkins.war/home/tomcat/tomcat/webapps/
Add MAVEN Environment variables
Export Jenkins_home=/home/tomcat/tomcat/webapps/jenkins
To make the/etc/profile configuration file effective: Source/etc/profile
Jenkins Verification
In the browser, enter the URL: http://localhost:8080/jenkins/Displays the following interface:
Copyright notice: This article blog original articles, blogs, without consent, may not be reproduced.
Linux based on Deployment Jenkins