# 需要java环境
wget -q -O - https://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add -
sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
sudo apt-get update
apt-get install openjdk-8-jdk
sudo apt-get install jenkins
# 修改运行用户
root@aelf-chain-test-6:/var/lib# cat /etc/default/jenkins | grep root
JENKINS_USER=root
JENKINS_GROUP=root
# --webroot=~/.jenkins/war
JENKINS_ARGS="--webroot=/var/cache/$NAME/war --httpPort=$HTTP_PORT"