dapr离线安装

国内网络问题按dapr官方的指导无法完成安装,只能通过下载安装包的方式进行离线安装,步骤:

  1. https://github.com/dapr/cli/releases下载dapr_windows_amd64.zip或者
    dapr_linux_amd64.tar.gz
  2. 解压,在windows上需要将解决压后的路径添加到path环境变量,在linux上直接将解压后的dapr文件复制到/usr/local/bin目录下
  3. 输入:dapr,出现如下内容表示dapr CLI安装成功
  4.          __
        ____/ /___ _____  _____
       / __  / __ '/ __ \/ ___/
      / /_/ / /_/ / /_/ / /
      \__,_/\__,_/ .___/_/
                  /_/
    
    ===============================
    Distributed Application Runtime
    
    Usage:
      dapr [command]
    
    Available Commands:
      completion     Generates shell completion scripts
      components     List all Dapr components. Supported platforms: Kubernetes
      configurations List all Dapr configurations. Supported platforms: Kubernetes
      dashboard      Start Dapr dashboard. Supported platforms: Kubernetes and self-hosted
      help           Help about any command
      init           Install Dapr on supported hosting platforms. Supported platforms: Kubernetes and self-hosted
      invoke         Invoke a method on a given Dapr application. Supported platforms: Self-hosted
      list           List all Dapr instances. Supported platforms: Kubernetes and self-hosted
      logs           Get Dapr sidecar logs for an application. Supported platforms: Kubernetes
      mtls           Check if mTLS is enabled. Supported platforms: Kubernetes
      publish        Publish a pub-sub event. Supported platforms: Self-hosted
      run            Run Dapr and (optionally) your application side by side. Supported platforms: Self-hosted
      status         Show the health status of Dapr services. Supported platforms: Kubernetes
      stop           Stop Dapr instances and their associated apps. . Supported platforms: Self-hosted
      uninstall      Uninstall Dapr runtime. Supported platforms: Kubernetes and self-hosted
      upgrade        Upgrades a Dapr control plane installation in a cluster. Supported platforms: Kubernetes
    
    Flags:
      -h, --help      help for dapr
      -v, --version   version for dapr
    
    Use "dapr [command] --help" for more information about a command.
    

  5. https://github.com/dapr/dashboard/releases/上下载dashboard_linux_amd64.tar.gz,如果是windows则请下载对应的windows版本
  6. Releases · dapr/dapr · GitHub上下载daprd_linux_amd64.tar.gz,如果是windows则请下载对应的windows版本
  7. 执行:dapr init,一般都会由于网络问题而导致初始化过程中止,运行docker ps命令会看到多了三个容器,其中 dapr_placement应当是一直处于运行失败的状态
  8. 将dashboard_linux_amd64.tar.gz和daprd_linux_amd64.tar.gz复制到/root/.dapr/bin目录下,windows上应当是C:\Users\{用户名}\.dapr\bin目录下,并解压。
  9. 执行docker restart dapr_placement后,dapr_placement容器将会处于正常运行的状态
  10. 执行dapr --version,看到如下内容表示正常:
  11. CLI version: 1.8.1 
    Runtime version: 1.8.4
  12. 如果看到Runtime version: n/a则表示没有成功
  13. 初始化成功后,可继续按官方文档进行后面的操作
  14. 补充:dashboard_linux_amd64.tar.gz解压后,需要把解压目录release/linux_amd64下的dashboard二进制文件和web文件复制到/root/.dapr/bin目录下,否则运行dapr dashboard时会报:Dapr dashboard not found. Is Dapr installed,如果运行dapr dashboard还是出现以下问题,则使用dapr dashboard -p 9999 -a 0.0.0.0运行即可

官方线离安装文档:

How-To: Run Dapr in an offline or airgap environment | Dapr Docs

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值