Files
nexus/wiki/entities/Ollama.md
2026-04-28 12:03:10 +08:00

40 lines
1.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: Ollama
type: entity
tags: [ollama, 本地大模型, 开源]
last_updated: 2026-04-28
---
## Aliases
- ollama
- Ollama
## Definition
Ollama 是一款本地大模型运行时工具,支持通过单一命令安装、管理和运行开源 LLM如 Qwen2.5-Coder、Llama、DeepSeek 等),提供 REST API 和多语言 SDK。
## Key Facts
- **官网**https://ollama.com
- **安装命令**`curl -fsSL https://ollama.com/install.sh | sh`
- **API 默认端口**11434
- **默认监听**127.0.0.1(仅本地)
- **远程访问配置**:设置 `OLLAMA_HOST=0.0.0.0` 环境变量
- **GPU 支持**:安装 NVIDIA CUDA 后自动使用 GPU 加速,无需额外配置
- **systemd**:安装后自动创建 systemd 服务,开机自启
## Capabilities
- CLI 交互模式:`ollama run <model>`
- 模型管理:`ollama list``ollama rm <model>``ollama pull <model>`
- REST API`http://localhost:11434/api/chat`
- Python SDK`pip install ollama`
- NodeJS SDK`npm install ollama`
## Used By
- [[Open WebUI]] — ChatGPT 风格 Web 界面
- [[n8n]] — AI 工作流自动化平台
- [[LangChain]] — Agent 开发框架
- [[OpenClaw]] — AI Coding Agent
- [[Qwen2.5-Coder]] — 主要推荐运行模型之一
## Sources
- [[在-ubuntu-安装-ollama-并运行-qwen2-5coder-7b]]