## Path: Development/Jenkins ## Description: Jenkins Automation Server ## Type: string ## Default: "/var/lib/jenkins" ## ServiceRestart: jenkins # # Directory where Jenkins store its configuration and working # files (checkouts, build reports, artifacts, ...). # JENKINS_HOME="/home/jenkins"
## Type: string ## Default: "" ## ServiceRestart: jenkins # # Java executable to run Jenkins # When left empty, we'll try to find the suitable Java. # JENKINS_JAVA_CMD=""
## Type: string ## Default: "jenkins" ## ServiceRestart: jenkins # # Unix user account that runs the Jenkins daemon # Be careful when you change this, as you need to update # permissions of $JENKINS_HOME and /var/log/jenkins. # JENKINS_USER="jenkins"
## Type: string ## Default: "false" ## ServiceRestart: jenkins # # Whether to skip potentially long-running chown at the # $JENKINS_HOME location. Do not enable this, "true", unless # you know what you're doing. See JENKINS-23273. # #JENKINS_INSTALL_SKIP_CHOWN="false"
## Type: string ## Default: "-Djava.awt.headless=true" ## ServiceRestart: jenkins # # Options to pass to java when running Jenkins. # JENKINS_JAVA_OPTIONS="-Djava.awt.headless=true"
## Type: integer(0:65535) ## Default: 8080 ## ServiceRestart: jenkins # # Port Jenkins is listening on. # Set to -1 to disable # JENKINS_PORT="48080"
编辑启动文件
vim /etc/rc.d/init.d/jenkins
···
# Search usable Java as /usr/bin/java might not point to minimal version required by Jenkins. # see http://www.nabble.com/guinea-pigs-wanted-----Hudson-RPM-for-RedHat-Linux-td25673707.html # 修改java路径 candidates="/data/jdk1.8.0_161/bin/java"