|
|
@ -53,7 +53,7 @@ title: 使用 JAR 文件部署
|
|
|
|
3. 下载运行包
|
|
|
|
3. 下载运行包
|
|
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
```bash
|
|
|
|
wget https://dl.halo.run/release/halo-2.12.0.jar -O halo.jar
|
|
|
|
wget https://dl.halo.run/release/halo-2.12.2.jar -O halo.jar
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
:::info
|
|
|
|
:::info
|
|
|
@ -141,9 +141,13 @@ title: 使用 JAR 文件部署
|
|
|
|
6. 测试运行 Halo
|
|
|
|
6. 测试运行 Halo
|
|
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
```bash
|
|
|
|
cd ~/app && java -jar halo.jar
|
|
|
|
cd ~/app && java -jar halo.jar --spring.config.location="optional:classpath:/;optional:file:$HOME/.halo2/"
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
:::info
|
|
|
|
|
|
|
|
`/home/halo/.halo2/application.yaml` 为你的配置文件的绝对路径,请确保地址正确。
|
|
|
|
|
|
|
|
:::
|
|
|
|
|
|
|
|
|
|
|
|
7. 如果没有观察到异常日志,即可尝试访问 Halo
|
|
|
|
7. 如果没有观察到异常日志,即可尝试访问 Halo
|
|
|
|
|
|
|
|
|
|
|
|
打开 `http://ip:端口号` 即可跳转到初始化页面。
|
|
|
|
打开 `http://ip:端口号` 即可跳转到初始化页面。
|
|
|
@ -181,14 +185,14 @@ title: 使用 JAR 文件部署
|
|
|
|
```ini {9,10} title="/etc/systemd/system/halo.service"
|
|
|
|
```ini {9,10} title="/etc/systemd/system/halo.service"
|
|
|
|
[Unit]
|
|
|
|
[Unit]
|
|
|
|
Description=Halo Service
|
|
|
|
Description=Halo Service
|
|
|
|
Documentation=https://halo.run
|
|
|
|
Documentation=https://docs.halo.run
|
|
|
|
After=network-online.target
|
|
|
|
After=network-online.target
|
|
|
|
Wants=network-online.target
|
|
|
|
Wants=network-online.target
|
|
|
|
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
[Service]
|
|
|
|
Type=simple
|
|
|
|
Type=simple
|
|
|
|
User=USER
|
|
|
|
User=USER
|
|
|
|
ExecStart=/usr/bin/java -server -Xms256m -Xmx256m -jar JAR_PATH
|
|
|
|
ExecStart=/usr/bin/java -server -Xms256m -Xmx256m -jar JAR_PATH --spring.config.location="optional:classpath:/;optional:file:/home/halo/.halo2/"
|
|
|
|
ExecStop=/bin/kill -s QUIT $MAINPID
|
|
|
|
ExecStop=/bin/kill -s QUIT $MAINPID
|
|
|
|
Restart=always
|
|
|
|
Restart=always
|
|
|
|
StandOutput=syslog
|
|
|
|
StandOutput=syslog
|
|
|
@ -244,7 +248,7 @@ journalctl -n 20 -u halo
|
|
|
|
3. 下载新版本的 Halo 运行包,覆盖原有的运行包
|
|
|
|
3. 下载新版本的 Halo 运行包,覆盖原有的运行包
|
|
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
```bash
|
|
|
|
wget https://dl.halo.run/release/halo-2.12.0.jar -O /home/halo/app/halo.jar
|
|
|
|
wget https://dl.halo.run/release/halo-2.12.2.jar -O /home/halo/app/halo.jar
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
4. 启动 Halo 服务
|
|
|
|
4. 启动 Halo 服务
|
|
|
|