useradd gitbucket passwd gitbucket
vi /home/gitbucket/start_gitbucket.sh chmod 700 start_gitbucket.sh
#!/bin/bash java -jar /home/gitbucket/gitbucket.war --prefix=/gitbucket --gitbucket.home=/home/gitbucket/data
vi /usr/lib/systemd/system/gitbucket.service
[Unit] Description = GitBucket daemon ConditionPathExists = /home/gitbucket [Service] ExecStart = /home/gitbucket/start_gitbucket.sh Restart = always Type = simple User=gitbucket Group=gitbucket [Install] WantedBy = multi-user.target
systemctl start gitbucket systemctl enable gitbucket
http://x.x.x.x:8080/gitbucket
java -jar gitbucket.war --prefix=/gitbucket --gitbucket.home=/home/gitbucket/test
java -jar gitbucket.war --prefix=/gitbucket --gitbucket.home=D:\GitBucket