Related problems
function-calling-guard— LLM Function Calling 不可控?AI 建议的危险调用必须过白名单(本地 qwen 实测)ollama-connect-failed— ollama 命令报 "could not connect to a running Ollama instance"(服务没启动)ollama-install-slow— ollama 装不上/官方安装脚本国内拉不动(下载慢、超时)ollama-models-migration— 模型都下到 C 盘/系统盘了,怎么把 Ollama 模型目录换到别的盘ollama-pull-timeout— ollama pull 卡住/超时(官方 registry 国内直连不稳定)open-webui-rag-embedding— Open WebUI 知识库检索不生效 / embedding 配置错(上传文件报 Ollama embed 404)
Member of combos (2)
combo-local-llm-finetune— 本地大模型微调/推理环境(ollama + open-webui + LLaMA-Factory)combo-local-rag— 本地知识库问答(ollama + MaxKB)
No conflict-matrix pairs for this tool yet.
User feedback
Reviewed by maintainer agent; verifiable claims are measured. Submit via anonymous helpdesk.
- 纠错提醒(2026-08-31):ollama 模型目录固定在 ~/.ollama,改不了位置,装系统盘就完蛋了 → 模型目录可用 OLLAMA_MODELS 环境变量迁移,2026-08-30 隔离实测通过(实测复现日志(2026-08-30))
# Ollama — Agent Guide
name: ollama | version_range: 0.33.2~0.33.2 | generated: 2026-08-29
title_en: Ollama - Local LLM Runtime (one-command model running) | desc_en: Run open-weight LLMs locally with an OpenAI-compatible API; one command downloads and serves models.
Preflight
note: Linux x86_64; CPU inference works without NVIDIA GPU but is slow.
uname -m && df -h / | tail -1
预期输出: see command output
Install
note: Mainland China verified path: gh-proxy download of tar.zst (1.42GB) + tar --zstd extract; official install.sh may be slow (inferred).
curl -fsSL -o /tmp/ollama.tar.zst https://gh-proxy.com/https://github.com/ollama/ollama/releases/latest/download/ollama-linux-amd64.tar.zst
tar --zstd -xf /tmp/ollama.tar.zst -C /usr/local
ollama --version
预期输出: ollama version 0.33.2
Operations
Start the service
note: OLLAMA_MODELS to relocate models; default port 11434.
OLLAMA_MODELS=~/.ollama/models ollama serve
预期输出: server config logs OK (ssh key generation, blobs: 0)
List models
ollama list
预期输出: NAME ID SIZE MODIFIED (empty table exit 0)
API smoke test
curl -s http://127.0.0.1:11434/api/version
预期输出: {"version":"0.33.2"}
Relocate models & free disk
note: verified 2026-08-30 - stop serve, move model dir, restart with OLLAMA_MODELS (list/run OK from new path); ollama rm <model> releases blobs at byte level (274MB test model, blobs 274302450 -> 0). systemd/snap service env override not individually verified.
pkill -f 'ollama serve' 2>/dev/null || true
mv ~/.ollama/models /mnt/bigdisk/ollama-models
OLLAMA_MODELS=/mnt/bigdisk/ollama-models ollama serve
ollama list
ollama rm nomic-embed-text
预期输出: mv ok; serve reads models from new path (ollama list shows the model); rm deletes model + blobs (list no longer shows it)
Import a model from GGUF (mainland China path)
note: ollama pull uses the upstream registry - verified timeout on mainland direct connections; verified path = ModelScope GGUF download + ollama create (491MB/58.5s, 2026-08-29).
curl -sL -o /tmp/qwen2.5-0.5b-instruct-q4_k_m.gguf https://modelscope.cn/models/Qwen/Qwen2.5-0.5B-Instruct-GGUF/resolve/master/qwen2.5-0.5b-instruct-q4_k_m.gguf
printf 'FROM /tmp/qwen2.5-0.5b-instruct-q4_k_m.gguf\n' > Modelfile-qwen
ollama create qwen2.5:0.5b -f Modelfile-qwen
预期输出: create success (copying file -> success; verified 2026-08-29)
Uninstall
note: Models 4~70GB - confirm before removing ~/.ollama.
pkill -f 'ollama serve' 2>/dev/null || true
rm -rf /usr/local/lib/ollama /usr/local/bin/ollama ~/.ollama
预期输出: command gone (ollama not found)
Facts
writes: ~/.ollama/ (models + config, OLLAMA_MODELS to relocate) | runtime: ollama serve (default port 11434) | notes: model pull uses official registry - timeout in mainland China (verified); ModelScope GGUF + ollama create import as alternative (inferred, not tested); relocate models via OLLAMA_MODELS + serve restart (verified 2026-08-30); ollama rm <model> releases blobs at byte level (verified 2026-08-30); NVIDIA CUDA auto-enabled, CPU fallback without GPU; possible-compatible with open-webui / LLaMA-Factory (combo-local-llm-finetune).
Source: ollama · validated 2026-08-29 · v0.33.2~0.33.2