IOT2050 (Debian11)安装 Azure IoT Edge Runtime

< Jiang Jia Hao > jiahao.jiang@scapeak.com

创建工作目录

cd /home
mkdir work && chmod -R 777 work
cd work

配置环境

#设备上设置微软的存储库
curl https://packages.microsoft.com/config/debian/11/prod.list > $(pwd)/microsoft-prod.list
cp $(pwd)/microsoft-prod.list /etc/apt/sources.list.d/

curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > $(pwd)/microsoft.gpg
cp $(pwd)/microsoft.gpg /etc/apt/trusted.gpg.d/

注:若在执行第三步命令出现:-bash: gpg: command not found错误,请先安装 gpg 命令。gpg 命令用于签名、加密和验证数据。

你需要在系统中使用 gpg 命令,可以按照以下步骤安装:

sudo apt-get update
sudo apt-get install gnupg

安装容器引擎

sudo apt-get update
sudo apt-get update --fix-missing
apt-get -y install moby-engine moby-cli

获取 aziot-edge 和 aziot-identity-service 安装包

wget https://github.com/Azure/azure-iotedge/releases/download/1.4.2/aziot-edge_1.4.2-1_debian11_arm64.deb
wget https://github.com/Azure/azure-iotedge/releases/download/1.4.2/aziot-identity-service_1.4.1-1_debian11_arm64.deb

安装 Azure IoT Edge

dpkg -i aziot-edge_1.4.2-1_debian11_arm64.deb
dpkg -i aziot-identity-service_1.4.1-1_debian11_arm64.deb

注:若在执行安装命令时出现如下错误,请安装缺失的依赖包

dpkg: dependency problems prevent configuration of aziot-identity-service:
 aziot-identity-service depends on libtss2-esys-3.0.2-0 (>= 2.3.1); however:
  Package libtss2-esys-3.0.2-0 is not installed.
 aziot-identity-service depends on libtss2-mu0 (>= 3.0.1); however:
  Package libtss2-mu0 is not installed.
 aziot-identity-service depends on libtss2-rc0 (>= 3.0.1); however:
  Package libtss2-rc0 is not installed.
 aziot-identity-service depends on libtss2-tctildr0 (>= 3.0.1); however:
  Package libtss2-tctildr0 is not installed.

dpkg: error processing package aziot-identity-service (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 aziot-identity-service

安装缺失的依赖包:

sudo apt-get update
sudo apt-get install libtss2-esys-3.0.2-0 libtss2-mu0 libtss2-rc0 libtss2-tctildr0

配置IoT Edge Device链接字符串

cp /etc/aziot/config.toml.template /etc/aziot/config.toml

# 编辑config.toml文件,打开如下三行注释并修改connection_string为自己设备的连接字符串

[provisioning]
source = "manual"
connection_string = "your-connection-string"

卸载 Azure IoT Edge

如果您需要卸载 Azure IoT Edge,可继续参阅如下步骤

apt-get remove -y --purge aziot-edge
docker rm -f $(docker ps -aq)
apt-get remove -y --purge moby-cli
apt-get remove -y --purge moby-engine
清理安装文件
rm aziot-edge_1.4.2-1_debian11_arm64.deb
rm aziot-identity-service_1.4.1-1_debian11_arm64.deb

Author

< Jiang Jia Hao > jiahao.jiang@scapeak.com

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值