zrguo commited on
Commit
1e9d5c1
Β·
unverified Β·
2 Parent(s): f10a3eb a99af6f

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/start_lightrag.sh
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: `lightrag-server.sevice`. Modified the following lines from `lightrag-server.sevice.example`
454
 
455
  ```text
456
  Description=LightRAG Ollama Service
457
  WorkingDirectory=<lightrag installed directory>
458
- ExecStart=<lightrag installed directory>/lightrag/api/start_lightrag.sh
459
  ```
460
 
461
- Create your service startup script: `start_lightrag.sh`. Change you python virtual environment activation method as need:
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 lightrag.service in Linux. Sample commands in Ubuntu server look like:
473
 
474
  ```shell
475
- sudo cp lightrag-server.service /etc/systemd/system/
476
  sudo systemctl daemon-reload
477
- sudo systemctl start lightrag-server.service
478
- sudo systemctl status lightrag-server.service
479
- sudo systemctl enable lightrag-server.service
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
  ```