Deploying Jenkins under Linux

Source: Internet
Author: User
Tags stop script

#前提先建好/opt/app directory   #将/opt/app directory assigned to the user Jenkins with root account Chown jenkins:jenkins /opt/app 1, from Jenkins Official website Download WAR2, will Jenkins.war-Root.war this is to define the port of Jenkins directly mapped to/under 3, created under/opt/app/bin Web launch Script Tomcat-jenkins-start.sh #!/bin/bashexport lb_librar_path= "/usr/local/apache-tomcat/bin/native" Export Java_home= "/usr/lib/jdk1.7.0_79"  export catalina_opts= "-dtomcat.server.port=8083-dtomcat.http.port=8089- Dtomcat.instance.name=jenkins-xmx512m-xx:permsize=256m-xx:maxpermsize=256m-xx:+heapdumponoutofmemoryerror " Export catalina_out= "/opt/app/logs/jenkins/catalina.out" Export catalina_pid= "/opt/app/run/tomcat-jenkins.pid" Export catalina_base= "/opt/app/webapps/jenkins"  # rm-rf/opt/app/webapps/jenkins/work# rm-rf/opt/app/webapps/ jenkins/webapps/root  /usr/local/apache-tomcat/bin/catalina.sh Start exit $?  4, Create a Jenkins Stop script Tomcat-jenkins-stop.sh#!/bin/bash export java_home= "/usr/lib/jdk1.7.0_79"  export JAVA_ Opts= "-dtomcat.server.port=8083-dtomcat.http.port=8089-dtomcat.instance.name=jenkins "Export catalina_pid="/opt/app/run/tomcat-jenkins.pid " Export catalina_base= "/opt/app/webapps/jenkins"  /usr/local/apache-tomcat/bin/catalina.sh stop 30-force  Exit $? 5, copy the conf/directory under the Tomcat directory to/opt/app/webapps/jenkins/, modify Server.xml, add <context path= "/" to the host node Docbase= ". /webapps/root/"debug=" 0 "reloadable=" true "/>  this execution Tomcat-jenkins-start can start the site       

Deploying Jenkins under Linux

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.