【小编使用的是虚拟化部署】有用windows的小伙伴可以参考Dify Documentation - Dify Docs或OS苹果平板这个是去官网Downloadhttps://www.centos.org/CentOS91、vmware安装镜像第一步自定义安装第二步:默认配置第三步创建一个空盘第四步选择Linux 安装第五步选择存储的位置第六步选择处理器配置这里4核8核根据个人配置第七步虚拟化内存虚拟化内存我用的都是8G8192的第八步网络类型这里默认就好啦默认配置即可第九步选择I/O控制器类型这里演示为LSI Logic 介绍这里就不再标注磁盘类型NvMe(V)跟随版本即可第十步这里选择磁盘默认即可磁盘大小选择为100GB 如有不够后期添加即可选择磁盘文件默认即可第十一步自定义硬件选择镜像使用ISO镜像选择镜像文件点击关闭即可这里我就创建好了2、Docker安装erDockDoc官网guanwgDocker DocsDocker Documentation is the official Docker library of resources, manuals, and guides to help you containerize applications.https://docs.docker.com/yum install dnf* -y卸载旧版的Dockersudo dnf remove docker \docker-client \docker-client-latest \docker-common \docker-latest \docker-latest-logrotate \docker-logrotate \docker-engine使用RPM仓库进行安装sudo dnf -y install dnf-plugins-coresudo dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo仓库安装不成功进入源目录cd /etc/yum.repos.d删除原来的 docker-ce.reporm -f docker-ce.repo新建阿里云docker源cat docker-ce.repo EOF [docker-ce-stable] nameDocker CE Stable - \$basearch baseurlhttps://mirrors.aliyun.com/docker-ce/linux/centos/7/\$basearch/stable enabled1 gpgcheck1 gpgkeyhttps://mirrors.aliyun.com/docker-ce/linux/centos/gpg EOF清除缓存dnf clean all重建缓存安装Docker引擎dnf -y install docker-ce docker-ce-cli containerd.io docker-compose-plugin使用yum指令yum install docker-ce docker-ce-cli containerd.io docker-compose-plugin安装完成启动Docker引擎sudo systemctl enable --now docker1、查看docker运行状态systemctl status docker绿色active (running) 正常运行红色 failed 启动失败3、difty安装1、克隆 Difygit clone --branch $(curl -s https://api.github.com/repos/langgenius/dify/releases/latest | jq -r .tag_name) https://github.com/langgenius/dify.git2、进入 Dify 源代码中的docker目录cd dify.mian/dockercp .env.example .env3、为 Agent 沙箱生成一个令牌openssl rand -base64 32在.env中把DIFY_AGENT_LOCAL_SANDBOX_AUTH_TOKEN设为上面命令的输出。不设置的话Agent 后端和它的沙箱都无法启动。4、验证所有容器是否成功运行docker compose ps5、访问http://localhost/intall格式http://虚拟环境IP/intall
阅读完成 · 觉得有帮助?