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端口狀況文章來源:http://www.zghlxwxcb.cn/news/detail-841875.html
~$ sudo lsof -i:11434
COMMAND ? PID ? USER ? FD ? TYPE ? ?DEVICE SIZE/OFF NODE NAME
ollama ?17243 ollama ? ?3u ?IPv6 416111630 ? ? ?0t0 ?TCP *:11434 (LISTEN)文章來源地址http://www.zghlxwxcb.cn/news/detail-841875.html
到了這里,關于linux下的ollama的文章就介紹完了。如果您還想了解更多內容,請在右上角搜索TOY模板網以前的文章或繼續(xù)瀏覽下面的相關文章,希望大家以后多多支持TOY模板網!