{"id":28447,"date":"2025-03-13T12:21:36","date_gmt":"2025-03-13T04:21:36","guid":{"rendered":"https:\/\/www.aisharenet.com\/?p=28447"},"modified":"2025-03-13T12:21:36","modified_gmt":"2025-03-13T04:21:36","slug":"ollama-anzhuangyupeiai-2","status":"publish","type":"post","link":"https:\/\/www.kdjingpai.com\/de\/ollama-anzhuangyupeiai-2\/","title":{"rendered":"Ollama \u5b89\u88c5\u4e0e\u914d\u7f6e &#8211; Windows \u7cfb\u7edf\u7bc7"},"content":{"rendered":"<h2>\u7b80\u4ecb<\/h2>\n<p>\u672c\u8282\u5b66\u4e60\u5982\u4f55\u5728 Windows \u7cfb\u7edf\u4e2d\u5b8c\u6210 <a href=\"https:\/\/www.kdjingpai.com\/en\/ollama\/\">Ollama<\/a> \u7684\u5b89\u88c5\u4e0e\u914d\u7f6e\uff0c\u4e3b\u8981\u5206\u4e3a\u4ee5\u4e0b\u51e0\u4e2a\u90e8\u5206:<\/p>\n<ul>\n<li>\u8bbf\u95ee\u5b98\u7f51\u76f4\u63a5\u5b8c\u6210\u4e0b\u8f7d<\/li>\n<li>\u73af\u5883\u53d8\u91cf\u914d\u7f6e<\/li>\n<li>\u8fd0\u884c Ollama<\/li>\n<li>\u9a8c\u8bc1\u5b89\u88c5\u6210\u529f\ud83c\udf89<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h2>\u4e00\u3001\u8bbf\u95ee\u5b98\u7f51\u76f4\u63a5\u5b8c\u6210\u4e0b\u8f7d<\/h2>\n<ol>\n<li>\u8bbf\u95ee\u5b98\u7f51\u4e3b\u9875<br \/>\n<blockquote><p>Ollama \u4e0b\u8f7d\uff1ahttps:\/\/ollama.com\/download<\/p>\n<p>Ollama \u5b98\u65b9\u4e3b\u9875\uff1ahttps:\/\/ollama.com<\/p>\n<p>Ollama \u5b98\u65b9 GitHub \u6e90\u4ee3\u7801\u4ed3\u5e93\uff1ahttps:\/\/github.com\/ollama\/ollama\/<\/p><\/blockquote>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-28448\" title=\"Ollama \u5b89\u88c5\u4e0e\u914d\u7f6e - Windows \u7cfb\u7edf\u7bc7-1\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/03\/c0df24e500038a0.png\" alt=\"Ollama \u5b89\u88c5\u4e0e\u914d\u7f6e - Windows \u7cfb\u7edf\u7bc7-1\" width=\"518\" height=\"414\" srcset=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/03\/c0df24e500038a0.png 518w, https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/03\/c0df24e500038a0-15x12.png 15w\" sizes=\"auto, (max-width: 518px) 100vw, 518px\" \/><\/li>\n<li>\u7b49\u5f85\u6d4f\u89c8\u5668\u4e0b\u8f7d\u6587\u4ef6 OllamaSetup.exe\uff0c\u5b8c\u6210\u540e\u53cc\u51fb\u8be5\u6587\u4ef6\uff0c\u51fa\u73b0\u5982\u4e0b\u5f39\u7a97\uff0c\u70b9\u51fb\u00a0<code>Install<\/code>\u00a0\u7b49\u5f85\u4e0b\u8f7d\u5b8c\u6210\u5373\u53ef\u3002<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-28449\" title=\"Ollama \u5b89\u88c5\u4e0e\u914d\u7f6e - Windows \u7cfb\u7edf\u7bc7-2\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/03\/94bdb370ccfdbad.png\" alt=\"Ollama \u5b89\u88c5\u4e0e\u914d\u7f6e - Windows \u7cfb\u7edf\u7bc7-2\" width=\"743\" height=\"553\" srcset=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/03\/94bdb370ccfdbad.png 743w, https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/03\/94bdb370ccfdbad-16x12.png 16w\" sizes=\"auto, (max-width: 743px) 100vw, 743px\" \/><\/li>\n<li>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u770b\u5230 Ollama \u5df2\u7ecf\u9ed8\u8ba4\u8fd0\u884c\u4e86\u3002\u53ef\u4ee5\u901a\u8fc7\u5e95\u90e8\u7684\u5bfc\u822a\u680f\u627e\u5230 Ollama \u6807\u5fd7\uff0c\u5e76\u53f3\u952e\u540e\u70b9\u51fb\u00a0<code>Quit Ollama<\/code>\u00a0\u9000\u51faOllama\u6216\u8005\u67e5\u770b\u00a0<code>logs<\/code>\u3002<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-28450\" title=\"Ollama \u5b89\u88c5\u4e0e\u914d\u7f6e - Windows \u7cfb\u7edf\u7bc7-3\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/03\/c10604a57b04579.png\" alt=\"Ollama \u5b89\u88c5\u4e0e\u914d\u7f6e - Windows \u7cfb\u7edf\u7bc7-3\" width=\"157\" height=\"76\" srcset=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/03\/c10604a57b04579.png 157w, https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/03\/c10604a57b04579-18x9.png 18w\" sizes=\"auto, (max-width: 157px) 100vw, 157px\" \/><\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h2>\u4e8c\u3001\u73af\u5883\u53d8\u91cf\u914d\u7f6e<\/h2>\n<blockquote><p><strong>Ollama<\/strong>\u53ef\u4ee5\u50cf\u5176\u4ed6\u8f6f\u4ef6\u4e00\u6837\u5728\u7535\u8111\u4e0a\u5b8c\u6210\u4e00\u952e\u5b89\u88c5\uff0c\u4e0d\u540c\u7684\u662f\uff0c\u5efa\u8bae\u6309\u7167\u5b9e\u9645\u9700\u6c42\u914d\u7f6e\u4e0b\u7cfb\u7edf\u73af\u5883\u53d8\u91cf\u53c2\u6570\u3002\u4ee5\u4e0b\u662f Ollama \u7684\u73af\u5883\u53d8\u91cf\u914d\u7f6e\u8bf4\u660e\u3002<\/p><\/blockquote>\n<table>\n<thead>\n<tr>\n<th>\u53c2\u6570<\/th>\n<th>\u6807\u8bc6\u4e0e\u914d\u7f6e<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>OLLAMA_MODELS<\/td>\n<td>\u8868\u793a\u6a21\u578b\u6587\u4ef6\u7684\u5b58\u653e\u76ee\u5f55\uff0c\u9ed8\u8ba4\u76ee\u5f55\u4e3a<strong>\u5f53\u524d\u7528\u6237\u76ee\u5f55<\/strong>\u5373<code>C:\\Users%username%.ollama\\models<\/code>Windows \u7cfb\u7edf\u00a0<strong>\u5efa\u8bae\u4e0d\u8981\u653e\u5728C\u76d8<\/strong>\u00a0\uff0c\u53ef\u653e\u5728\u5176\u4ed6\u76d8\uff08\u5982\u00a0<code>E:\\ollama\\models<\/code>\uff09<\/td>\n<\/tr>\n<tr>\n<td>OLLAMA_HOST<\/td>\n<td>\u8868\u793aollama \u670d\u52a1\u76d1\u542c\u7684\u7f51\u7edc\u5730\u5740\uff0c\u9ed8\u8ba4\u4e3a<strong>127.0.0.1<\/strong>\u00a0\u5982\u679c\u60f3\u8981\u5141\u8bb8\u5176\u4ed6\u7535\u8111\u8bbf\u95ee Ollama\uff08\u5982\u5c40\u57df\u7f51\u4e2d\u7684\u5176\u4ed6\u7535\u8111\uff09\uff0c<strong>\u5efa\u8bae\u8bbe\u7f6e<\/strong>\u6210\u00a0<strong>0.0.0.0<\/strong><\/td>\n<\/tr>\n<tr>\n<td>OLLAMA_PORT<\/td>\n<td>\u8868\u793aollama \u670d\u52a1\u76d1\u542c\u7684\u9ed8\u8ba4\u7aef\u53e3\uff0c\u9ed8\u8ba4\u4e3a<strong>11434<\/strong>\u00a0\u5982\u679c\u7aef\u53e3\u6709\u51b2\u7a81\uff0c\u53ef\u4ee5\u4fee\u6539\u8bbe\u7f6e\u6210\u5176\u4ed6\u7aef\u53e3\uff08\u5982<strong>8080<\/strong>\u7b49\uff09<\/td>\n<\/tr>\n<tr>\n<td>OLLAMA_ORIGINS<\/td>\n<td>\u8868\u793aHTTP \u5ba2\u6237\u7aef\u7684\u8bf7\u6c42\u6765\u6e90\uff0c\u4f7f\u7528\u534a\u89d2\u9017\u53f7\u5206\u9694\u5217\u8868\u5982\u679c\u672c\u5730\u4f7f\u7528\u4e0d\u53d7\u9650\u5236\uff0c\u53ef\u4ee5\u8bbe\u7f6e\u6210\u661f\u53f7\u00a0<code>*<\/code><\/td>\n<\/tr>\n<tr>\n<td>OLLAMA_KEEP_ALIVE<\/td>\n<td>\u8868\u793a\u5927\u6a21\u578b\u52a0\u8f7d\u5230\u5185\u5b58\u4e2d\u540e\u7684\u5b58\u6d3b\u65f6\u95f4\uff0c\u9ed8\u8ba4\u4e3a<strong>5m<\/strong>\u5373 5 \u5206\u949f\uff08\u5982\u7eaf\u6570\u5b57300 \u4ee3\u8868 300 \u79d2\uff0c0 \u4ee3\u8868\u5904\u7406\u8bf7\u6c42\u54cd\u5e94\u540e\u7acb\u5373\u5378\u8f7d\u6a21\u578b\uff0c\u4efb\u4f55\u8d1f\u6570\u5219\u8868\u793a\u4e00\u76f4\u5b58\u6d3b\uff09\u5efa\u8bae\u8bbe\u7f6e\u6210\u00a0<strong>24h<\/strong>\u00a0\uff0c\u5373\u6a21\u578b\u5728\u5185\u5b58\u4e2d\u4fdd\u6301 24 \u5c0f\u65f6\uff0c\u63d0\u9ad8\u8bbf\u95ee\u901f\u5ea6<\/td>\n<\/tr>\n<tr>\n<td>OLLAMA_NUM_PARALLEL<\/td>\n<td>\u8868\u793a\u8bf7\u6c42\u5904\u7406\u7684\u5e76\u53d1\u6570\u91cf\uff0c\u9ed8\u8ba4\u4e3a<strong>1<\/strong>\uff08\u5373\u5355\u5e76\u53d1\u4e32\u884c\u5904\u7406\u8bf7\u6c42\uff09\u5efa\u8bae\u6309\u7167\u5b9e\u9645\u9700\u6c42\u8fdb\u884c\u8c03\u6574<\/td>\n<\/tr>\n<tr>\n<td>OLLAMA_MAX_QUEUE<\/td>\n<td>\u8868\u793a\u8bf7\u6c42\u961f\u5217\u957f\u5ea6\uff0c\u9ed8\u8ba4\u503c\u4e3a<strong>512<\/strong>\u5efa\u8bae\u6309\u7167\u5b9e\u9645\u9700\u6c42\u8fdb\u884c\u8c03\u6574\uff0c\u8d85\u8fc7\u961f\u5217\u957f\u5ea6\u7684\u8bf7\u6c42\u4f1a\u88ab\u629b\u5f03<\/td>\n<\/tr>\n<tr>\n<td>OLLAMA_DEBUG<\/td>\n<td>\u8868\u793a\u8f93\u51fa Debug \u65e5\u5fd7\uff0c\u5e94\u7528\u7814\u53d1\u9636\u6bb5\u53ef\u4ee5\u8bbe\u7f6e\u6210<strong>1<\/strong>\uff08\u5373\u8f93\u51fa\u8be6\u7ec6\u65e5\u5fd7\u4fe1\u606f\uff0c\u4fbf\u4e8e\u6392\u67e5\u95ee\u9898\uff09<\/td>\n<\/tr>\n<tr>\n<td>OLLAMA_MAX_LOADED_MODELS<\/td>\n<td>\u8868\u793a\u6700\u591a\u540c\u65f6\u52a0\u8f7d\u5230\u5185\u5b58\u4e2d\u6a21\u578b\u7684\u6570\u91cf\uff0c\u9ed8\u8ba4\u4e3a<strong>1<\/strong>\uff08\u5373\u53ea\u80fd\u6709 1 \u4e2a\u6a21\u578b\u5728\u5185\u5b58\u4e2d\uff09<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>\u5bf9\u4e8e\u521d\u5b66\u8005\uff0c\u6211\u4eec\u5f3a\u70c8\u5efa\u8bae\u4f60\u914d\u7f6e\u00a0<code>OLLAMA_MODELS<\/code>\u00a0\u6765\u66f4\u6539\u6a21\u578b\u5b58\u50a8\u4f4d\u7f6e\u3002<\/strong>\u00a0\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cOllama \u6a21\u578b\u4f1a\u5b58\u50a8\u5728 C \u76d8\u7528\u6237\u76ee\u5f55\u4e0b\u7684\u00a0<code>.ollama\/models<\/code>\u00a0\u6587\u4ef6\u5939\uff0c\u5360\u7528 C \u76d8\u7a7a\u95f4\u3002 \u5c06\u5176\u66f4\u6539\u5230\u5176\u4ed6\u5206\u533a\u53ef\u4ee5\u66f4\u597d\u5730\u7ba1\u7406\u4f60\u7684\u5b58\u50a8\u3002<\/p>\n<p><strong>\u6b65\u9aa4 1\uff1a\u627e\u5230\u7cfb\u7edf\u73af\u5883\u53d8\u91cf\u7684\u8bbe\u7f6e\u5165\u53e3\u3002<\/strong><\/p>\n<p>\u65b9\u6cd5 1\uff1a\u5f00\u59cb-&gt;\u8bbe\u7f6e-&gt;\u5173\u4e8e-&gt;\u9ad8\u7ea7\u7cfb\u7edf\u8bbe\u7f6e-&gt;\u7cfb\u7edf\u5c5e\u6027-&gt;\u73af\u5883\u53d8\u91cf\u3002<\/p>\n<p>\u65b9\u6cd5 2\uff1a\u6b64\u7535\u8111-&gt;\u53f3\u952e-&gt;\u5c5e\u6027-&gt;\u9ad8\u7ea7\u7cfb\u7edf\u8bbe\u7f6e-&gt;\u73af\u5883\u53d8\u91cf\u3002<\/p>\n<p>\u65b9\u6cd5 3\uff1a\u5f00\u59cb-&gt;\u63a7\u5236\u9762\u677f-&gt;\u7cfb\u7edf\u548c\u5b89\u5168-&gt;\u7cfb\u7edf-&gt;\u9ad8\u7ea7\u7cfb\u7edf\u8bbe\u7f6e-&gt;\u7cfb\u7edf\u5c5e\u6027-&gt;\u73af\u5883\u53d8\u91cf\u3002<\/p>\n<p>\u65b9\u6cd5 4\uff1aWin+R \u6253\u5f00\u8fd0\u884c\u7a97\u53e3\uff0c\u8f93\u5165\u00a0<code>sysdm.cpl<\/code>\uff0c\u56de\u8f66\u6253\u5f00\u7cfb\u7edf\u5c5e\u6027\uff0c\u9009\u62e9\u9ad8\u7ea7\u9009\u9879\u5361\uff0c\u70b9\u51fb\u73af\u5883\u53d8\u91cf\u3002<\/p>\n<p><strong>\u6b65\u9aa4 2\uff1a\u8bbe\u7f6e\u00a0<code>OLLAMA_MODELS<\/code>\u00a0\u73af\u5883\u53d8\u91cf (\u66f4\u6539\u6a21\u578b\u5b58\u50a8\u4f4d\u7f6e)<\/strong><\/p>\n<ol>\n<li>\u5728 \u201c\u00a0<strong>\u73af\u5883\u53d8\u91cf<\/strong>\u00a0\u201d \u7a97\u53e3\u7684 \u201c\u00a0<strong>\u7cfb\u7edf\u53d8\u91cf(S)<\/strong>\u00a0\u201d \u533a\u57df (\u6216\u8005 \u201c\u7528\u6237\u53d8\u91cf(U)\u201d \u533a\u57df\uff0c\u6839\u636e\u4f60\u7684\u9700\u6c42\u9009\u62e9)\uff0c\u70b9\u51fb \u201c\u00a0<strong>\u65b0\u5efa(W)&#8230;<\/strong>\u00a0\u201d \u6309\u94ae\u3002<\/li>\n<li>\u5728 \u201c\u00a0<strong>\u53d8\u91cf\u540d(N)<\/strong>\u00a0\u201d \u8f93\u5165\u6846\u4e2d\uff0c\u8f93\u5165\uff1a\u00a0<code>OLLAMA_MODELS<\/code>\u00a0(\u6ce8\u610f\u5927\u5c0f\u5199\uff0c\u5efa\u8bae\u5168\u90e8\u5927\u5199)\u3002<\/li>\n<li>\u5728 \u201c\u00a0<strong>\u53d8\u91cf\u503c(V)<\/strong>\u00a0\u201d \u8f93\u5165\u6846\u4e2d\uff0c\u8f93\u5165\u4f60\u60f3\u8981\u8bbe\u7f6e\u7684\u6a21\u578b\u5b58\u50a8\u8def\u5f84\u3002\u00a0<strong>\u4f8b\u5982\uff0c\u5982\u679c\u4f60\u60f3\u5c06\u6a21\u578b\u5b58\u50a8\u5230 E \u76d8\u7684\u00a0<code>ollama\\models<\/code>\u00a0\u6587\u4ef6\u5939\u4e0b\uff0c\u4f60\u53ef\u4ee5\u5728 \u201c\u53d8\u91cf\u503c(V)\u201d \u4e2d\u8f93\u5165\uff1a\u00a0<code>E:\\ollama\\models<\/code><\/strong>\u00a0(\u8bf7\u6839\u636e\u4f60\u7684\u5b9e\u9645\u60c5\u51b5\u4fee\u6539\u76d8\u7b26\u548c\u6587\u4ef6\u5939\u8def\u5f84)\u3002\n<ul>\n<li><strong>\u6ce8\u610f\uff1a<\/strong>\u00a0\u8bf7\u786e\u4fdd\u4f60\u8f93\u5165\u7684\u8def\u5f84\u662f\u00a0<strong>\u5df2\u7ecf\u5b58\u5728\u7684\u6587\u4ef6\u5939<\/strong>\u00a0\u6216\u8005\u00a0<strong>\u4f60\u5e0c\u671b\u521b\u5efa\u7684\u6587\u4ef6\u5939\u7684\u7236\u76ee\u5f55\u5b58\u5728<\/strong>\u00a0\u3002 Ollama \u5728\u9996\u6b21\u8fd0\u884c\u65f6\u53ef\u80fd\u4f1a\u81ea\u52a8\u521b\u5efa\u00a0<code>models<\/code>\u00a0\u6587\u4ef6\u5939\uff0c\u4f46\u6700\u597d\u63d0\u524d\u521b\u5efa\u597d\u00a0<code>ollama<\/code>\u00a0\u6587\u4ef6\u5939\uff0c\u786e\u4fdd\u8def\u5f84\u7684\u6b63\u786e\u6027\u3002<\/li>\n<li><strong>\u793a\u4f8b\uff1a<\/strong>\u00a0\u4e3a\u4e86\u5c06\u6a21\u578b\u5b58\u50a8\u5230 E \u76d8\u7684\u00a0<code>ollama\\models<\/code>\u00a0\u6587\u4ef6\u5939\uff0c\u4f60\u53ef\u4ee5\u5728 \u201c\u53d8\u91cf\u503c(V)\u201d \u4e2d\u8f93\u5165\uff1a\u00a0<code>E:\\ollama\\models<\/code><\/li>\n<\/ul>\n<\/li>\n<li>\u70b9\u51fb \u201c\u00a0<strong>\u786e\u5b9a<\/strong>\u00a0\u201d \u6309\u94ae\uff0c\u5173\u95ed \u201c\u00a0<strong>\u65b0\u5efa\u7cfb\u7edf\u53d8\u91cf<\/strong>\u00a0\u201d (\u6216\u8005 \u201c\u65b0\u5efa\u7528\u6237\u53d8\u91cf\u201d) \u7a97\u53e3\u3002<\/li>\n<\/ol>\n<blockquote><p><strong>\u6ce8\u610f\uff1a<\/strong>\u00a0\u5982\u679c\u4f60\u4e0d\u77e5\u9053\u5982\u4f55\u8bbe\u7f6e\u00a0<code>OLLAMA_MODELS<\/code>\u00a0\u73af\u5883\u53d8\u91cf\uff0c\u53ef\u4ee5\u53c2\u8003\u4e0b\u9762\u7684\u793a\u4f8b\u3002<\/p><\/blockquote>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-28451\" title=\"Ollama \u5b89\u88c5\u4e0e\u914d\u7f6e - Windows \u7cfb\u7edf\u7bc7-4\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/03\/cece9ef0ec25d51.png\" alt=\"Ollama \u5b89\u88c5\u4e0e\u914d\u7f6e - Windows \u7cfb\u7edf\u7bc7-4\" width=\"1915\" height=\"1008\" srcset=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/03\/cece9ef0ec25d51.png 1915w, https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/03\/cece9ef0ec25d51-768x404.png 768w, https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/03\/cece9ef0ec25d51-1536x809.png 1536w, https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/03\/cece9ef0ec25d51-18x9.png 18w\" sizes=\"auto, (max-width: 1915px) 100vw, 1915px\" \/><\/p>\n<p><strong>(\u53ef\u9009) \u8bbe\u7f6e\u00a0<code>OLLAMA_HOST<\/code>\u00a0\u73af\u5883\u53d8\u91cf (\u4fee\u6539\u76d1\u542c\u5730\u5740)\u3002<\/strong><\/p>\n<p>\u5982\u679c\u4f60\u9700\u8981\u8ba9\u5c40\u57df\u7f51\u5185\u7684\u5176\u4ed6\u8bbe\u5907\u4e5f\u80fd\u8bbf\u95ee\u4f60\u7684 Ollama \u670d\u52a1\uff0c\u53ef\u4ee5\u914d\u7f6e\u00a0<code>OLLAMA_HOST<\/code>\u00a0\u73af\u5883\u53d8\u91cf\u3002<\/p>\n<ol>\n<li>\u540c\u6837\u5728 \u201c\u00a0<strong>\u73af\u5883\u53d8\u91cf<\/strong>\u00a0\u201d \u7a97\u53e3\u7684 \u201c\u00a0<strong>\u7cfb\u7edf\u53d8\u91cf(S)<\/strong>\u00a0\u201d \u533a\u57df (\u6216\u8005 \u201c\u7528\u6237\u53d8\u91cf(U)\u201d \u533a\u57df)\uff0c\u70b9\u51fb \u201c\u00a0<strong>\u65b0\u5efa(W)&#8230;<\/strong>\u00a0\u201d \u6309\u94ae\u3002<\/li>\n<li>\u5728 \u201c\u00a0<strong>\u53d8\u91cf\u540d(N)<\/strong>\u00a0\u201d \u8f93\u5165\u6846\u4e2d\uff0c\u8f93\u5165\uff1a\u00a0<code>OLLAMA_HOST<\/code><\/li>\n<li>\u5728 \u201c\u00a0<strong>\u53d8\u91cf\u503c(V)<\/strong>\u00a0\u201d \u8f93\u5165\u6846\u4e2d\uff0c\u8f93\u5165\u00a0<code>0.0.0.0:11434<\/code>\u00a0(\u6216\u8005\u4f60\u60f3\u8981\u6307\u5b9a\u7684\u7aef\u53e3\u53f7\uff0c\u9ed8\u8ba4\u7aef\u53e3\u662f 11434)\u3002\n<ul>\n<li><code>0.0.0.0<\/code>\u00a0\u8868\u793a\u76d1\u542c\u6240\u6709\u7f51\u7edc\u63a5\u53e3\uff0c\u5141\u8bb8\u5c40\u57df\u7f51\u8bbf\u95ee\u3002<\/li>\n<li><code>11434<\/code>\u00a0\u662f Ollama \u9ed8\u8ba4\u7aef\u53e3\u3002<\/li>\n<li><strong>\u793a\u4f8b\uff1a<\/strong>\u00a0<code>0.0.0.0:11434<\/code><\/li>\n<\/ul>\n<\/li>\n<li>\u70b9\u51fb \u201c\u00a0<strong>\u786e\u5b9a<\/strong>\u00a0\u201d \u6309\u94ae\uff0c\u5173\u95ed \u201c\u00a0<strong>\u65b0\u5efa\u7cfb\u7edf\u53d8\u91cf<\/strong>\u00a0\u201d (\u6216\u8005 \u201c\u65b0\u5efa\u7528\u6237\u53d8\u91cf\u201d) \u7a97\u53e3\u3002<\/li>\n<\/ol>\n<p><strong>\u6b65\u9aa4 3\uff1a\u91cd\u542f Ollama \u6216 PowerShell \u4f7f\u73af\u5883\u53d8\u91cf\u751f\u6548<\/strong><\/p>\n<p>\u73af\u5883\u53d8\u91cf\u8bbe\u7f6e\u5b8c\u6210\u540e\uff0c\u4f60\u9700\u8981\u00a0<strong>\u91cd\u542f Ollama \u670d\u52a1<\/strong>\u00a0\u6216\u8005\u00a0<strong>\u91cd\u65b0\u542f\u52a8\u4f60\u7684 \u547d\u4ee4\u63d0\u793a\u7b26 (CMD) \u6216 PowerShell \u7a97\u53e3<\/strong>\u00a0\uff0c\u624d\u80fd\u8ba9\u65b0\u7684\u73af\u5883\u53d8\u91cf\u751f\u6548\u3002<\/p>\n<ul>\n<li><strong>\u91cd\u542f Ollama \u670d\u52a1:<\/strong>\u00a0\u5982\u679c\u4f60\u8fd0\u884c\u4e86\u00a0<code>ollama serve<\/code>\uff0c\u5148\u00a0<code>Ctrl + C<\/code>\u00a0\u505c\u6b62\uff0c\u518d\u91cd\u65b0\u8fd0\u884c\u00a0<code>ollama serve<\/code>\u3002<\/li>\n<li><strong>\u91cd\u542f\u547d\u4ee4\u63d0\u793a\u7b26\/PowerShell:<\/strong>\u00a0\u5173\u95ed\u6240\u6709\u5df2\u6253\u5f00\u7684\u7a97\u53e3\uff0c\u91cd\u65b0\u6253\u5f00\u65b0\u7684\u7a97\u53e3\u3002<\/li>\n<\/ul>\n<p><strong>\u6b65\u9aa4 4\uff1a\u9a8c\u8bc1\u73af\u5883\u53d8\u91cf\u662f\u5426\u751f\u6548<\/strong><\/p>\n<ol>\n<li>\u91cd\u65b0\u6253\u5f00\u00a0<strong>\u547d\u4ee4\u63d0\u793a\u7b26 (CMD)<\/strong>\u00a0\u6216\u8005\u00a0<strong>PowerShell<\/strong>\u00a0\u3002<\/li>\n<li><strong>\u9a8c\u8bc1\u00a0<code>OLLAMA_MODELS<\/code>:<\/strong>\u00a0\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u5e76\u56de\u8f66\uff1a<\/li>\n<\/ol>\n<pre><code>echo %OLLAMA_MODELS%\r\n<\/code><\/pre>\n<blockquote><p>\u8f93\u51fa\uff1a<code>E:\\ollama\\models<\/code>\u00a0(\u5982\u679c\u4f60\u8bbe\u7f6e\u7684\u662f\u00a0<code>E:\\ollama\\models<\/code>)<\/p><\/blockquote>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-28452\" title=\"Ollama \u5b89\u88c5\u4e0e\u914d\u7f6e - Windows \u7cfb\u7edf\u7bc7-5\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/03\/e85a76a50c9d900.png\" alt=\"Ollama \u5b89\u88c5\u4e0e\u914d\u7f6e - Windows \u7cfb\u7edf\u7bc7-5\" width=\"979\" height=\"512\" srcset=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/03\/e85a76a50c9d900.png 979w, https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/03\/e85a76a50c9d900-768x402.png 768w, https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/03\/e85a76a50c9d900-18x9.png 18w\" sizes=\"auto, (max-width: 979px) 100vw, 979px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h2>\u4e09\u3001\u8fd0\u884cOllama<\/h2>\n<ul>\n<li>\u547d\u4ee4\u884c\u8bed\u53e5\u542f\u52a8<\/li>\n<\/ul>\n<pre><code>ollama serve\r\n<\/code><\/pre>\n<blockquote><p>\u542f\u52a8 Ollama \u65f6\u4f1a\u62a5\u9519\u5982\u4e0b\uff0c\u56e0\u4e3a Windows \u7cfb\u7edf\u5b89\u88c5 Ollama \u65f6\u4f1a\u00a0<strong>\u9ed8\u8ba4\u5f00\u673a\u542f\u52a8<\/strong>\u00a0\uff0c<strong>Ollama<\/strong>\u00a0\u670d\u52a1\u9ed8\u8ba4\u662f\u00a0http:\/\/127.0.0.1:11434<\/p>\n<p><code>Error: listen tcp 127.0.0.1:11434: bind: Only one usage of each socket address (protocol\/network address\/port) is normally permitted.<\/code><\/p><\/blockquote>\n<ul>\n<li>\u89e3\u51b3\u65b9\u6cd5\uff1a<\/li>\n<\/ul>\n<ol>\n<li>\u5feb\u6377\u952e\u00a0<code>Win+X<\/code>\u00a0\u6253\u5f00\u4efb\u52a1\u7ba1\u7406\u5668\uff0c\u70b9\u51fb\u00a0<code>\u542f\u52a8<\/code>\uff0c\u7981\u7528 Ollama\uff0c\u5e76\u5728<strong>\u8fdb\u7a0b<\/strong>\u4e2d\u7ed3\u675f Ollama \u7684\u4efb\u52a1\u3002<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-28454\" title=\"Ollama \u5b89\u88c5\u4e0e\u914d\u7f6e - Windows \u7cfb\u7edf\u7bc7-6\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/03\/827b2ae8e44540f.png\" alt=\"Ollama \u5b89\u88c5\u4e0e\u914d\u7f6e - Windows \u7cfb\u7edf\u7bc7-6\" width=\"603\" height=\"469\" srcset=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/03\/827b2ae8e44540f.png 603w, https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/03\/827b2ae8e44540f-15x12.png 15w\" sizes=\"auto, (max-width: 603px) 100vw, 603px\" \/><\/li>\n<li>\u518d\u6b21\u4f7f\u7528\u00a0<code>ollama serve<\/code>\u6253\u5f00 Ollama\u3002<\/li>\n<\/ol>\n<ul>\n<li>\u9a8c\u8bc1\u6210\u529f\u542f\u52a8\uff1a<\/li>\n<\/ul>\n<ol>\n<li>\u5feb\u6377\u952e\u00a0<code>Win+R<\/code>\uff0c\u8f93\u5165\u00a0<code>cmd<\/code>\uff0c\u6253\u5f00\u547d\u4ee4\u884c\u7ec8\u7aef\u3002<\/li>\n<li>\u8f93\u5165\u00a0<code>netstat -aon|findstr 11434<\/code>\u00a0\u67e5\u770b\u5360\u7528\u7aef\u53e311434\u7684\u8fdb\u7a0b\u3002<\/li>\n<\/ol>\n<pre><code>netstat -aon|findstr 11434\r\n<\/code><\/pre>\n<blockquote><p>\u8f93\u51fa\uff1a<code> TCP 127.0.0.1:11434 0.0.0.0:0 LISTENING 17556<\/code><\/p>\n<p>\u663e\u793a11434\u7aef\u53e3\u88ab17556\u8fdb\u7a0b\u5360\u7528<\/p><\/blockquote>\n<ol start=\"3\">\n<li>\u67e5\u770b\u8be5\u8fdb\u7a0b\u8fd0\u884c\u7684\u60c5\u51b5\uff0c\u53d1\u73b0 Ollama \u5df2\u7ecf\u542f\u52a8\u3002<\/li>\n<\/ol>\n<pre><code>tasklist|findstr \"17556\"\r\n<\/code><\/pre>\n<blockquote><p>\u8f93\u51fa\u5982\u4e0b\uff1a<code>ollama.exe 17556 Console 1 31,856 K<\/code><\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<h2>\u56db\u3001\u9a8c\u8bc1\u5b89\u88c5\u6210\u529f\ud83c\udf89<\/h2>\n<ul>\n<li>\u7ec8\u7aef\u8f93\u5165\uff1a<\/li>\n<\/ul>\n<pre><code>ollama -h\r\n<\/code><\/pre>\n<p>\u8f93\u51fa\u5982\u4e0b\uff1a\u5373\u8868\u793a\u5b89\u88c5\u6210\u529f\ud83c\udf89<\/p>\n<pre><code>Large language model runner\r\nUsage:\r\nollama [flags]\r\nollama [<a href=\"https:\/\/www.kdjingpai.com\/en\/cohere\/\">command<\/a>]\r\nAvailable Commands:\r\nserve       Start ollama\r\ncreate      Create a model from a Modelfile\r\nshow        Show information for a model\r\nrun         Run a model\r\npull        Pull a model from a registry\r\npush        Push a model to a registry\r\nlist        List models\r\nps          List running models\r\ncp          Copy a model\r\nrm          Remove a model\r\nhelp        Help about any command\r\nFlags:\r\n-h, --help      help for ollama\r\n-v, --version   Show version information\r\n<\/code><\/pre>\n<ul>\n<li>\u7ec8\u7aef\u4f7f\u7528Ollama :<\/li>\n<\/ul>\n<blockquote><p><a href=\"https:\/\/ollama.com\/library\">library (ollama.com)<\/a>\u00a0\u8fd9\u91cc\u662follama\u7684\u6a21\u578b\u5e93\uff0c\u641c\u7d22\u4f60\u60f3\u8981\u7684\u6a21\u578b\uff0c\u7136\u540e\u76f4\u63a5\u542f\u52a8\uff01<\/p><\/blockquote>\n<pre><code>ollama run llama3\r\n<\/code><\/pre>\n<blockquote><p>\u4e0b\u8f7d\u901f\u5ea6\u53d6\u51b3\u4e8e\u4f60\u7684\u5e26\u5bbd\uff0c\u4e0b\u8f7d\u5b8c\u6bd5\u5373\u53ef\u4f7f\u7528\u270c\u8bb0\u5f97\u4f7f\u7528\u00a0<code>control + D<\/code>\u00a0\u9000\u51fa\u804a\u5929<\/p><\/blockquote>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-28453\" title=\"Ollama \u5b89\u88c5\u4e0e\u914d\u7f6e - Windows \u7cfb\u7edf\u7bc7-7\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/03\/0562acf8db68e3c.png\" alt=\"Ollama \u5b89\u88c5\u4e0e\u914d\u7f6e - Windows \u7cfb\u7edf\u7bc7-7\" width=\"956\" height=\"69\" srcset=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/03\/0562acf8db68e3c.png 956w, https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/03\/0562acf8db68e3c-768x55.png 768w, https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/03\/0562acf8db68e3c-18x1.png 18w\" sizes=\"auto, (max-width: 956px) 100vw, 956px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h2>\u4e94\u3001\u5982\u4f55\u53d6\u6d88\u5f00\u673a\u81ea\u542f<\/h2>\n<p>\uff08\u622a\u81f32024-08-19\uff09\u76ee\u524d Ollama \u5728 Windows \u7cfb\u7edf\u4e0b\u9ed8\u8ba4\u5f00\u673a\u81ea\u542f\uff0c\u5982\u679c\u4e0d\u9700\u8981\u5f00\u673a\u81ea\u542f\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u6b65\u9aa4\u53d6\u6d88\u3002<\/p>\n<p>\u6253\u5f00\u4efb\u52a1\u7ba1\u7406\u5668\uff0c\u70b9\u51fb\u00a0<code>\u542f\u52a8\u5e94\u7528<\/code>\uff0c\u627e\u5230\u00a0<code>ollama.exe<\/code>\u00a0\uff0c\u53f3\u952e\u70b9\u51fb\u00a0<code>\u7981\u7528<\/code>\u00a0\u5373\u53ef\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-28455\" title=\"Ollama \u5b89\u88c5\u4e0e\u914d\u7f6e - Windows \u7cfb\u7edf\u7bc7-8\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/03\/7ea3592c4604fcf.png\" alt=\"Ollama \u5b89\u88c5\u4e0e\u914d\u7f6e - Windows \u7cfb\u7edf\u7bc7-8\" width=\"1430\" height=\"874\" srcset=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/03\/7ea3592c4604fcf.png 1430w, https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/03\/7ea3592c4604fcf-768x469.png 768w, https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/03\/7ea3592c4604fcf-18x12.png 18w\" sizes=\"auto, (max-width: 1430px) 100vw, 1430px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7b80\u4ecb \u672c\u8282\u5b66\u4e60\u5982\u4f55\u5728 Windows \u7cfb\u7edf\u4e2d\u5b8c\u6210 Ollama \u7684\u5b89\u88c5\u4e0e\u914d\u7f6e\uff0c\u4e3b\u8981\u5206\u4e3a\u4ee5\u4e0b\u51e0\u4e2a\u90e8\u5206: \u8bbf\u95ee\u5b98\u7f51\u76f4\u63a5\u5b8c\u6210\u4e0b\u8f7d \u73af\u5883\u53d8\u91cf\u914d\u7f6e \u8fd0\u884c Ollama \u9a8c\u8bc1\u5b89\u88c5\u6210\u529f\ud83c\udf89 &nbsp; \u4e00\u3001\u8bbf\u95ee\u5b98\u7f51\u76f4\u63a5\u5b8c\u6210\u4e0b\u8f7d \u8bbf\u95ee\u5b98\u7f51\u4e3b\u9875 Ollama&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[182],"tags":[],"class_list":["post-28447","post","type-post","status-publish","format-standard","hentry","category-shicao"],"_links":{"self":[{"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/posts\/28447","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/comments?post=28447"}],"version-history":[{"count":0,"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/posts\/28447\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/media?parent=28447"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/categories?post=28447"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/tags?post=28447"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}