当前位置: 首页> 房产> 政策 > 企业管理专业主要课程_如何查询中小企业名单_seo的工作流程_自己怎么做网页推广

企业管理专业主要课程_如何查询中小企业名单_seo的工作流程_自己怎么做网页推广

时间:2025/7/12 8:38:12来源:https://blog.csdn.net/yixiao0307/article/details/146186738 浏览次数:0次
企业管理专业主要课程_如何查询中小企业名单_seo的工作流程_自己怎么做网页推广

milvus官方网站并没有针对windows系统的安装有系统性的安装讲解,因此走了很多的弯路,为让兄弟们一路畅通,把安装过程做了如下记录。
另外有几点提醒:
1、windows无法安装milvus lite(网上大多说不支持,只有个别牛人说支持,但是我历尽千辛万苦,尝试了很多方法,依然无效。所以,权当不支持吧,有不怕苦的兄弟,也可以自己试试)
2、windows安装milvus只支持docker安装(原本我想要原生安装的,但也是无果,默哀10分钟)
在这里插入图片描述

一、准备工作

确保电脑上已装了python 3.8+

二、安装Docker

1、先安装Hyper-V
以此打开开:控制面板 - 程序和功能 - 启用或关闭Windows功能,选中Hyper-V,点确定安装
在这里插入图片描述
2、下载Docker桌面版
下载地址:https://www.docker.com/
在这里插入图片描述
3、运行一直点击下一步安装至完成
在这里插入图片描述
在这里插入图片描述
看到这个画面代表安装成功
在这里插入图片描述
如果中途弹出安装wsl --update失败的窗口,就自己用管理员权限打开Windows PowerShell重新执行以下代码

wsl --update

在这里插入图片描述

三、安装Milvus

1、点击此链接下载文件并保存到本地(可能需要梯子),重命名为:standalone.bat
文件链接:https://raw.githubusercontent.com/milvus-io/milvus/refs/heads/master/scripts/standalone_embed.bat
如果无法下载,请新建standalone.bat文件,并将以下代码粘贴至standalone.bat文件中:

@REM  Licensed to the LF AI & Data foundation under one
@REM  or more contributor license agreements. See the NOTICE file
@REM  distributed with this work for additional information
@REM  regarding copyright ownership. The ASF licenses this file
@REM  to you under the Apache License, Version 2.0 (the
@REM  "License"); you may not use this file except in compliance
@REM  with the License. You may obtain a copy of the License at
@REM 
@REM    http://www.apache.org/licenses/LICENSE-2.0
@REM 
@REM  Unless required by applicable law or agreed to in writing, software
@REM  distributed under the License is distributed on an "AS IS" BASIS,
@REM  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@REM  See the License for the specific language governing permissions and
@REM  limitations under the License.@echo off
setlocal enabledelayedexpansion:main
if "%1"=="" (echo Please use standalone_embed.bat restart^|start^|stop^|deleteexit /b 1
)if "%1"=="restart" (call :stopcall :start
) else if "%1"=="start" (call :start
) else if "%1"=="stop" (call :stop
) else if "%1"=="delete" (call :delete
) else (echo Unknown command.echo Please use standalone_embed.bat restart^|start^|stop^|upgrade^|deleteexit /b 1
)
goto :eof:run_embed
(
echo listen-client-urls: http://0.0.0.0:2379
echo advertise-client-urls: http://0.0.0.0:2379
echo quota-backend-bytes: 4294967296
echo auto-compaction-mode: revision
echo auto-compaction-retention: '1000'
) > embedEtcd.yaml(
echo # Extra config to override default milvus.yaml
) > user.yamlif not exist "embedEtcd.yaml" (echo embedEtcd.yaml file does not exist. Please try to create it in the current directory.exit /b 1
)
if not exist "user.yaml" (echo user.yaml file does not exist. Please try to create it in the current directory.exit /b 1
)docker run -d ^--name milvus-standalone ^--security-opt seccomp:unconfined ^-e ETCD_USE_EMBED=true ^-e ETCD_DATA_DIR=/var/lib/milvus/etcd ^-e ETCD_CONFIG_PATH=/milvus/configs/embedEtcd.yaml ^-e COMMON_STORAGETYPE=local ^-v "%cd%\volumes\milvus:/var/lib/milvus" ^-v "%cd%\embedEtcd.yaml:/milvus/configs/embedEtcd.yaml" ^-v "%cd%\user.yaml:/milvus/configs/user.yaml" ^-p 19530:19530 ^-p 9091:9091 ^-p 2379:2379 ^--health-cmd="curl -f http://localhost:9091/healthz" ^--health-interval=30s ^--health-start-period=90s ^--health-timeout=20s ^--health-retries=3 ^milvusdb/milvus:v2.5.5 ^milvus run standalone >nul
if %errorlevel% neq 0 (echo Failed to start Milvus container.exit /b 1
)goto :eof:wait_for_milvus_running
echo Wait for Milvus Starting...
:wait_loop
for /f "tokens=*" %%A in ('docker ps ^| findstr "milvus-standalone" ^| findstr "healthy"') do set running=1
if "!running!"=="1" (echo Start successfully.echo To change the default Milvus configuration, edit user.yaml and restart the service.goto :eof
)
timeout /t 1 >nul
goto wait_loop:start
for /f "tokens=*" %%A in ('docker ps ^| findstr "milvus-standalone" ^| findstr "healthy"') do (echo Milvus is running.exit /b 0
)for /f "tokens=*" %%A in ('docker ps -a ^| findstr "milvus-standalone"') do set container_exists=1
if defined container_exists (docker start milvus-standalone >nul
) else (call :run_embed
)if %errorlevel% neq 0 (echo Start failed.exit /b 1
)call :wait_for_milvus_running
goto :eof:stop
docker stop milvus-standalone >nul
if %errorlevel% neq 0 (echo Stop failed.exit /b 1
)
echo Stop successfully.
goto :eof:delete_container
for /f "tokens=*" %%A in ('docker ps ^| findstr "milvus-standalone"') do (echo Please stop Milvus service before delete.exit /b 1
)
docker rm milvus-standalone >nul
if %errorlevel% neq 0 (echo Delete Milvus container failed.exit /b 1
)
echo Delete Milvus container successfully.
goto :eof:delete
call :delete_container
rmdir /s /q "%cd%\volumes"
del /q embedEtcd.yaml
del /q user.yaml
echo Delete successfully.
goto :eof:EOF

2、执行安装

standalone.bat start

在这里插入图片描述
(可能需要梯子,请自备)

3、测试链接
在本地新建test.py文件,贴上以下代码,执行后不报错,说明已经安装成功

from pymilvus import connections# 连接到 Milvus 服务
connections.connect(alias="default",host='localhost',port='19530'
)

四、安装图形化管理工具attu

1、查看docker虚拟IP
打开cmd命令行窗口,并执行以下代码

ipconfig

找到如下IP(WSL (Hyper-V firewall) IPv4地址),如:172.24.208.1
在这里插入图片描述

2、执行安装attu

将以下命令中的{milvus server IP}替换成上一步获取到的docker虚拟IP

docker run -p 8000:3000 -e MILVUS_URL={milvus server IP}:19530 zilliz/attu:v2.5

如:

docker run -p 8000:3000 -e MILVUS_URL=172.24.208.1:19530 zilliz/attu:v2.5

等待执行完毕
在这里插入图片描述
在浏览器打开:http://127.0.0.1:8000/
在这里插入图片描述
确保Milvus地址是docker虚拟IP,端口是19530,点击“连接”,即可看到图形化的管理界面了。
在这里插入图片描述

五、运行milvus

经过以上步骤安装好milvus后,第二天会发现电脑重启开启,milvus服务却不能用了。可以按照以下方式手动运行,就可以继续访问了。
步骤如下:
打开Docker - Containers,并选中Actions列的运行按钮(三角型按钮)
在这里插入图片描述
点击运行之后,需要等待一段时间,点击Name,可以查看运行进度详情
在这里插入图片描述
我们也可以访问http://localhost:19530,如出现下图显示,也代表milvus已运行成功
在这里插入图片描述

关键字:企业管理专业主要课程_如何查询中小企业名单_seo的工作流程_自己怎么做网页推广

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

责任编辑: