Last active
August 22, 2023 09:39
-
-
Save ghostflare76/9db7276f1e133ed0bb1e08847d22a30f to your computer and use it in GitHub Desktop.
jenkins 서비스 독립 실행
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/jenkins | |
JENKINS_WAR=/home/cowboy76/sw/available/jenkins.war | |
JENKINS_HOME=/home/cowboy76/.jenkins | |
JAVA_ARGS="-Djava.awt.headless=true \ | |
-XX:+UseG1GC \ | |
-Xms1024m \ | |
-Xmx1024m" | |
JENKINS_ARGS="--httpPort=8080 \ | |
--logfile=/home/sysmgr/log/jenkins/jenkins.log" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /lib/systemd/system | |
[Unit] | |
Description=Jenkins | |
After=network.target | |
[Service] | |
Type=simple | |
User=cowboy76 | |
Group=cowboy76 | |
EnvironmentFile=/etc/jenkins/jenkins.conf | |
ExecStart=/home/cowboy76/sw/enabled/jdk11/bin/java $JAVA_ARGS -jar $JENKINS_WAR $JENKINS_ARGS | |
WorkingDirectory=/home/sysmgr/.jenkins | |
Restart=always | |
RestartSec=10 | |
[Install] | |
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo systemctl daemon-reload | |
sudo systemctl start jenkins | |
sudo systemctl status jenkins | |
binary로 다운로드시 daemon으로 구성해서 자동 관리 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment