jenkins安装配置

环境:CentOS Linux release 7.3.1611 (Core)

tomcat8.5.11  

http://mirrors.tuna.tsinghua.edu.cn/apache/tomcat/tomcat-8/v8.5.11/bin/apache-tomcat-8.5.11.tar.gz

jenkins  

http://mirrors.jenkins.io/war/latest/jenkins.war

jdk1.8  

http://download.oracle.com/otn-pub/java/jdk/8u121-b13/e9e7ea248e2c4826b92b3f075a80e441/jdk-8u121-linux-x64.tar.gz

1、java安装

1
2
3
4
5
6
tar -zxvf jdk-8u121-linux-x64.tar.gz -C /usr/local/jdk1.8.0_121
echo "export JAVA_HOME=/usr/local/jdk1.8.0_121" >> /etc/profile
echo "export JRE_HOME=$JAVA_HOME/jre" >> /etc/profile
echo "export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib:$CLASSPATH" >> /etc/profile
echo "export PATH=$JAVA_HOME/bin:$PATH" >> /etc/profile
sourch /etc/profile

2、配置tomcat和jenjins

1
2
3
4
5
6
tar -zxvf  apache-tomcat-8.5.11.tar.gz -C /usr/local/tomcat8.5.11
rm -rf /usr/local/tomcat8.5.11/webapps/*
mkidr /usr/local/tomcat8.5.11/webapps/ROOT
unzip jenkins.war -d /usr/local/tomcat8.5/webapps/ROOT
echo "export JENKINS_HOME="/data/jenkins" >> /usr/local/tomcat8.5.11/bin/catalina.sh
mkdir -p /data/jenkins

(记得关闭防火墙和selinux)

启动tomecat

1
sh /usr/local/tomcat8.5.11/bin/startup.sh

cat /data/jenkins/secrets/initialAdminPassword

浏览器打开页面:密码输入上面目录中的密码




本文转自 irow10 51CTO博客,原文链接:http://blog.51cto.com/irow10/1906910,如需转载请自行联系原作者
上一篇:vmstat 命令详解


下一篇:Spring Boot实现定时任务的4种方式