文章目录
修改配置文件
sudo vim /etc/systemd/system/ollama.service
在[Service]下面加上:
Environment="OLLAMA_HOST=0.0.0.0:11434"
配置防火墙,打开端口。Ollama的默认端口是11434,所以直接输入:
sudo ufw allow 11434/tcp
重启服务
sudo systemctl daemon-reload
sudo systemctl restart ollama
sudo vim /etc/systemd/system/ollama.service
在[Service]下面加上:
Environment="OLLAMA_HOST=0.0.0.0:11434"
sudo ufw allow 11434/tcp
sudo systemctl daemon-reload
sudo systemctl restart ollama