yangdx
commited on
Commit
·
a99af6f
1
Parent(s):
cfc6efc
update docs for service isntallation
Browse files- lightrag/api/README.md +9 -9
lightrag/api/README.md
CHANGED
|
@@ -450,31 +450,31 @@ This intelligent caching mechanism:
|
|
| 450 |
|
| 451 |
## Install Lightrag as a Linux Service
|
| 452 |
|
| 453 |
-
Create your service file
|
| 454 |
|
| 455 |
```text
|
| 456 |
Description=LightRAG Ollama Service
|
| 457 |
WorkingDirectory=<lightrag installed directory>
|
| 458 |
-
ExecStart=<lightrag installed directory>/lightrag/api/
|
| 459 |
```
|
| 460 |
|
| 461 |
-
|
| 462 |
|
| 463 |
```shell
|
| 464 |
#!/bin/bash
|
| 465 |
|
| 466 |
-
# python virtual environment activation
|
| 467 |
source /home/netman/lightrag-xyj/venv/bin/activate
|
| 468 |
# start lightrag api server
|
| 469 |
lightrag-server
|
| 470 |
```
|
| 471 |
|
| 472 |
-
Install
|
| 473 |
|
| 474 |
```shell
|
| 475 |
-
sudo cp lightrag
|
| 476 |
sudo systemctl daemon-reload
|
| 477 |
-
sudo systemctl start lightrag
|
| 478 |
-
sudo systemctl status lightrag
|
| 479 |
-
sudo systemctl enable lightrag
|
| 480 |
```
|
|
|
|
| 450 |
|
| 451 |
## Install Lightrag as a Linux Service
|
| 452 |
|
| 453 |
+
Create a your service file `lightrag.sevice` from the sample file : `lightrag.sevice.example`. Modified the WorkingDirectoryand EexecStart in the service file:
|
| 454 |
|
| 455 |
```text
|
| 456 |
Description=LightRAG Ollama Service
|
| 457 |
WorkingDirectory=<lightrag installed directory>
|
| 458 |
+
ExecStart=<lightrag installed directory>/lightrag/api/lightrag-api
|
| 459 |
```
|
| 460 |
|
| 461 |
+
Modify your service startup script: `lightrag-api`. Change you python virtual environment activation command as needed:
|
| 462 |
|
| 463 |
```shell
|
| 464 |
#!/bin/bash
|
| 465 |
|
| 466 |
+
# your python virtual environment activation
|
| 467 |
source /home/netman/lightrag-xyj/venv/bin/activate
|
| 468 |
# start lightrag api server
|
| 469 |
lightrag-server
|
| 470 |
```
|
| 471 |
|
| 472 |
+
Install LightRAG service. If your system is Ubuntu, the following commands will work:
|
| 473 |
|
| 474 |
```shell
|
| 475 |
+
sudo cp lightrag.service /etc/systemd/system/
|
| 476 |
sudo systemctl daemon-reload
|
| 477 |
+
sudo systemctl start lightrag.service
|
| 478 |
+
sudo systemctl status lightrag.service
|
| 479 |
+
sudo systemctl enable lightrag.service
|
| 480 |
```
|