码迷,mamicode.com
首页 > 其他好文 > 详细

Jenkins+tomcat+jdk setup

时间:2015-06-02 22:03:35      阅读:218      评论:0      收藏:0      [点我收藏+]

标签:

Jenkins download: http://jenkins-ci.org/

jdk version:jdk-7u45-linux-x64.tar.gz

tomcat version:apache-tomcat-7.0.62.tar.gz

OS: rhel7.0_x64

1. install jdk:

1.1.
    # cp jdk-7u45-linux-x64.tar.gz  /usr/lib/jvm
    # tar zxvf jdk-7u45-linux-x64.tar.gz
    # vi /root/.bashrc
add the following content:
    #jdk

        export JAVA_HOME=/usr/lib/jvm/jdk1.7.0_45
        export JRE_HOME=${JAVA_HOME}/jre

        export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib

        #environmental variable

        export PATH=.:${JAVA_HOME}/bin:$PATH  
1.2.
    #source /root/.bashrc  #take effect
1.3.
    #echo $JAVA_HOME #to check

2. install tomcat and jenkins

2.1 unzip the tar

tar zxvf apache-tomcat-7.0.62.tar.gz

2.2 add following content in /opt/apache-tomcat-7.0.62/bin/startup.sh

TOMCAT_HOME=/opt/apache-tomcat-7.0.62

2.3 copy jenkins.war under /opt/apache-tomcat-7.0.62/webapps/. Then it will be unzip automatically.

[root@songnan05 jenkins]# ls
ColorFormatter.class   help                           jobs                         MainDialog$1.class             plugins                   updates
css                    hudson.model.UpdateCenter.xml  LogFileOutputStream$1.class  MainDialog.class               robots.txt                userContent
dc-license.txt         identity.key.enc               LogFileOutputStream$2.class  Main$FileAndDescription.class  scripts                   war
Download metadata.log  images                         LogFileOutputStream.class    META-INF                       secret.key                WEB-INF
Main.class                   nodeMonitors.xml               secret.key.not-so-secret  winstone.jar
favicon.ico            JNLPMain.class                 MainDialog$1$1.class         nodes                          secrets
[root@songnan05 jenkins]# pwd
/opt/apache-tomcat-7.0.62/webapps/jenkins

2.4 visit http://url:8080/jenkins/

Jenkins+tomcat+jdk setup

标签:

原文地址:http://blog.csdn.net/xingyunpi/article/details/46334527

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!