CentOS 7.2
Global Tool Configuration => JDK
安装如下:
yum list -y java*
yum install -y java-1.8.0-openjdk*
java -version
whereis javac
vi /etc/profile
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.121-0.b13.el7_3.x86_64
export PATH=$JAVA_HOME/bin:$PATH
source /etc/profile
JAVA_HOME设置可参考安装查找JDK目录
Global Tool Configuration => Git
安装如下:
yum install git
git --version
whereis git
Global Tool Configuration => Maven
从官网找个镜像下载安装包,解压,配置环境变量即可:
wget http://mirror.bit.edu.cn/apache/maven/maven-3/3.5.0/binaries/apache-maven-3.5.0-bin.tar.gz
tar -xzf apache-maven-3.5.0-bin.tar.gz
vi /etc/profile
export MAVEN_HOME=/data/apache-maven-3.5.0
export PATH=$MAVEN_HOME/bin:$PATH
source /etc/profile
Global Tool Configuration => Docker
Docker安装参考这里
sbt
cd /var/jenkins_home/workspace/test
export PATH=$PATH:/usr/local/activator/bin
sudo activator dist
参考sbt官网
Credentials
在安装Jenkins的主机生成密钥对,邮箱填写管理员邮箱:
ssh-keygen -t rsa -f ~/.ssh/id_rsa -C "xxxx@163.com"
将生成的SSH公钥配置到Git库,以Coding为例:
将生成的SSH私钥配置到新增的Credential: