Jenkins
By Bys on April 6, 2021
Install Jenkins
/fsjks/bin
/fsjks/logs
/fsjks/src/jenkins.war
start_jenkins.sh
#!/bin/bash
export JENKINS_HOME=/fsjks/home
export JAVA_HOME=/usr/local/java
export HTTP_PORT=11010
DATE=`date +%Y%m%d`
nohup $JAVA_HOME/bin/java -jar /fsjks/src/jenkins.war --httpPort=$HTTP_PORT --sessionTimeout=120 -XX:+AggressiveOpts >> /fsjks/logs/jenkins_$DATE.log 2>&1 &
stop_jenkins.sh
ps -ef | grep jenkins | grep -v grep | awk '{print $2}' | xargs kill;
/etc/systemd/system/jenkins.service
[Unit]
Description=Jenkins
[Service]
Type=forking
ExecStart=/fsjks/bin/start_jenkins.sh
ExecStop=/fsjks/bin/stop_jenkins.sh
User=jksadm
Group=grubd
UMask=0007
RestartSec=10
Restart=no
[Install]
WantedBy=multi-user.target
cicd
jenkins
pipeline
opensource
]