Skip to content

Update jar-file.md #492

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -196,14 +196,15 @@ title: 使用 JAR 文件部署
ExecStart=/usr/bin/java -Dfile.encoding=UTF-8 -server -Xms256m -Xmx256m -jar JAR_PATH --spring.config.additional-location=optional:file:/home/halo/.halo2/
ExecStop=/bin/kill -s QUIT $MAINPID
Restart=always
StandOutput=syslog
StandardOutput=syslog

StandError=inherit
StandardError=inherit

[Install]
WantedBy=multi-user.target
```

- **ExecStart**: java的真实存在地址,就像java包下bin目录中的java,假如自己的java没有安装在这个位置,需要修改
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我认为没有必要再添加这个描述,并且 ExecStart 是完整的命令,不只是需要说明 java bin 的路径问题。

此外,在底部已经有了关于 java bin 的说明。

https://docs.halo.run/getting-started/install/jar-file#:~:text=User%3DUSER%E3%80%82-,%E6%8F%90%E7%A4%BA,-%E8%AF%B7%E7%A1%AE%E4%BF%9D%20/usr

- **JAR_PATH**:Halo 运行包的绝对路径,例如 `/home/halo/app/halo.jar`,注意:此路径不支持 `~` 符号。
- **USER**:运行 Halo 的系统用户,如果有按照上方教程创建新的用户来运行 Halo,修改为你创建的用户名称即可。反之请删除 `User=USER`。

Expand Down