标签:jenkins
配置java环境
rpm –aq |grep jdk rpm -e --nodeps java-1.7.0-openjdk-1.7.0.65-2.5.1.2.el6_5.x86_64 rpm -e --nodeps java-1.6.0-openjdk-1.6.0.0-11.1.13.4.el6.x86_64
下载:http://download.oracle.com/otn-pub/java/jdk/
tar zxvf jdk-7u76-linux-x64.gz mv jdk1.7.0_76/ /usr/local/java
配置java环境变量
vi /etc/profile
JAVA_HOME=/usr/local/java CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar PATH=$PATH:$JAVA_HOME/bin JRE_HOME=$JAVA_HOME/jre export JAVA_HOME export PATH export CLASSPATH
source /etc/profile
安装Tomcat
wget http://mirrors.hust.edu.cn/apache/tomcat/tomcat-8/v8.0.21/bin/apache-tomcat-8.0.21.tar.gz tar zxvf apache-tomcat-8.0.21.tar.gz && mv apache-tomcat-7.0.59 /usr/local/tomcat
启动Tomcat
/usr/local/tomcat/bin/startup.sh
下载安装Maven
wget http://mirrors.cnnic.cn/apache/maven/maven-3/3.3.1/binaries/apache-maven-3.3.1-bin.tar.gz tar zxvf apache-maven-3.3.1-bin.tar.gz && mv apache-maven-3.3.1 /usr/local/maven
配置maven环境变量
vi /etc/profile
MAVEN_HOME=/usr/local/maven export PATH=${PATH}:${MAVEN_HOME}/bin export JAVA_HOME CLASSPATH PATH MAVEN_HOME USER LOGNAME MAIL HOSTNAME HISTSIZE HISTCONTROL CATALINA_HOME=/usr/local/tomcat export CATALINA_HOME
使环境变量生效
source /etc/profile
验证maven 是否安装成功
mvn -v
Apache Maven 3.3.1 (cab6659f9874fa96462afef40fcf6bc033d58c1c; 2015-03-13T16:10:27-04:00)
Maven home: /usr/local/maven
Java version: 1.8.0_20, vendor: Oracle Corporation
Java home: /usr/local/java/jdk1.8.0_20/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "2.6.32-504.el6.i686", arch: "i386", family: "unix"
安装Jenkins
wget http://mirrors.jenkins-ci.org/war/latest/jenkins.war mv Jenkins.war /usr/local/tomcat/webapps/
添加环境变量
vi /etc/profile
JENKINS_HOME=/usr/local/tomcat/webapps/Jenkins export JENKINS_HOME
使环境变量生效
source /etc/profile
启动Tomcat
访问web管理页面 http://ip:8080/jenkins
本文出自 “又耳的笔记本” 博客,请务必保留此出处http://youerning.blog.51cto.com/10513771/1714601
标签:jenkins
原文地址:http://youerning.blog.51cto.com/10513771/1714601