Deploy Jenkins in Ubuntu 16.04

来源:互联网 发布:我想学做淘宝 编辑:程序博客网 时间:2024/06/03 05:11

This article is simple note how to deploy Jenkins in Ubuntu 16.04

1. Download JDK 1.8 and deploy 

Download link http://www.oracle.com/technetwork/java/javase/downloads/index.html

$ tar zxvf jdk-8u144-linux-x64.tar.gz 
$ sudo mkdir /usr/lib/jvm
$ sudo mv jdk1.8.0_144/ /usr/lib/jvm/
$ gedit ~/.bashrc
Add below contents in the end of the .bashrc
export JAVA_HOME=/usr/lib/jvm/jdk1.8.0_144
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH

(Then using "java --version" to check if java OK or not)

2. Download tomcat and deploy

Download link http://tomcat.apache.org/

$ tar zxvf apache-tomcat-9.0.0.M22.tar.gz

$ mv apache-tomcat-9.0.0.M22 ~/

$ mv apache-tomcat-9.0.0.M22/ ~/tomcat

3. Download Jenkins and deploy

Download link https://jenkins.io/download/

$ cp jenkins.war ~/tomcat/webapps/

4. Run tomcat

$ ~/tomcat/bin/startup.sh


At last, launch web browser, input address "localhost:8080/jenkins" to test.


Additional information, if not install tomcat, can use command "java -jar jenkins.war" to launch Jenkins.


原创粉丝点击