赞
踩
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)
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。