Jenkins + Git 项目中 主机配置

我这里用的是 tomcat ,需配置 JDK 环境,然后给 Jenkins 发送密钥对。

[ ~]# tar xf apache-tomcat-8.5.16.tar.gz

[ ~]# tar xf jdk-8u191-linux-x64.tar.gz

[ ~]# mv jdk1.8.0_191/ /usr/local/java

[ ~]# mv apache-tomcat-8.5.16 /usr/local/tomcat

[ ~]# vim /etc/profile

export JAVA_HOME=/usr/local/java/
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar

[ ~]# source /etc/profile

[ ~]# java -version
java version "1.8.0_191"
Java(TM) SE Runtime Environment (build 1.8.0_191-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.191-b12, mixed mode)

[ ~]# ssh-keygen

[ ~]# ssh-copy-id 192.168.200.117

相关推荐