当前位置:   article > 正文

linux下的ollama_linux ollama

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)

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/weixin_40725706/article/detail/180432
推荐阅读
相关标签
  

闽ICP备14008679号