Files
nexus/wiki/sources/ubuntu-install-ollama-run-qwen2.5-coder-7b.md
2026-04-17 08:38:12 +08:00

47 lines
2.0 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: "在 Ubuntu 安装 Ollama 并运行 Qwen2.5-Coder 7B"
type: source
tags: [ollama, openclaw, qwen, qwen-coder, ubuntu]
date: 2026-04-17
---
## Source File
- [[raw/AI/在 Ubuntu 安装 Ollama 并运行 Qwen2.5Coder 7B.md]]
## Summary
- 核心主题:在 Ubuntu 系统上安装 Ollama 本地大模型运行环境并运行 Qwen2.5-Coder 7B 模型
- 问题域:本地 AI 模型部署、开发者本地 AI 基础设施搭建
- 方法/机制:通过官方安装脚本部署 Ollama配置 systemd 服务,开放远程 API 供外部调用
- 结论/价值:提供完整的本地 AI 开发环境,适合 DevOps 自动化、SQL Agent、Kubernetes 故障排查等工程任务
## Key Claims
- Qwen2.5-Coder 7B 在工程任务Tool usage、Shell/Python/SQL 理解、Repo 级代码理解)上优于普通 Qwen2.5:7b
- Ollama 默认只监听 127.0.0.1,需修改 systemd 服务配置才能开放远程 API
- 安装 NVIDIA GPU 后 Ollama 会自动使用 GPU 加速,无需额外配置
## Key Quotes
> "curl -fsSL https://ollama.com/install.sh | sh" — 一行命令完成 Ollama 安装
> "Environment=\"OLLAMA_HOST=0.0.0.0\"" — 开放远程 API 的关键配置
## Key Concepts
- [[Ollama]]:本地大语言模型运行环境,支持多种开源模型
- [[Qwen2.5-Coder]]阿里通义千问的代码生成模型7B 参数版本约 4.5GB
- [[Open WebUI]]ChatGPT 风格的 Web UI 界面
- [[n8n]]:开源工作流自动化工具,可与 Ollama 集成实现 AI 自动化
- [[LangChain]]Agent 框架,用于构建 AI 应用
- [[OpenClaw]]AI Coding Agent可配置使用 Ollama 模型
- [[CUDA]]NVIDIA GPU 计算平台Ollama 自动支持 GPU 加速
## Key Entities
- [[阿里云盘]] — 通义千问模型的发布者
- [[Ollama]] — 本地大模型运行环境项目
## Connections
- [[Ollama]] ← hosts ← [[Qwen2.5-Coder]]
- [[Open WebUI]] ← connects_to ← [[Ollama]]
- [[n8n]] ← integrates_with ← [[Ollama]]
- [[OpenClaw]] ← uses ← [[Ollama]]
## Contradictions
- (暂无)