{"id":5594,"date":"2025-03-01T22:27:32","date_gmt":"2025-03-01T14:27:32","guid":{"rendered":"https:\/\/benson80.eu.org\/?p=5594"},"modified":"2025-03-01T22:50:11","modified_gmt":"2025-03-01T14:50:11","slug":"windows-%e7%8e%af%e5%a2%83%e4%b8%8b-ollama-%e4%b8%8e-open-webui-%e7%9a%84%e8%87%aa%e5%8a%a8%e5%ae%89%e8%a3%85%e4%b8%8e%e9%85%8d%e7%bd%ae","status":"publish","type":"post","link":"https:\/\/benson80.eu.org\/?p=5594","title":{"rendered":"Windows \u73af\u5883\u4e0b Ollama \u4e0e Open WebUI \u7684\u81ea\u52a8\u5b89\u88c5\u4e0e\u914d\u7f6e"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\"><strong>1. \u6559\u7a0b\u6982\u8ff0<\/strong><\/h2>\n\n\n\n<p>\u672c\u6559\u7a0b\u5c06\u6307\u5bfc\u60a8\u5728 Windows \u7cfb\u7edf\u4e0a\u81ea\u52a8\u5b89\u88c5 <strong>Ollama<\/strong>\uff08\u7528\u4e8e\u8fd0\u884c\u672c\u5730\u5927\u6a21\u578b\uff09\u3001<strong>DeepSeek-R1<\/strong>\uff08\u4e00\u4e2a AI \u8bed\u8a00\u6a21\u578b\uff09\u548c <strong>Open WebUI<\/strong>\uff08\u7528\u4e8e\u7ba1\u7406 Ollama \u6a21\u578b\u7684 Web \u754c\u9762\uff09\u3002<\/p>\n\n\n\n<p>\u901a\u8fc7 <strong>\u6279\u5904\u7406\u811a\u672c<\/strong>\uff0c\u60a8\u53ef\u4ee5\u4e00\u952e\u5b8c\u6210\u4ee5\u4e0b\u4efb\u52a1\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u68c0\u67e5 <strong>Ollama<\/strong> \u662f\u5426\u5df2\u5b89\u88c5\uff0c\u82e5\u672a\u5b89\u88c5\u5219\u81ea\u52a8\u5b89\u88c5<\/li>\n\n\n\n<li>\u68c0\u67e5 <strong>DeepSeek-R1<\/strong> \u6a21\u578b\u662f\u5426\u5df2\u4e0b\u8f7d\uff0c\u82e5\u672a\u4e0b\u8f7d\u5219\u81ea\u52a8\u62c9\u53d6<\/li>\n\n\n\n<li>\u68c0\u67e5 <strong>Open WebUI<\/strong> \u662f\u5426\u5df2\u5b89\u88c5\uff0c\u82e5\u672a\u5b89\u88c5\u5219\u81ea\u52a8\u5b89\u88c5<\/li>\n\n\n\n<li>\u542f\u52a8 <strong>Open WebUI<\/strong> \u670d\u52a1\uff0c\u65b9\u4fbf\u5728\u6d4f\u89c8\u5668\u4e2d\u8bbf\u95ee<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>2. \u8fd0\u884c\u73af\u5883\u8981\u6c42<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Windows 10 \/ 11<\/li>\n\n\n\n<li><strong>WinGet<\/strong>\uff08Windows \u5305\u7ba1\u7406\u5668\uff0c\u9ed8\u8ba4\u5df2\u5b89\u88c5\uff09<\/li>\n\n\n\n<li><strong>Python 3.x &amp; pip<\/strong>\uff08\u7528\u4e8e\u5b89\u88c5 Open WebUI\uff09<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u4f9d\u8d56\u9879\u68c0\u67e5<\/strong><\/h3>\n\n\n\n<p>\u5728\u8fd0\u884c\u811a\u672c\u524d\uff0c\u786e\u4fdd\u7cfb\u7edf\u6ee1\u8db3\u4ee5\u4e0b\u6761\u4ef6\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5728 <strong>\u7ec8\u7aef\uff08CMD \u6216 PowerShell\uff09<\/strong> \u4e2d\u8fd0\u884c <code>winget --version<\/code>\uff0c\u82e5\u6210\u529f\u663e\u793a\u7248\u672c\u53f7\uff0c\u8868\u793a\u5df2\u5b89\u88c5<\/li>\n\n\n\n<li>\u5728 <strong>\u7ec8\u7aef<\/strong> \u4e2d\u8fd0\u884c <code>python --version<\/code> \u548c <code>pip --version<\/code>\uff0c\u786e\u4fdd Python \u53ca pip \u53ef\u7528<\/li>\n<\/ul>\n\n\n\n<p>\u5982\u679c\u7cfb\u7edf\u672a\u6ee1\u8db3\u8fd9\u4e9b\u6761\u4ef6\uff0c\u8bf7\u624b\u52a8\u5b89\u88c5\u76f8\u5e94\u7684\u4f9d\u8d56\u9879\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>3. \u6279\u5904\u7406\u811a\u672c\u89e3\u6790<\/strong><\/h2>\n\n\n\n<p><strong>\u811a\u672c\u6587\u4ef6\uff1ainstall_ollama_and_openwebui.bat<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>@echo off<br>echo \u68c0\u67e5 Ollama \u662f\u5426\u5df2\u5b89\u88c5...<br>where ollama &gt;nul 2&gt;nul<br>if %errorlevel% neq 0 (<br>    echo Ollama \u672a\u5b89\u88c5\uff0c\u6b63\u5728\u5b89\u88c5...<br>    winget install Ollama --silent --accept-package-agreements --accept-source-agreements<br>) else (<br>    echo Ollama \u5df2\u5b89\u88c5\uff0c\u8df3\u8fc7\u5b89\u88c5\u6b65\u9aa4\u3002<br>)<br><br>echo \u68c0\u67e5 Deepseek-r1 \u6a21\u578b\u662f\u5426\u5df2\u4e0b\u8f7d...<br>ollama list | findstr \/I \"deepseek-r1\" &gt;nul<br>if %errorlevel% neq 0 (<br>    echo Deepseek-r1 \u6a21\u578b\u672a\u5b89\u88c5\uff0c\u6b63\u5728\u4e0b\u8f7d...<br>    ollama pull deepseek-r1<br>) else (<br>    echo Deepseek-r1 \u6a21\u578b\u5df2\u5b58\u5728\uff0c\u8df3\u8fc7\u4e0b\u8f7d\u3002<br>)<br><br>echo \u68c0\u67e5 Open WebUI \u662f\u5426\u5df2\u5b89\u88c5...<br>pip show open-webui &gt;nul 2&gt;nul<br>if %errorlevel% neq 0 (<br>    echo Open WebUI \u672a\u5b89\u88c5\uff0c\u6b63\u5728\u5b89\u88c5...<br>    pip install open-webui<br>) else (<br>    echo Open WebUI \u5df2\u5b89\u88c5\uff0c\u8df3\u8fc7\u5b89\u88c5\u6b65\u9aa4\u3002<br>)<br><br>echo \u6b63\u5728\u542f\u52a8 Open WebUI \u670d\u52a1...<br>open-webui serve<br><br>echo Open WebUI \u5df2\u542f\u52a8\uff0c\u8bbf\u95ee http:\/\/localhost:8080<br>pause<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>4. \u8fd0\u884c\u6b65\u9aa4<\/strong><\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u4e0b\u8f7d\u5e76\u8fd0\u884c\u811a\u672c<\/strong>\n<ul class=\"wp-block-list\">\n<li>\u5728 Windows \u7535\u8111\u4e0a\uff0c\u65b0\u5efa\u4e00\u4e2a\u6587\u672c\u6587\u4ef6\uff0c\u5c06\u4e0a\u8ff0\u4ee3\u7801\u590d\u5236\u8fdb\u53bb\uff0c\u5e76\u4fdd\u5b58\u4e3a <code>install_ollama_and_openwebui.bat<\/code><\/li>\n\n\n\n<li><strong>\u53f3\u952e\u70b9\u51fb\u811a\u672c \u2192 \u4ee5\u7ba1\u7406\u5458\u8eab\u4efd\u8fd0\u884c<\/strong><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\u6267\u884c\u6d41\u7a0b\u89e3\u6790<\/strong>\n<ul class=\"wp-block-list\">\n<li><strong>\u7b2c\u4e00\u6b65<\/strong>\uff1a\u68c0\u67e5 <strong>Ollama<\/strong> \u662f\u5426\u5df2\u5b89\u88c5\uff0c\u82e5\u672a\u5b89\u88c5\u5219\u901a\u8fc7 <code>winget<\/code> \u8fdb\u884c\u9759\u9ed8\u5b89\u88c5<\/li>\n\n\n\n<li><strong>\u7b2c\u4e8c\u6b65<\/strong>\uff1a\u68c0\u67e5 <strong>DeepSeek-R1<\/strong> \u6a21\u578b\u662f\u5426\u5df2\u4e0b\u8f7d\uff0c\u82e5\u672a\u4e0b\u8f7d\u5219\u901a\u8fc7 <code>ollama pull<\/code> \u83b7\u53d6<\/li>\n\n\n\n<li><strong>\u7b2c\u4e09\u6b65<\/strong>\uff1a\u68c0\u67e5 <strong>Open WebUI<\/strong> \u662f\u5426\u5df2\u5b89\u88c5\uff0c\u82e5\u672a\u5b89\u88c5\u5219\u901a\u8fc7 <code>pip install<\/code> \u5b89\u88c5<\/li>\n\n\n\n<li><strong>\u7b2c\u56db\u6b65<\/strong>\uff1a\u542f\u52a8 <strong>Open WebUI<\/strong>\uff0c\u63d0\u4f9b\u57fa\u4e8e Web \u7684 AI \u6a21\u578b\u7ba1\u7406\u754c\u9762<\/li>\n\n\n\n<li><strong>\u7b2c\u4e94\u6b65<\/strong>\uff1a\u542f\u52a8\u5b8c\u6210\u540e\uff0c\u5728\u6d4f\u89c8\u5668\u4e2d\u8bbf\u95ee <a href=\"http:\/\/localhost:8080\" target=\"_blank\" rel=\"noreferrer noopener\">http:\/\/localhost:8080<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>5. \u6545\u969c\u6392\u9664<\/strong><\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><strong>\u95ee\u9898<\/strong><\/th><th><strong>\u89e3\u51b3\u65b9\u6848<\/strong><\/th><\/tr><\/thead><tbody><tr><td>\u6267\u884c\u811a\u672c\u65f6 <code>winget<\/code> \u547d\u4ee4\u627e\u4e0d\u5230<\/td><td>\u8bf7\u786e\u4fdd Windows \u7248\u672c\u652f\u6301 WinGet\uff08\u8fd0\u884c <code>winget --version<\/code> \u68c0\u67e5\uff09<\/td><\/tr><tr><td><code>python<\/code> \u6216 <code>pip<\/code> \u547d\u4ee4\u672a\u627e\u5230<\/td><td>\u8bf7\u5b89\u88c5 Python\uff0c\u5e76\u6dfb\u52a0\u5230\u7cfb\u7edf\u73af\u5883\u53d8\u91cf<\/td><\/tr><tr><td><code>ollama<\/code> \u672a\u6210\u529f\u5b89\u88c5<\/td><td>\u53ef\u80fd\u9700\u8981\u624b\u52a8\u5b89\u88c5\uff0c\u8bbf\u95ee <a href=\"https:\/\/ollama.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">Ollama \u5b98\u7f51<\/a> \u4e0b\u8f7d<\/td><\/tr><tr><td><code>open-webui<\/code> \u542f\u52a8\u5931\u8d25<\/td><td>\u5c1d\u8bd5 <code>pip install --upgrade open-webui<\/code> \u8fdb\u884c\u66f4\u65b0<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>6. \u7ed3\u8bba<\/strong><\/h2>\n\n\n\n<p>\u901a\u8fc7\u8be5 <strong>\u6279\u5904\u7406\u811a\u672c<\/strong>\uff0c\u53ef\u4ee5\u5feb\u901f\u81ea\u52a8\u5316 <strong>Ollama\u3001DeepSeek-R1<\/strong> \u4ee5\u53ca <strong>Open WebUI<\/strong> \u7684\u5b89\u88c5\u4e0e\u914d\u7f6e\u3002\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u60a8\u53ef\u4ee5\u76f4\u63a5\u5728 Web \u754c\u9762\u4e0a\u7ba1\u7406\u672c\u5730 AI \u6a21\u578b\uff0c\u63d0\u9ad8\u4f7f\u7528\u6548\u7387\u3002<\/p>\n\n\n\n<p><strong>\u5982\u679c\u60a8\u5bf9 AI \u672c\u5730\u63a8\u7406\u611f\u5174\u8da3\uff0c\u53ef\u4ee5\u7ee7\u7eed\u63a2\u7d22 Ollama \u652f\u6301\u7684\u66f4\u591a\u6a21\u578b\uff0c\u5e76\u4f7f\u7528 Open WebUI \u8fdb\u884c\u53ef\u89c6\u5316\u64cd\u4f5c\uff01<\/strong> \ud83d\ude80<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. \u6559\u7a0b\u6982\u8ff0 \u672c\u6559\u7a0b\u5c06\u6307\u5bfc\u60a8\u5728 Windows  &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,17],"tags":[],"class_list":["post-5594","post","type-post","status-publish","format-standard","hentry","category-windows","category-17"],"_links":{"self":[{"href":"https:\/\/benson80.eu.org\/index.php?rest_route=\/wp\/v2\/posts\/5594","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/benson80.eu.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/benson80.eu.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/benson80.eu.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/benson80.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5594"}],"version-history":[{"count":14,"href":"https:\/\/benson80.eu.org\/index.php?rest_route=\/wp\/v2\/posts\/5594\/revisions"}],"predecessor-version":[{"id":5610,"href":"https:\/\/benson80.eu.org\/index.php?rest_route=\/wp\/v2\/posts\/5594\/revisions\/5610"}],"wp:attachment":[{"href":"https:\/\/benson80.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5594"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/benson80.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5594"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/benson80.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5594"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}