{"id":828,"date":"2025-12-20T16:03:31","date_gmt":"2025-12-20T08:03:31","guid":{"rendered":"https:\/\/www.52runoob.com\/?p=828"},"modified":"2025-12-20T16:03:31","modified_gmt":"2025-12-20T08:03:31","slug":"windows%e5%ae%89%e8%a3%85%e4%b8%8e%e9%85%8d%e7%bd%aeollama%e7%9a%84%e5%9b%be%e6%96%87%e6%95%99%e7%a8%8b-2","status":"publish","type":"post","link":"https:\/\/www.52runoob.com\/index.php\/2025\/12\/20\/windows%e5%ae%89%e8%a3%85%e4%b8%8e%e9%85%8d%e7%bd%aeollama%e7%9a%84%e5%9b%be%e6%96%87%e6%95%99%e7%a8%8b-2\/","title":{"rendered":"Windows\u5b89\u88c5\u4e0e\u914d\u7f6eOllama\u7684\u56fe\u6587\u6559\u7a0b"},"content":{"rendered":"\n<p>\u4e0b\u9762\u662f\u5173\u4e8e <strong>Windows \u7cfb\u7edf\u5b89\u88c5\u4e0e\u914d\u7f6e Ollama<\/strong> \u7684\u8be6\u7ec6\u56fe\u6587\u6559\u7a0b\uff0c\u9002\u5408\u76f4\u63a5\u5728\u535a\u5ba2\u3001\u6280\u672f\u8bba\u575b\u6216\u81ea\u5a92\u4f53\u5e73\u53f0\u53d1\u5e03\u3002\u5185\u5bb9\u5305\u542b\u4ece\u5b89\u88c5\u5230\u914d\u7f6e\u7684\u6bcf\u4e2a\u6b65\u9aa4\uff0c\u5e2e\u52a9\u7528\u6237\u8f7b\u677e\u5b8c\u6210 Ollama \u7684\u5b89\u88c5\u4e0e\u4f7f\u7528\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">Windows \u5b89\u88c5\u4e0e\u914d\u7f6e Ollama \u56fe\u6587\u6559\u7a0b<\/h1>\n\n\n\n<p><strong>Ollama<\/strong> \u662f\u4e00\u4e2a\u9ad8\u6548\u7684\u672c\u5730 AI \u6a21\u578b\u8fd0\u884c\u5e73\u53f0\uff0c\u652f\u6301\u591a\u4e2a\u5f00\u6e90\u6a21\u578b\uff08\u5982 GPT \u7c7b\u6a21\u578b\uff09\u7684\u672c\u5730\u90e8\u7f72\u3002\u5728 Windows \u7cfb\u7edf\u4e2d\u5b89\u88c5\u4e0e\u914d\u7f6e Ollama \u53ef\u4ee5\u5e2e\u52a9\u7528\u6237\u66f4\u597d\u5730\u63a7\u5236\u8ba1\u7b97\u8d44\u6e90\uff0c\u5e76\u63d0\u4f9b\u66f4\u9ad8\u7684\u9690\u79c1\u4fdd\u62a4\u3002\u4ee5\u4e0b\u662f\u8be6\u7ec6\u7684\u5b89\u88c5\u4e0e\u914d\u7f6e\u6b65\u9aa4\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e00\u3001\u524d\u671f\u51c6\u5907<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. <strong>\u786e\u4fdd\u7cfb\u7edf\u7b26\u5408\u8981\u6c42<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u64cd\u4f5c\u7cfb\u7edf<\/strong>\uff1aWindows 10 \u6216\u66f4\u9ad8\u7248\u672c<\/li>\n\n\n\n<li><strong>\u786c\u4ef6\u8981\u6c42<\/strong>\uff1a\u81f3\u5c11 8GB \u5185\u5b58\uff0c\u63a8\u8350 16GB \u6216\u4ee5\u4e0a\uff1b\u5982\u679c\u60f3\u8fd0\u884c\u66f4\u5927\u6a21\u578b\uff0c\u6700\u597d\u6709\u66f4\u591a\u7684 CPU \u6216 GPU \u8d44\u6e90\u3002<\/li>\n\n\n\n<li><strong>\u8f6f\u4ef6\u8981\u6c42<\/strong>\uff1a\n<ul class=\"wp-block-list\">\n<li><strong>Docker<\/strong>\uff08Ollama \u901a\u8fc7 Docker \u6765\u8fd0\u884c\u6a21\u578b\uff09<\/li>\n\n\n\n<li><strong>Windows Subsystem for Linux (WSL)<\/strong>\uff08\u5efa\u8bae\u542f\u7528 WSL 2\uff0c\u63d0\u4f9b\u66f4\u597d\u7684\u517c\u5bb9\u6027\uff09<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">2. <strong>\u5b89\u88c5 Docker \u548c WSL 2<\/strong><\/h3>\n\n\n\n<p>Ollama \u57fa\u4e8e Docker \u548c WSL 2 \u8fdb\u884c\u672c\u5730\u6a21\u578b\u8fd0\u884c\uff0c\u56e0\u6b64\uff0c\u9996\u5148\u9700\u8981\u5b89\u88c5\u8fd9\u4e9b\u5de5\u5177\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u5b89\u88c5 Docker Desktop<\/h4>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u8bbf\u95ee <a href=\"https:\/\/www.docker.com\/products\/docker-desktop\">Docker \u5b98\u7f51<\/a> \u4e0b\u8f7d\u5e76\u5b89\u88c5 Docker Desktop for Windows\u3002<\/li>\n\n\n\n<li>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u6253\u5f00 Docker Desktop\uff0c\u786e\u4fdd\u542f\u7528 WSL 2 \u652f\u6301\u3002<\/li>\n\n\n\n<li>Docker \u4f1a\u81ea\u52a8\u5b89\u88c5\u9002\u7528\u4e8e WSL 2 \u7684 Linux \u5185\u6838\uff0c\u786e\u4fdd\u5b83\u80fd\u5728 Windows \u4e0a\u8fd0\u884c\u3002<\/li>\n<\/ol>\n\n\n\n<h4 class=\"wp-block-heading\">\u542f\u7528 WSL 2<\/h4>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u6253\u5f00 PowerShell\uff08\u4ee5\u7ba1\u7406\u5458\u8eab\u4efd\u8fd0\u884c\uff09\uff0c\u5e76\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u542f\u7528 WSL 2\uff1a<code>wsl --install<\/code><\/li>\n\n\n\n<li>\u786e\u4fdd\u5df2\u9009\u62e9\u4f7f\u7528 <strong>Ubuntu<\/strong> \u6216\u5176\u4ed6 Linux \u53d1\u884c\u7248\u4f5c\u4e3a WSL 2 \u9ed8\u8ba4\u53d1\u884c\u7248\u3002<\/li>\n\n\n\n<li>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u91cd\u542f\u8ba1\u7b97\u673a\u3002<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e8c\u3001\u4e0b\u8f7d\u4e0e\u5b89\u88c5 Ollama<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. <strong>\u4e0b\u8f7d Ollama \u5b89\u88c5\u5305<\/strong><\/h3>\n\n\n\n<p>\u8bbf\u95ee <a href=\"https:\/\/ollama.com\/\">Ollama \u5b98\u7f51<\/a> \u6216 GitHub \u4ed3\u5e93\uff0c\u627e\u5230\u9002\u7528\u4e8e Windows \u7684\u5b89\u88c5\u5305\u4e0b\u8f7d\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2. <strong>\u5b89\u88c5 Ollama<\/strong><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u4e0b\u8f7d\u5b8c\u6210\u540e\uff0c\u6253\u5f00 <code>.exe<\/code> \u5b89\u88c5\u5305\uff0c\u6309\u7167\u63d0\u793a\u8fdb\u884c\u5b89\u88c5\u3002<\/li>\n\n\n\n<li>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u5b89\u88c5\u8def\u5f84\u4e3a <code>C:\\Program Files\\Ollama<\/code>\uff0c\u4f60\u53ef\u4ee5\u9009\u62e9\u66f4\u6539\u5b89\u88c5\u4f4d\u7f6e\u3002<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">3. <strong>\u5b89\u88c5\u6210\u529f\u540e\u7684\u9a8c\u8bc1<\/strong><\/h3>\n\n\n\n<p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u4f60\u53ef\u4ee5\u901a\u8fc7\u547d\u4ee4\u884c\uff08CMD \u6216 PowerShell\uff09\u9a8c\u8bc1 Ollama \u662f\u5426\u6b63\u786e\u5b89\u88c5\u3002\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nollama --version\n\n<\/pre><\/div>\n\n\n<p>\u5982\u679c\u5b89\u88c5\u6210\u529f\uff0c\u4f60\u5c06\u770b\u5230 Ollama \u7684\u7248\u672c\u4fe1\u606f\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e09\u3001\u914d\u7f6e\u4e0e\u4f7f\u7528 Ollama<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. <strong>\u914d\u7f6e\u73af\u5883\u53d8\u91cf<\/strong><\/h3>\n\n\n\n<p>\u5b89\u88c5 Ollama \u540e\uff0c\u901a\u5e38\u60c5\u51b5\u4e0b\u5b83\u4f1a\u81ea\u52a8\u914d\u7f6e\u597d\u73af\u5883\u53d8\u91cf\u3002\u5982\u679c\u6ca1\u6709\uff0c\u4f60\u53ef\u4ee5\u624b\u52a8\u5c06 Ollama \u7684\u5b89\u88c5\u8def\u5f84\u6dfb\u52a0\u5230\u7cfb\u7edf\u73af\u5883\u53d8\u91cf\u4e2d\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u914d\u7f6e\u6b65\u9aa4\uff1a<\/h4>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u5728\u641c\u7d22\u6846\u4e2d\u8f93\u5165 \u201c\u73af\u5883\u53d8\u91cf\u201d\uff0c\u70b9\u51fb\u201c\u7f16\u8f91\u7cfb\u7edf\u73af\u5883\u53d8\u91cf\u201d\u3002<\/li>\n\n\n\n<li>\u5728\u201c\u7cfb\u7edf\u5c5e\u6027\u201d\u5bf9\u8bdd\u6846\u4e2d\u70b9\u51fb <strong>\u73af\u5883\u53d8\u91cf<\/strong> \u6309\u94ae\u3002<\/li>\n\n\n\n<li>\u5728 <strong>\u7cfb\u7edf\u53d8\u91cf<\/strong> \u4e2d\uff0c\u627e\u5230\u5e76\u7f16\u8f91 <code>Path<\/code> \u53d8\u91cf\uff0c\u6dfb\u52a0 Ollama \u7684\u5b89\u88c5\u8def\u5f84\uff0c\u901a\u5e38\u662f\uff1a<code>C:\\Program Files\\Ollama<\/code><\/li>\n\n\n\n<li>\u4fdd\u5b58\u5e76\u5173\u95ed\u5bf9\u8bdd\u6846\u3002<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">2. <strong>\u8fd0\u884c Ollama<\/strong><\/h3>\n\n\n\n<p>\u4f60\u53ef\u4ee5\u901a\u8fc7\u547d\u4ee4\u884c\u542f\u52a8 Ollama\uff0c\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u542f\u52a8\u9ed8\u8ba4\u7684\u804a\u5929\u6a21\u578b\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nollama chat\n\n<\/pre><\/div>\n\n\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cOllama \u4f1a\u81ea\u52a8\u4e0b\u8f7d\u5e76\u8fd0\u884c\u6a21\u578b\u3002\u4f60\u53ef\u4ee5\u901a\u8fc7\u8bbe\u7f6e\u4e0d\u540c\u7684\u6a21\u578b\u548c\u53c2\u6570\u6765\u8c03\u6574 Ollama \u7684\u884c\u4e3a\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u56db\u3001\u5e38\u89c1\u95ee\u9898\u4e0e\u89e3\u51b3\u65b9\u6848<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. <strong>Docker \u542f\u52a8\u5931\u8d25<\/strong><\/h3>\n\n\n\n<p>\u5982\u679c Docker \u65e0\u6cd5\u542f\u52a8\uff0c\u68c0\u67e5\u662f\u5426\u542f\u7528\u4e86 WSL 2\u3002\u4f60\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u6b65\u9aa4\u8fdb\u884c\u4fee\u590d\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u786e\u4fdd WSL 2 \u5df2\u6b63\u786e\u5b89\u88c5\u5e76\u8bbe\u7f6e\u4e3a\u9ed8\u8ba4\u7248\u672c\uff1a<code>wsl --set-default-version 2<\/code><\/li>\n\n\n\n<li>\u91cd\u542f Docker Desktop\uff0c\u5e76\u786e\u4fdd\u5b83\u80fd\u591f\u6b63\u5e38\u8fde\u63a5\u5230 WSL 2\u3002<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">2. <strong>\u5185\u5b58\u4e0d\u8db3\u5bfc\u81f4\u8fd0\u884c\u7f13\u6162<\/strong><\/h3>\n\n\n\n<p>\u5982\u679c\u5728\u8fd0\u884c\u6a21\u578b\u65f6\u51fa\u73b0\u6027\u80fd\u74f6\u9888\uff08\u4f8b\u5982\u5185\u5b58\u4e0d\u8db3\uff09\uff0c\u5c1d\u8bd5\u4ee5\u4e0b\u89e3\u51b3\u65b9\u6848\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u589e\u52a0 Docker \u7684\u5185\u5b58\u9650\u5236\uff1a\u5728 Docker Desktop \u8bbe\u7f6e\u4e2d\uff0c\u8c03\u8282\u8d44\u6e90\u5206\u914d\uff08\u5982\u589e\u52a0\u5206\u914d\u7ed9 WSL 2 \u7684\u5185\u5b58\uff09\u3002<\/li>\n\n\n\n<li>\u4f7f\u7528\u8f83\u5c0f\u7684\u6a21\u578b\uff0c\u6216\u5728\u8fd0\u884c\u65f6\u6307\u5b9a\u4f7f\u7528\u8f83\u4f4e\u7684\u8d44\u6e90\u6d88\u8017\u6a21\u5f0f\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">3. <strong>\u9632\u706b\u5899\u963b\u6b62 Ollama \u8bbf\u95ee\u7f51\u7edc<\/strong><\/h3>\n\n\n\n<p>\u5982\u679c\u4f60\u65e0\u6cd5\u4e0b\u8f7d\u6a21\u578b\u6216\u8bbf\u95ee\u5916\u90e8\u670d\u52a1\uff0c\u8bf7\u68c0\u67e5 Windows \u9632\u706b\u5899\u6216\u5b89\u5168\u8f6f\u4ef6\uff0c\u786e\u4fdd\u5141\u8bb8 Docker \u8bbf\u95ee\u7f51\u7edc\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e94\u3001\u5982\u4f55\u66f4\u65b0 Ollama<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. <strong>\u901a\u8fc7 CLI \u66f4\u65b0<\/strong><\/h3>\n\n\n\n<p>Ollama \u63d0\u4f9b\u4e86\u5185\u7f6e\u7684\u66f4\u65b0\u547d\u4ee4\uff0c\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u5373\u53ef\u83b7\u53d6\u6700\u65b0\u7248\u672c\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nollama update\n\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\">2. <strong>\u624b\u52a8\u66f4\u65b0<\/strong><\/h3>\n\n\n\n<p>\u4f60\u4e5f\u53ef\u4ee5\u8bbf\u95ee\u5b98\u7f51\u6216 GitHub \u4ed3\u5e93\uff0c\u4e0b\u8f7d\u6700\u65b0\u7248\u672c\u7684\u5b89\u88c5\u5305\u5e76\u624b\u52a8\u66f4\u65b0\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u516d\u3001\u603b\u7ed3<\/h2>\n\n\n\n<p>\u901a\u8fc7\u4ee5\u4e0a\u6b65\u9aa4\uff0c\u4f60\u53ef\u4ee5\u5728 Windows \u7cfb\u7edf\u4e2d\u987a\u5229\u5b89\u88c5\u548c\u914d\u7f6e Ollama\u3002Ollama \u63d0\u4f9b\u4e86\u4e00\u4e2a\u7b80\u6d01\u9ad8\u6548\u7684\u65b9\u5f0f\uff0c\u8ba9\u4f60\u80fd\u591f\u5728\u672c\u5730\u8fd0\u884c AI \u6a21\u578b\uff0c\u907f\u514d\u5bf9\u4e91\u7aef\u670d\u52a1\u7684\u4f9d\u8d56\uff0c\u589e\u5f3a\u9690\u79c1\u4fdd\u62a4\uff0c\u5e76\u5b9e\u73b0\u66f4\u9ad8\u6548\u7684\u8ba1\u7b97\u3002<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><strong>\u63d0\u793a\uff1a<\/strong> \u5982\u679c\u4f60\u6709 GPU \u8d44\u6e90\uff0cOllama \u4e5f\u652f\u6301\u901a\u8fc7 CUDA \u52a0\u901f AI \u6a21\u578b\u7684\u8fd0\u884c\uff0c\u63d0\u5347\u6027\u80fd\u3002<\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\">\u540e\u7eed\u6b65\u9aa4\uff1a<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u4f60\u53ef\u4ee5\u63a2\u7d22\u66f4\u591a Ollama \u63d0\u4f9b\u7684\u529f\u80fd\uff0c\u6bd4\u5982\u6a21\u578b\u8bad\u7ec3\u3001\u63a8\u7406\u3001API \u96c6\u6210\u7b49\u3002<\/li>\n\n\n\n<li>\u5982\u679c\u9047\u5230\u66f4\u591a\u95ee\u9898\uff0c\u53ef\u4ee5\u53c2\u8003\u5b98\u65b9\u6587\u6863\u6216 GitHub \u95ee\u9898\u89e3\u7b54\u3002<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e0b\u9762\u662f\u5173\u4e8e Windows \u7cfb\u7edf\u5b89\u88c5\u4e0e\u914d\u7f6e Ollama \u7684\u8be6\u7ec6\u56fe\u6587\u6559\u7a0b\uff0c\u9002\u5408\u76f4&#8230; <a class=\"more-link\" href=\"https:\/\/www.52runoob.com\/index.php\/2025\/12\/20\/windows%e5%ae%89%e8%a3%85%e4%b8%8e%e9%85%8d%e7%bd%aeollama%e7%9a%84%e5%9b%be%e6%96%87%e6%95%99%e7%a8%8b-2\/\">Continue Reading &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"class_list":["post-828","post","type-post","status-publish","format-standard","hentry","category-12"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/posts\/828","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/comments?post=828"}],"version-history":[{"count":1,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/posts\/828\/revisions"}],"predecessor-version":[{"id":829,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/posts\/828\/revisions\/829"}],"wp:attachment":[{"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/media?parent=828"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/categories?post=828"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/tags?post=828"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}