0


linux下的ollama

refs:

https://github.com/ollama/ollama/blob/main/docs/linux.md

1)安装

curl -fsSL https://ollama.com/install.sh | sh

2)修改服务配置,打开端口允许所有IP地址

refs(https://github.com/ollama/ollama/blob/main/docs/faq.md#where-are-models-stored)

Create a service file in

/etc/systemd/system/ollama.service

[Unit]
Description=Ollama Service
After=network-online.target

[Service]
ExecStart=/usr/local/bin/ollama serve
User=ollama
Group=ollama
Restart=always
RestartSec=3
Environment="OLLAMA_HOST=0.0.0.0"
Environment="PATH=/home/dtjk/bin:/home/dtjk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/dtjk/.dotnet/tools:/home/dtjk/.dotnet/tools"

[Install]
WantedBy=default.target

3)更新配置

sudo systemctl daemon-reload
sudo service ollama restart

4)check端口状况

~$ sudo lsof -i:11434
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
ollama 17243 ollama 3u IPv6 416111630 0t0 TCP *:11434 (LISTEN)

标签: linux 运维 服务器

本文转载自: https://blog.csdn.net/Henry_Wu001/article/details/136297950
版权归原作者 Henry_Wu001 所有, 如有侵权,请联系我们删除。

“linux下的ollama”的评论:

还没有评论