centos7.6部署Jenkins
2019-07-21 本文已影响0人
zwb_jianshu
一、下载Jenkins、jdk1.8、tomcat8.5、maven3.6的安装包
jdk:http://download.oracle.com/otn-pub/java/jdk/8u181-b13/96a7b8442fe848ef90c96a2fad6ed6d1/jdk-8u181-linux-x64.tar.gz
jenkins:http://mirrors.jenkins.io/war-stable/latest/jenkins.war
tomcat:http://mirrors.tuna.tsinghua.edu.cn/apache/tomcat/tomcat-8/v8.5.43/bin/apache-tomcat-8.5.43.tar.gz
maven:http://mirrors.tuna.tsinghua.edu.cn/apache/maven/maven-3/3.6.1/binaries/apache-maven-3.6.1-bin.tar.gz
二、上传到/server/tools
mkdir /application -p
tar xf jdk-8u181-linux-x64.tar.gz -C /usr/loacl
mv jdk-8u181-linux-x64 /usr/local/jdk1.8
export JAVA_HOME=/usr/local/jdk1.8 >>/etc/profile
export PATH=$PATH:$JAVA_HOME/bin: >>/etc/profile
source /etc/profile
tar xf apache-maven-3.6.1-bin.tar.gz -C /application/
tar xf apache-tomcat-8.5.43.tar.gz -C /application/
mv jenkins.war /application/apache-tomcat-8.5.43/webapps/
mv apache-tomcat-8.5.43/ tomcat
mv apache-maven-3.6.1/ maven
三、验证环境
mvn -v
Apache Maven 3.6.1 (d66c9c0b3152b2e69ee9bac180bb8fcc8e6af555; 2019-04-05T03:00:29+08:00)
Maven home: /application/maven
Java version: 1.8.0_181, vendor: Oracle Corporation, runtime: /usr/local/jdk1.8.0_181/jre
Default locale: zh_CN, platform encoding: UTF-8
OS name: "linux", version: "3.10.0-957.10.1.el7.x86_64", arch: "amd64", family: "unix"
四、启动tomcat
cd /application/tomcat/bin
./startup.sh
Using CATALINA_BASE: /application/tomcat
Using CATALINA_HOME: /application/tomcat
Using CATALINA_TMPDIR: /application/tomcat/temp
Using JRE_HOME: /usr/local/jdk1.8.0_181
Using CLASSPATH: /application/tomcat/bin/bootstrap.jar:/application/tomcat/bin/tomcat-juli.jar
Tomcat started.
五、浏览器访问:10.0.0.11:8080/jenkins
image.png image.png六、输入管理员密码登录jenkins
cat /root/.jenkins/secrets/initialAdminPassword
七、选择所需插件,安装插件
image.png八、填写用户名密码,完成安装
image.png九、配置实例
image.png image.png image.png image.png