Files
xxxigcc-proxy/llmdoc/guides/how-to-modify-systemd-service.md
Wang Defa 9afe4a8649
All checks were successful
Build and Release / build-and-test (arm64, alpine) (push) Successful in -13s
Build and Release / build-and-test (amd64, alpine) (push) Successful in -6s
Build and Release / build-and-test (arm64, ubuntu) (push) Successful in -7s
Build and Release / build-and-test (amd64, ubuntu) (push) Successful in 7s
Build and Release / release (push) Successful in 21s
简化 Debian 发布流程并添加项目文档系统
- 将 Debian 包仓库从 bookworm/trixie 双发行版改为通用 stable 仓库
- 新增完整的 llmdoc 文档系统,包含架构、指南和参考文档
- 更新 README.md 和部署指南以反映新的仓库配置
- 添加 .gitignore 文件
2025-12-25 10:18:07 +08:00

51 lines
973 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 如何修改 Systemd 服务配置
## 服务文件位置
`/lib/systemd/system/xxxigcc-proxy.service`
## 配置修改步骤
1. **编辑服务文件**
```bash
sudo nano /lib/systemd/system/xxxigcc-proxy.service
```
2. **常见修改场景**
### A. 更改启动参数
修改 `ExecStart` 行:
```
ExecStart=/opt/xxxigcc-proxy/xxxigcc-proxy --config=/etc/xxxigcc-proxy/config.json [新参数]
```
### B. 调整资源限制
修改 `LimitNOFILE` 和 `LimitNPROC`
```
LimitNOFILE=100000 # 增加文件描述符限制
LimitNPROC=8192 # 增加最大进程数
```
### C. 安全性增强
可以添加更多安全选项:
```
PrivateDevices=yes
ProtectKernelTunables=yes
```
3. **重新加载 systemd**
```bash
sudo systemctl daemon-reload
```
4. **重启服务**
```bash
sudo systemctl restart xxxigcc-proxy
```
## 安全建议
- 最小权限原则
- 谨慎修改默认配置
- 定期审查服务权限
- 测试每项更改的影响