Merge pull request #728 from danielaskdd/rename-service-file
Browse files
start_lightrag.sh.example β lightrag-api
RENAMED
File without changes
|
lightrag-server.service.example β lightrag.service.example
RENAMED
@@ -9,7 +9,7 @@ User=netman
|
|
9 |
MemoryHigh=8G
|
10 |
MemoryMax=12G
|
11 |
WorkingDirectory=/home/netman/lightrag-xyj
|
12 |
-
ExecStart=/home/netman/lightrag-xyj/
|
13 |
Restart=always
|
14 |
RestartSec=10
|
15 |
|
|
|
9 |
MemoryHigh=8G
|
10 |
MemoryMax=12G
|
11 |
WorkingDirectory=/home/netman/lightrag-xyj
|
12 |
+
ExecStart=/home/netman/lightrag-xyj/lightrag-api
|
13 |
Restart=always
|
14 |
RestartSec=10
|
15 |
|
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 |
```
|