|
发表于 2019-6-9 08:38:42
|
显示全部楼层
ubuntu@VM-15-146-ubuntu:~$ sudo curl -sL -o install.sh https://raw.githubusercontent.co ... l/master/install.sh
ubuntu@VM-15-146-ubuntu:~$ sudo chmod a+x install.sh
ubuntu@VM-15-146-ubuntu:~$ sudo ./install.sh
(1). 鏄惁灏嗙郴缁熸簮鍒囨崲涓轰腑绉戝ぇ(USTC)婧愶紙鐩墠鏀寔 Debian Ubuntu Raspbian 涓夋绯荤粺锛
璇疯緭鍏y or n锛堥粯璁yes):^C
ubuntu@VM-15-146-ubuntu:~$ sudo ./install.sh
(1). 是否将系统源切换为中科大(USTC)源(目前支持 Debian Ubuntu Raspbian 三款系统)
请输入 y or n(默认 yes):
(2). 在你系统内找到 ubuntu 用户,是否将其添加至 docker 用户组。
请输入 yes 或者 no (默认 yes):
将ubuntu用户添加至 docker 用户组。
(3).是否需要替换 docker 默认源?
请输入 yes 或者 no(默认:yes):
1. docker-cn (docker 官方中国镜像源,阿里云提供服务,但流量大可能会卡)
2. 七牛云 docker 镜像源
请选择 docker 加速器(默认:七牛云):
(4).请选择你设备类型(默认:qemux86-64)
[1]: raspberrypi3-64
[2]: qemuarm-64
[3]: qemux86-64
输入数字 (1-3):
你选择了 qemux86-64
(5).是否需要设置 hassio 数据保存路径(默认:/usr/share/hassio)
请输入 yes 或 no (默认:no):
hassio 数据路径为默认路径: /usr/share/hassio
################################################################################
# 1. 是否将系统源切换为中科大(USTC)源: 是
# 2. 是否将用户添加至 Docker 用户组: 是,添加用户为 ubuntu
# 3. 是否将 Docker 源切换至国内源: 是,切换源选择:七牛云
# 4. 您的设备类型为: qemux86-64
# 5. 您的 hassio 数据路径为: /usr/share/hassio
################################################################################
请确认以上信息,继续请按任意键,如需修改请输入 Ctrl+C 结束任务重新执行脚本。
[info]: 切换系统网络源.....
备份系统源文件为 /etc/apt/sources.list.bak
Get:1 http://mirrors.ustc.edu.cn/ubuntu bionic InRelease [242 kB]
Get:2 http://mirrors.ustc.edu.cn/ubuntu bionic-security InRelease [88.7 kB]
Get:3 http://mirrors.ustc.edu.cn/ubuntu bionic-updates InRelease [88.7 kB]
Get:4 http://mirrors.ustc.edu.cn/ubuntu bionic-backports InRelease [74.6 kB]
Get:5 http://mirrors.ustc.edu.cn/ubuntu bionic/universe Sources [9,051 kB]
Get:6 http://mirrors.ustc.edu.cn/ubuntu bionic/restricted Sources [5,324 B]
Get:7 http://mirrors.ustc.edu.cn/ubuntu bionic/multiverse Sources [181 kB]
Get:8 http://mirrors.ustc.edu.cn/ubuntu bionic/main Sources [829 kB]
Get:9 http://mirrors.ustc.edu.cn/ubuntu bionic/main amd64 Packages [1,019 kB]
Get:10 http://mirrors.ustc.edu.cn/ubuntu bionic/main i386 Packages [1,007 kB]
Get:11 http://mirrors.ustc.edu.cn/ubuntu bionic/main Translation-en [516 kB]
Get:12 http://mirrors.ustc.edu.cn/ubuntu bionic/restricted i386 Packages [9,156 B]
Get:13 http://mirrors.ustc.edu.cn/ubuntu bionic/restricted amd64 Packages [9,184 B]
Get:14 http://mirrors.ustc.edu.cn/ubuntu bionic/restricted Translation-en [3,584 B]
Get:15 http://mirrors.ustc.edu.cn/ubuntu bionic/universe i386 Packages [8,531 kB]
Get:16 http://mirrors.ustc.edu.cn/ubuntu bionic/universe amd64 Packages [8,570 kB]
Get:17 http://mirrors.ustc.edu.cn/ubuntu bionic/universe Translation-en [4,941 kB]
Get:18 http://mirrors.ustc.edu.cn/ubuntu bionic/multiverse i386 Packages [144 kB]
Get:19 http://mirrors.ustc.edu.cn/ubuntu bionic/multiverse amd64 Packages [151 kB]
Get:20 http://mirrors.ustc.edu.cn/ubuntu bionic/multiverse Translation-en [108 kB]
Get:21 http://mirrors.ustc.edu.cn/ubuntu bionic-security/multiverse Sources [2,744 B]
Get:22 http://mirrors.ustc.edu.cn/ubuntu bionic-security/main Sources [96.3 kB]
Get:23 http://mirrors.ustc.edu.cn/ubuntu bionic-security/restricted Sources [1,504 B]
Get:24 http://mirrors.ustc.edu.cn/ubuntu bionic-security/universe Sources [130 kB]
Get:25 http://mirrors.ustc.edu.cn/ubuntu bionic-security/main amd64 Packages [380 kB]
Get:26 http://mirrors.ustc.edu.cn/ubuntu bionic-security/main i386 Packages [287 kB]
Get:27 http://mirrors.ustc.edu.cn/ubuntu bionic-security/main Translation-en [135 kB]
Get:28 http://mirrors.ustc.edu.cn/ubuntu bionic-security/restricted i386 Packages [4,280 B]
Get:29 http://mirrors.ustc.edu.cn/ubuntu bionic-security/restricted amd64 Packages [4,296 B]
Get:30 http://mirrors.ustc.edu.cn/ubuntu bionic-security/restricted Translation-en [2,192 B]
Get:31 http://mirrors.ustc.edu.cn/ubuntu bionic-security/universe i386 Packages [252 kB]
Get:32 http://mirrors.ustc.edu.cn/ubuntu bionic-security/universe amd64 Packages [257 kB]
Get:33 http://mirrors.ustc.edu.cn/ubuntu bionic-security/universe Translation-en [144 kB]
Get:34 http://mirrors.ustc.edu.cn/ubuntu bionic-security/multiverse i386 Packages [4,152 B]
Get:35 http://mirrors.ustc.edu.cn/ubuntu bionic-security/multiverse amd64 Packages [4,004 B]
Get:36 http://mirrors.ustc.edu.cn/ubuntu bionic-security/multiverse Translation-en [2,060 B]
Get:37 http://mirrors.ustc.edu.cn/ubuntu bionic-updates/multiverse Sources [4,612 B]
Get:38 http://mirrors.ustc.edu.cn/ubuntu bionic-updates/restricted Sources [2,068 B]
Get:39 http://mirrors.ustc.edu.cn/ubuntu bionic-updates/main Sources [274 kB]
Get:40 http://mirrors.ustc.edu.cn/ubuntu bionic-updates/universe Sources [243 kB]
Get:41 http://mirrors.ustc.edu.cn/ubuntu bionic-updates/main i386 Packages [530 kB]
Get:42 http://mirrors.ustc.edu.cn/ubuntu bionic-updates/main amd64 Packages [638 kB]
Get:43 http://mirrors.ustc.edu.cn/ubuntu bionic-updates/main Translation-en [235 kB]
Get:44 http://mirrors.ustc.edu.cn/ubuntu bionic-updates/restricted amd64 Packages [6,996 B]
Get:45 http://mirrors.ustc.edu.cn/ubuntu bionic-updates/restricted i386 Packages [6,960 B]
Get:46 http://mirrors.ustc.edu.cn/ubuntu bionic-updates/restricted Translation-en [3,076 B]
Get:47 http://mirrors.ustc.edu.cn/ubuntu bionic-updates/universe amd64 Packages [948 kB]
Get:48 http://mirrors.ustc.edu.cn/ubuntu bionic-updates/universe i386 Packages [935 kB]
Get:49 http://mirrors.ustc.edu.cn/ubuntu bionic-updates/universe Translation-en [280 kB]
Get:50 http://mirrors.ustc.edu.cn/ubuntu bionic-updates/multiverse i386 Packages [6,788 B]
Get:51 http://mirrors.ustc.edu.cn/ubuntu bionic-updates/multiverse amd64 Packages [6,644 B]
Get:52 http://mirrors.ustc.edu.cn/ubuntu bionic-updates/multiverse Translation-en [3,556 B]
Get:53 http://mirrors.ustc.edu.cn/ubuntu bionic-backports/main Sources [2,532 B]
Get:54 http://mirrors.ustc.edu.cn/ubuntu bionic-backports/universe Sources [2,060 B]
Get:55 http://mirrors.ustc.edu.cn/ubuntu bionic-backports/main i386 Packages [2,516 B]
Get:56 http://mirrors.ustc.edu.cn/ubuntu bionic-backports/main amd64 Packages [2,512 B]
Get:57 http://mirrors.ustc.edu.cn/ubuntu bionic-backports/main Translation-en [1,644 B]
Get:58 http://mirrors.ustc.edu.cn/ubuntu bionic-backports/universe amd64 Packages [3,712 B]
Get:59 http://mirrors.ustc.edu.cn/ubuntu bionic-backports/universe i386 Packages [3,716 B]
Get:60 http://mirrors.ustc.edu.cn/ubuntu bionic-backports/universe Translation-en [1,696 B]
Fetched 41.4 MB in 16s (2,643 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
242 packages can be upgraded. Run 'apt list --upgradable' to see them.
[info]: 安装 hassio 必要依赖.....
Reading package lists... Done
Building dependency tree
Reading state information... Done
net-tools is already the newest version (1.60+git20161116.90da8a0-1ubuntu1).
The following additional packages will be installed:
libavahi-common-data libavahi-common3 libavahi-core7 libcurl4 libdaemon0 libjq1 libnss-mdns libonig4
Suggested packages:
avahi-autoipd avahi-autoipd | zeroconf
The following NEW packages will be installed:
avahi-daemon jq libavahi-common-data libavahi-common3 libavahi-core7 libdaemon0 libjq1 libnss-mdns libonig4 socat
The following packages will be upgraded:
curl libcurl4
2 upgraded, 10 newly installed, 0 to remove and 240 not upgraded.
Need to get 1,215 kB of archives.
After this operation, 2,926 kB of additional disk space will be used.
Get:1 http://mirrors.ustc.edu.cn/ubuntu bionic/main amd64 libdaemon0 amd64 0.14-6 [16.6 kB]
Get:2 http://mirrors.ustc.edu.cn/ubuntu bionic-security/main amd64 libavahi-common-data amd64 0.7-3.1ubuntu1.2 [22.1 kB]
Get:3 http://mirrors.ustc.edu.cn/ubuntu bionic-security/main amd64 libavahi-common3 amd64 0.7-3.1ubuntu1.2 [21.6 kB]
Get:4 http://mirrors.ustc.edu.cn/ubuntu bionic-security/main amd64 libavahi-core7 amd64 0.7-3.1ubuntu1.2 [81.1 kB]
Get:5 http://mirrors.ustc.edu.cn/ubuntu bionic-security/main amd64 avahi-daemon amd64 0.7-3.1ubuntu1.2 [62.3 kB]
Get:6 http://mirrors.ustc.edu.cn/ubuntu bionic-security/main amd64 curl amd64 7.58.0-2ubuntu3.7 [159 kB]
Get:7 http://mirrors.ustc.edu.cn/ubuntu bionic-security/main amd64 libcurl4 amd64 7.58.0-2ubuntu3.7 [214 kB]
Get:8 http://mirrors.ustc.edu.cn/ubuntu bionic/universe amd64 libonig4 amd64 6.7.0-1 [119 kB]
Get:9 http://mirrors.ustc.edu.cn/ubuntu bionic/universe amd64 libjq1 amd64 1.5+dfsg-2 [111 kB]
Get:10 http://mirrors.ustc.edu.cn/ubuntu bionic/universe amd64 jq amd64 1.5+dfsg-2 [45.6 kB]
Get:11 http://mirrors.ustc.edu.cn/ubuntu bionic/main amd64 libnss-mdns amd64 0.10-8ubuntu1 [21.2 kB]
Get:12 http://mirrors.ustc.edu.cn/ubuntu bionic/main amd64 socat amd64 1.7.3.2-2ubuntu2 [342 kB]
Fetched 1,215 kB in 3s (417 kB/s)
Selecting previously unselected package libdaemon0:amd64.
(Reading database ... 74013 files and directories currently installed.)
Preparing to unpack .../00-libdaemon0_0.14-6_amd64.deb ...
Unpacking libdaemon0:amd64 (0.14-6) ...
Selecting previously unselected package libavahi-common-data:amd64.
Preparing to unpack .../01-libavahi-common-data_0.7-3.1ubuntu1.2_amd64.deb ...
Unpacking libavahi-common-data:amd64 (0.7-3.1ubuntu1.2) ...
Selecting previously unselected package libavahi-common3:amd64.
Preparing to unpack .../02-libavahi-common3_0.7-3.1ubuntu1.2_amd64.deb ...
Unpacking libavahi-common3:amd64 (0.7-3.1ubuntu1.2) ...
Selecting previously unselected package libavahi-core7:amd64.
Preparing to unpack .../03-libavahi-core7_0.7-3.1ubuntu1.2_amd64.deb ...
Unpacking libavahi-core7:amd64 (0.7-3.1ubuntu1.2) ...
Selecting previously unselected package avahi-daemon.
Preparing to unpack .../04-avahi-daemon_0.7-3.1ubuntu1.2_amd64.deb ...
Unpacking avahi-daemon (0.7-3.1ubuntu1.2) ...
Preparing to unpack .../05-curl_7.58.0-2ubuntu3.7_amd64.deb ...
Unpacking curl (7.58.0-2ubuntu3.7) over (7.58.0-2ubuntu3.2) ...
Preparing to unpack .../06-libcurl4_7.58.0-2ubuntu3.7_amd64.deb ...
Unpacking libcurl4:amd64 (7.58.0-2ubuntu3.7) over (7.58.0-2ubuntu3.2) ...
Selecting previously unselected package libonig4:amd64.
Preparing to unpack .../07-libonig4_6.7.0-1_amd64.deb ...
Unpacking libonig4:amd64 (6.7.0-1) ...
Selecting previously unselected package libjq1:amd64.
Preparing to unpack .../08-libjq1_1.5+dfsg-2_amd64.deb ...
Unpacking libjq1:amd64 (1.5+dfsg-2) ...
Selecting previously unselected package jq.
Preparing to unpack .../09-jq_1.5+dfsg-2_amd64.deb ...
Unpacking jq (1.5+dfsg-2) ...
Selecting previously unselected package libnss-mdns:amd64.
Preparing to unpack .../10-libnss-mdns_0.10-8ubuntu1_amd64.deb ...
Unpacking libnss-mdns:amd64 (0.10-8ubuntu1) ...
Selecting previously unselected package socat.
Preparing to unpack .../11-socat_1.7.3.2-2ubuntu2_amd64.deb ...
Unpacking socat (1.7.3.2-2ubuntu2) ...
Setting up libdaemon0:amd64 (0.14-6) ...
Processing triggers for ureadahead (0.100.0-20) ...
Setting up socat (1.7.3.2-2ubuntu2) ...
Setting up libonig4:amd64 (6.7.0-1) ...
Setting up libcurl4:amd64 (7.58.0-2ubuntu3.7) ...
Setting up libjq1:amd64 (1.5+dfsg-2) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for systemd (237-3ubuntu10.3) ...
Processing triggers for man-db (2.8.3-2) ...
Processing triggers for dbus (1.12.2-1ubuntu1) ...
Setting up libavahi-common-data:amd64 (0.7-3.1ubuntu1.2) ...
Setting up jq (1.5+dfsg-2) ...
Setting up curl (7.58.0-2ubuntu3.7) ...
Setting up libavahi-common3:amd64 (0.7-3.1ubuntu1.2) ...
Setting up libavahi-core7:amd64 (0.7-3.1ubuntu1.2) ...
Setting up avahi-daemon (0.7-3.1ubuntu1.2) ...
Created symlink /etc/systemd/system/dbus-org.freedesktop.Avahi.service → /lib/systemd/system/avahi-daemon.service.
Created symlink /etc/systemd/system/multi-user.target.wants/avahi-daemon.service → /lib/systemd/system/avahi-daemon.service.
Created symlink /etc/systemd/system/sockets.target.wants/avahi-daemon.socket → /lib/systemd/system/avahi-daemon.socket.
Setting up libnss-mdns:amd64 (0.10-8ubuntu1) ...
First installation detected...
Checking NSS setup...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for dbus (1.12.2-1ubuntu1) ...
Processing triggers for ureadahead (0.100.0-20) ...
Processing triggers for systemd (237-3ubuntu10.3) ...
[info]: 安装 Docker 引擎.....
# Executing docker install script, commit: UNKNOWN
+ sh -c apt-get update -qq >/dev/null
+ sh -c apt-get install -y -qq apt-transport-https ca-certificates curl >/dev/null
+ sh -c curl -fsSL "https://mirrors.aliyun.com/docker-ce/linux/ubuntu/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=amd64] https://mirrors.aliyun.com/docker-ce/linux/ubuntu bionic 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:
Version: 18.09.6
API version: 1.39
Go version: go1.10.8
Git commit: 481bc77
Built: Sat May 4 02:35:57 2019
OS/Arch: linux/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 18.09.6
API version: 1.39 (minimum version 1.12)
Go version: go1.10.8
Git commit: 481bc77
Built: Sat May 4 01:59:36 2019
OS/Arch: linux/amd64
Experimental: false
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/s ... emon-attack-surface
for more information.
[info]: Docker 安装成功。
添加用户 ubuntu 到 Docker 用户组
[info]: 切换 Docker 源为国内源....
[info]: 切换国内源完成
[info]: 安装 hassio......
从 hub.docker.com 下载 homeassistant/qemux86-64-homeassistant:0.94.1......
0.94.1: Pulling from homeassistant/qemux86-64-homeassistant
e7c96db7181b: Pull complete
debe2615936a: Pull complete
6aefe54a5c96: Pull complete
4656e5ce698a: Pull complete
aa7964a8c16f: Pull complete
e130ee4f643b: Pull complete
a419e5bd86ac: Pull complete
c63d98b91529: Pull complete
a912a11d3324: Pull complete
3a5f0970947b: Pull complete
ce3cd277e8ca: Pull complete
5a52020bbbf1: Pull complete
7d2c9d812241: Pull complete
fb0adf8a38c5: Pull complete
0425e2c46362: Pull complete
37737e2a747d: Pull complete
371a376d335d: Pull complete
a543bc3e50e6: Pull complete
5daf0ea34d9a: Pull complete
2a3e58321295: Pull complete
18958e19575b: Pull complete
Digest: sha256:628b9c9f71858882a137403edb3cc3f3303494613141bacdadd957f93bd209c1
Status: Downloaded newer image for homeassistant/qemux86-64-homeassistant:0.94.1
开始 hassio 安装流程。(如出现 [Warning] 请忽略,无须理会)
[Warning] No NetworkManager support on host.
[Info] Install supervisor Docker container
[Info] Install supervisor startup scripts
Created symlink /etc/systemd/system/multi-user.target.wants/hassio-supervisor.service → /etc/systemd/system/hassio-supervisor.service.
[Info] Install AppArmor scripts
########################### System version ###########################
Distributor ID: Ubuntu
Description: Ubuntu 18.04.1 LTS
Release: 18.04
Codename: bionic
########################### System version 2 ###########################
Linux version 4.15.0-29-generic (buildd@lgw01-amd64-057) (gcc version 7.3.0 (Ubuntu 7.3.0-16ubuntu3)) #31-Ubuntu SMP Tue Jul 17 15:39:52 UTC 2018
########################### System info ###########################
Linux VM-15-146-ubuntu 4.15.0-29-generic #31-Ubuntu SMP Tue Jul 17 15:39:52 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
########################### END ###########################
安装 hassio 失败,请将上方安装信息发送到论坛询问。脚本退出... |
|