linux下dapr离线安装

1.安装wget
yum install wget  #如果已经安装可以不进行该操作
2.确保已经安装了gcc,如果出错则更换为阿里云源
yum -y install gcc
yum -y install gcc-c++


3.安装docker,-ce免费版,-ee收费版,如果-ce无法安装,则去掉-ce,如果去掉-ce则会出现不兼容的问题
curl -sSL https://get.daocloud.io/docker | sh  #推荐用这个,可以安装到适合.net core的版本
或 yum install docker #这个版本和上面的不一样
4.启动docker
systemctl start docker
设置开机自启动
systemctl enable docker
5、查看docker版本
docker version
6.下载hello-world镜像,如果拉不过来就将docker的镜像改成国内的
docker pull hello-world
7.测试运行hello-world
docker run hello-world
8.拉取.net core 6.0镜像 ,最新版.net core 镜像
docker run -it microsoft/dotnet:latest
或 docker pull mcr.microsoft.com/dotnet/aspnet:6.0


9.下载离线安装包并解压
 下载地址:linux、window下离线安装dapr-微服务文档类资源-CSDN下载
wget ftp://192.168.1.17/dapr/daprbundle_linux_amd64.tar.gz
tar -zxvf daprbundle_linux_amd64.tar.gz
10.mv daprbundle /usr/local/bin  #复制到该文件夹下
11.进入 daprbundle的解压目录,执行如下语句
cd /usr/local/bin/daprbundle
dapr uninstall          # 清空之前的
dapr init --from-dir .  # 根据本目录下进行离线初始化
docker ps

12.更换为阿里云源

   yum -y install wget  //安装wget

如果失败,则:

        curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

       yum -y install wget

备份源  mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak

清理缓存 yum clean all

更新本地源  yum makecache

错误提示:
1.如果提示dapr未找到命令,则采用进行如下步骤后再执行第11步:
wget ftp://192.168.1.17/dapr/1.6/dapr_linux_amd64.tar.gz
tar -zxvf dapr_linux_amd64.tar.gz
mv dapr /usr/local/bin
cd /usr/local/bin
dapr init

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值