本帖最后由 辽宁小袁 于 2020-1-11 14:20 编辑
root@raspberrypi:/home/pi# curl -sL -o install.sh https://raw.githubusercontent.com/neroxps/hassio_install/master/install.sh
root@raspberrypi:/home/pi# chmod a+x install.sh
root@raspberrypi:/home/pi# ./install.sh
(1). 是否将系统源切换为中科大(USTC)源(目前支持 Debian Ubuntu Raspbian 三款系统)
请输入 y or n(默认 yes):
(2). 找到该系统中有以下用户名
如下方列表未显示你的用户名,请切换回你用户账号后输入 sudo usermod -aG docker $USER 添加用户到 docker 用户组。
[1]: pi
[2]: systemd-coredump
[s]: 跳过
请输入你需要使用 docker 的用户名序号,以加入 docker 用户组:1
将pi用户添加至 docker 用户组。
(3).是否需要替换 docker 默认源?
请输入 yes 或者 no(默认:yes):
1. docker-cn (docker 官方中国镜像源,阿里云提供服务,但流量大可能会卡)
2. 七牛云 docker 镜像源
3. 163 docker 镜像源(无 SSL)
请选择 docker 加速器(默认:七牛云):
(4).请选择你设备类型(默认:qemux86)
[1]: intel-nuc: 英特尔的nuc小主机
[2]: odroid-c2: 韩国odroid-c2
[3]: odroid-xu: 韩国odroid-xu
[4]: orangepi-prime: 香橙派
[5]: qemuarm: 通用arm设备(例如斐讯N1)
[6]: qemux86: 通用X86(普通的PC机电脑)
[7]: raspberrypi: 树莓派一代
[8]: raspberrypi2: 树莓派二代
[9]: raspberrypi3: 树莓派三代
[10]: raspberrypi4: 树莓派四代
[11]: tinker: 华硕tinker
输入数字 (1-11):9
你选择了 raspberrypi3
(5).是否需要设置 hassio 数据保存路径(默认:/usr/share/hassio)
请输入 yes 或 no (默认:no):
hassio 数据路径为默认路径: /usr/share/hassio
################################################################################
# 1. 是否将系统源切换为中科大(USTC)源: 是
# 2. 是否将用户添加至 Docker 用户组: 是,添加用户为 pi
# 3. 是否将 Docker 源切换至国内源: 是,切换源选择:七牛云
# 4. 您的设备类型为: raspberrypi3
# 5. 您的 hassio 数据路径为: /usr/share/hassio
################################################################################
请确认以上信息,继续请按任意键,如需修改请输入 Ctrl+C 结束任务重新执行脚本。
[info]: 切换系统网络源.....
备份系统源文件为 /etc/apt/sources.list.bak
Get:1 http://archive.raspberrypi.org/debian buster InRelease [25.1 kB]
Get:2 http://archive.raspberrypi.org/debian buster/main armhf Packages [261 kB]
Get:3 http://mirrors.ustc.edu.cn/raspbian/raspbian buster InRelease [15.0 kB]
Get:4 http://mirrors.ustc.edu.cn/archive.raspberrypi.org/debian buster InRelease [25.1 kB]
Get:5 http://mirrors.ustc.edu.cn/raspbian/raspbian buster/main armhf Packages [13.0 MB]
Get:6 http://mirrors.ustc.edu.cn/raspbian/raspbian buster/contrib armhf Packages [58.7 kB]
Get:7 http://mirrors.ustc.edu.cn/raspbian/raspbian buster/non-free armhf Packages [103 kB]
Get:8 http://mirrors.ustc.edu.cn/raspbian/raspbian buster/rpi armhf Packages [1,360 B]
Get:9 http://mirrors.ustc.edu.cn/archive.raspberrypi.org/debian buster/main armhf Packages [261 kB]
Fetched 13.8 MB in 16s (876 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
162 packages can be upgraded. Run 'apt list --upgradable' to see them.
[info]: 安装 hassio 必要依赖.....
Reading package lists... Done
Building dependency tree
Reading state information... Done
avahi-daemon is already the newest version (0.7-4+b1).
curl is already the newest version (7.64.0-4).
net-tools is already the newest version (1.60+git20180626.aebd88e-1).
The following additional packages will be installed:
dns-root-data dnsmasq-base libjq1 libmbim-glib4 libmbim-proxy libmm-glib0
libndp0 libnm0 libonig5 libpcap0.8 libqmi-glib5 libqmi-proxy libteamdctl0
modemmanager ppp
Suggested packages:
libteam-utils
The following NEW packages will be installed:
dns-root-data dnsmasq-base jq libjq1 libmbim-glib4 libmbim-proxy libmm-glib0
libndp0 libnm0 libonig5 libpcap0.8 libqmi-glib5 libqmi-proxy libteamdctl0
modemmanager network-manager ppp socat
0 upgraded, 18 newly installed, 0 to remove and 162 not upgraded.
Need to get 6,875 kB of archives.
After this operation, 23.8 MB of additional disk space will be used.
Get:1 http://mirrors.ustc.edu.cn/raspbian/raspbian buster/main armhf libmm-glib0 armhf 1.10.0-1 [903 kB]
Get:2 http://mirrors.ustc.edu.cn/raspbian/raspbian buster/main armhf libndp0 armhf 1.6-1 [9,328 B]
Get:3 http://mirrors.ustc.edu.cn/raspbian/raspbian buster/main armhf libnm0 armhf 1.14.6-2+deb10u1 [295 kB]
Get:4 http://mirrors.ustc.edu.cn/raspbian/raspbian buster/main armhf libteamdctl0 armhf 1.28-1 [10.1 kB]
Get:5 http://mirrors.ustc.edu.cn/raspbian/raspbian buster/main armhf network-manager armhf 1.14.6-2+deb10u1 [2,136 kB]
Get:6 http://mirrors.ustc.edu.cn/raspbian/raspbian buster/main armhf dns-root-data all 2019031302 [5,396 B]
Get:7 http://mirrors.ustc.edu.cn/archive.raspberrypi.org/debian buster/main armhf dnsmasq-base armhf 2.80-1+rpt1 [400 kB]
Get:8 http://mirrors.ustc.edu.cn/raspbian/raspbian buster/main armhf libonig5 armhf 6.9.1-1 [150 kB]
Get:9 http://mirrors.ustc.edu.cn/raspbian/raspbian buster/main armhf libjq1 armhf 1.5+dfsg-2+b1 [119 kB]
Get:10 http://mirrors.ustc.edu.cn/raspbian/raspbian buster/main armhf jq armhf 1.5+dfsg-2+b1 [59.3 kB]
Get:11 http://mirrors.ustc.edu.cn/raspbian/raspbian buster/main armhf libmbim-glib4 armhf 1.18.0-1 [142 kB]
Get:12 http://mirrors.ustc.edu.cn/raspbian/raspbian buster/main armhf libmbim-proxy armhf 1.18.0-1 [70.7 kB]
Get:13 http://mirrors.ustc.edu.cn/raspbian/raspbian buster/main armhf libpcap0.8 armhf 1.8.1-6 [124 kB]
Get:14 http://mirrors.ustc.edu.cn/raspbian/raspbian buster/main armhf libqmi-glib5 armhf 1.22.0-1.2 [443 kB]
Get:15 http://mirrors.ustc.edu.cn/raspbian/raspbian buster/main armhf libqmi-proxy armhf 1.22.0-1.2 [9,032 B]
Get:16 http://mirrors.ustc.edu.cn/raspbian/raspbian buster/main armhf modemmanager armhf 1.10.0-1 [1,363 kB]
Get:17 http://mirrors.ustc.edu.cn/raspbian/raspbian buster/main armhf ppp armhf 2.4.7-2+4.1 [312 kB]
Get:18 http://mirrors.ustc.edu.cn/raspbian/raspbian buster/main armhf socat armhf 1.7.3.2-2 [324 kB]
Fetched 6,875 kB in 24s (282 kB/s)
Selecting previously unselected package libmm-glib0:armhf.
(Reading database ... 93828 files and directories currently installed.)
Preparing to unpack .../00-libmm-glib0_1.10.0-1_armhf.deb ...
Unpacking libmm-glib0:armhf (1.10.0-1) ...
Selecting previously unselected package libndp0:armhf.
Preparing to unpack .../01-libndp0_1.6-1_armhf.deb ...
Unpacking libndp0:armhf (1.6-1) ...
Selecting previously unselected package libnm0:armhf.
Preparing to unpack .../02-libnm0_1.14.6-2+deb10u1_armhf.deb ...
Unpacking libnm0:armhf (1.14.6-2+deb10u1) ...
Selecting previously unselected package libteamdctl0:armhf.
Preparing to unpack .../03-libteamdctl0_1.28-1_armhf.deb ...
Unpacking libteamdctl0:armhf (1.28-1) ...
Selecting previously unselected package network-manager.
Preparing to unpack .../04-network-manager_1.14.6-2+deb10u1_armhf.deb ...
Unpacking network-manager (1.14.6-2+deb10u1) ...
Selecting previously unselected package dns-root-data.
Preparing to unpack .../05-dns-root-data_2019031302_all.deb ...
Unpacking dns-root-data (2019031302) ...
Selecting previously unselected package dnsmasq-base.
Preparing to unpack .../06-dnsmasq-base_2.80-1+rpt1_armhf.deb ...
Unpacking dnsmasq-base (2.80-1+rpt1) ...
Selecting previously unselected package libonig5:armhf.
Preparing to unpack .../07-libonig5_6.9.1-1_armhf.deb ...
Unpacking libonig5:armhf (6.9.1-1) ...
Selecting previously unselected package libjq1:armhf.
Preparing to unpack .../08-libjq1_1.5+dfsg-2+b1_armhf.deb ...
Unpacking libjq1:armhf (1.5+dfsg-2+b1) ...
Selecting previously unselected package jq.
Preparing to unpack .../09-jq_1.5+dfsg-2+b1_armhf.deb ...
Unpacking jq (1.5+dfsg-2+b1) ...
Selecting previously unselected package libmbim-glib4:armhf.
Preparing to unpack .../10-libmbim-glib4_1.18.0-1_armhf.deb ...
Unpacking libmbim-glib4:armhf (1.18.0-1) ...
Selecting previously unselected package libmbim-proxy.
Preparing to unpack .../11-libmbim-proxy_1.18.0-1_armhf.deb ...
Unpacking libmbim-proxy (1.18.0-1) ...
Selecting previously unselected package libpcap0.8:armhf.
Preparing to unpack .../12-libpcap0.8_1.8.1-6_armhf.deb ...
Unpacking libpcap0.8:armhf (1.8.1-6) ...
Selecting previously unselected package libqmi-glib5:armhf.
Preparing to unpack .../13-libqmi-glib5_1.22.0-1.2_armhf.deb ...
Unpacking libqmi-glib5:armhf (1.22.0-1.2) ...
Selecting previously unselected package libqmi-proxy.
Preparing to unpack .../14-libqmi-proxy_1.22.0-1.2_armhf.deb ...
Unpacking libqmi-proxy (1.22.0-1.2) ...
Selecting previously unselected package modemmanager.
Preparing to unpack .../15-modemmanager_1.10.0-1_armhf.deb ...
Unpacking modemmanager (1.10.0-1) ...
Selecting previously unselected package ppp.
Preparing to unpack .../16-ppp_2.4.7-2+4.1_armhf.deb ...
Unpacking ppp (2.4.7-2+4.1) ...
Selecting previously unselected package socat.
Preparing to unpack .../17-socat_1.7.3.2-2_armhf.deb ...
Unpacking socat (1.7.3.2-2) ...
Setting up dnsmasq-base (2.80-1+rpt1) ...
Setting up dns-root-data (2019031302) ...
Setting up libpcap0.8:armhf (1.8.1-6) ...
Setting up libteamdctl0:armhf (1.28-1) ...
Setting up socat (1.7.3.2-2) ...
Setting up libnm0:armhf (1.14.6-2+deb10u1) ...
Setting up ppp (2.4.7-2+4.1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/pppd-dns.service → /lib/systemd/system/pppd-dns.service.
Setting up libmm-glib0:armhf (1.10.0-1) ...
Setting up libndp0:armhf (1.6-1) ...
Setting up libonig5:armhf (6.9.1-1) ...
Setting up libmbim-glib4:armhf (1.18.0-1) ...
Setting up libjq1:armhf (1.5+dfsg-2+b1) ...
Setting up network-manager (1.14.6-2+deb10u1) ...
Created symlink /etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service → /lib/systemd/system/NetworkManager-dispatcher.service.
Created symlink /etc/systemd/system/network-online.target.wants/NetworkManager-wait-online.service → /lib/systemd/system/NetworkManager-wait-online.service.
Created symlink /etc/systemd/system/multi-user.target.wants/NetworkManager.service → /lib/systemd/system/NetworkManager.service.
Setting up libmbim-proxy (1.18.0-1) ...
Setting up jq (1.5+dfsg-2+b1) ...
Setting up libqmi-glib5:armhf (1.22.0-1.2) ...
Setting up libqmi-proxy (1.22.0-1.2) ...
Setting up modemmanager (1.10.0-1) ...
Created symlink /etc/systemd/system/dbus-org.freedesktop.ModemManager1.service → /lib/systemd/system/ModemManager.service.
Created symlink /etc/systemd/system/multi-user.target.wants/ModemManager.service → /lib/systemd/system/ModemManager.service.
Processing triggers for libc-bin (2.28-10+rpi1) ...
Processing triggers for systemd (241-7~deb10u1+rpi1) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for dbus (1.12.16-1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
[info]: 安装 Docker 引擎.....
# Executing docker install script, commit:
+ sh -c apt-get update -qq >/dev/null
+ sh -c DEBIAN_FRONTEND=noninteractive apt-get install -y -qq apt-transport-https ca-certificates curl >/dev/null
+ sh -c curl -fsSL "https://mirror.azure.cn/docker-ce/linux/raspbian/gpg" | apt-key add -qq - >/dev/null
Warning: apt-key output should not be parsed (stdout is not a terminal)
+ sh -c echo "deb [arch=armhf] https://mirror.azure.cn/docker-ce/linux/raspbian buster stable" > /etc/apt/sources.list.d/docker.list
+ sh -c apt-get update -qq >/dev/null
+ [ -n ]
+ sh -c apt-get install -y -qq --no-install-recommends docker-ce >/dev/null
+ sh -c docker version
Client: Docker Engine - Community
Version: 19.03.5
API version: 1.40
Go version: go1.12.12
Git commit: 633a0ea
Built: Wed Nov 13 07:37:22 2019
OS/Arch: linux/arm
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 19.03.5
API version: 1.40 (minimum version 1.12)
Go version: go1.12.12
Git commit: 633a0ea
Built: Wed Nov 13 07:31:17 2019
OS/Arch: linux/arm
Experimental: false
containerd:
Version: 1.2.10
GitCommit: b34a5c8af56e510852c35414db4c1f4fa6172339
runc:
Version: 1.0.0-rc8+dev
GitCommit: 3e425f80a8c931f88e6d94a8c831b9d5aa481657
docker-init:
Version: 0.18.0
GitCommit: fec3683
If you would like to use Docker as a non-root user, you should now consider
adding your user to the "docker" group with something like:
sudo usermod -aG docker your-user
Remember that you will have to log out and back in for this to take effect!
WARNING: Adding a user to the "docker" group will grant the ability to run
containers which can be used to obtain root privileges on the
docker host.
Refer to https://docs.docker.com/engine/security/security/#docker-daemon-attack-surface
for more information.
[info]: Docker 安装成功。
添加用户 pi 到 Docker 用户组
[info]: 切换 Docker 源为国内源....
[info]: 切换国内源完成
[info]: 安装 hassio......
从 hub.docker.com 下载 homeassistant/raspberrypi3-homeassistant:0.103.2......
0.103.2: Pulling from homeassistant/raspberrypi3-homeassistant
99fc70ac0b64: Pulling fs layer
aec953dd8e16: Pull complete
59df732c8e57: Pull complete
396a3e490fc6: Pull complete
e1a17232b5c5: Pull complete
8b8f90109ec2: Pull complete
b056657a84b1: Pull complete
9d61926d09b5: Pull complete
f199daa580f5: Pull complete
21b6758ba9f6: Pull complete
da2d3c955052: Pull complete
1d6d476cf1b7: Pull complete
d53bb60e6eba: Pull complete
8689bd5a4f6b: Pull complete
f38ea3a2c831: Pull complete
34366b8d06e0: Pull complete
70172c9a3f46: Pull complete
9f2336fd93dd: Pull complete
393f6756c431: Pull complete
a2c910b25578: Pull complete
bbb369aa1837: Pull complete
c300d8008397: Pull complete
9b42a5a9444e: Pull complete
07913444dc54: Pull complete
Digest: sha256:64953d9472ca146459df94a42abd7a6795cb6d01b1c899858c927c7a0c2558bb
Status: Downloaded newer image for homeassistant/raspberrypi3-homeassistant:0.103.2
docker.io/homeassistant/raspberrypi3-homeassistant:0.103.2
开始 hassio 安装流程。(如出现 [Warning] 请忽略,无须理会)
[Warning] No AppArmor support on host.
ModemManager.service enabled
[Warning] ModemManager service is enabled. This might cause issue when using serial devices.
[Info] Install supervisor Docker container
[Info] Install supervisor startup scripts
################# 发到论坛时,请把上方日志也一并粘贴发送 ################
########################### System version ###########################
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 10 (buster)
Release: 10
Codename: buster
########################### System version 2 ###########################
Linux version 4.19.75-v7+ (dom@buildbot) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611)) #1270 SMP Tue Sep 24 18:45:11 BST 2019
########################### System info ###########################
Linux raspberrypi 4.19.75-v7+ #1270 SMP Tue Sep 24 18:45:11 BST 2019 armv7l GNU/Linux
########################### END ###########################
安装 hassio 失败,请将上方安装信息发送到论坛询问。脚本退出...
|