2.1. 环境准备

TogetheROS.Bot目前支持旭日X3派和X86平台的Ubuntu 20.04系统上安装。使用Ubuntu系统通过DEB包安装的方式简单快捷,建议初期体验的用户尽量采用该方式进行安装。

接下来分别介绍旭日X3派和X86平台环境准备详情。

旭日X3派

安装tros.b之前,建议用户将旭日X3派系统镜像升级到最新版本,镜像文件可从资源中心旭日X3派栏目中“旭日X3派系统镜像”链接获取,如果已经安装镜像,可以通过命令sudo apt updatesudo apt upgrade完成升级。

如果系统镜像不选择升级,tros.b安装最新版本命令为:sudo apt updatesudo apt install tros

镜像烧录方法如下:

系统配置

镜像成功烧写后,需要配置旭日X3派IP地址,方便日常使用。登录用户名:root 密码:root。

体验和开发过程中经常需要使用scp/ssh等命令通过IP地址访问旭日X3派,因此这里推荐使用动态配置,配置请参考如下链接:

修改DHCP配置

配置DNS服务

尝试ping百度服务器

root@ubuntu:~# ping www.baidu.com
PING www.a.shifen.com (180.101.49.11) 56(84) bytes of data.
64 bytes from 180.101.49.11 (180.101.49.11): icmp_seq=1 ttl=52 time=4.10 ms
64 bytes from 180.101.49.11 (180.101.49.11): icmp_seq=2 ttl=52 time=4.34 ms
64 bytes from 180.101.49.11 (180.101.49.11): icmp_seq=3 ttl=52 time=4.28 ms
64 bytes from 180.101.49.11 (180.101.49.11): icmp_seq=4 ttl=52 time=4.21 ms
64 bytes from 180.101.49.11 (180.101.49.11): icmp_seq=5 ttl=52 time=4.19 ms
64 bytes from 180.101.49.11 (180.101.49.11): icmp_seq=6 ttl=52 time=4.98 ms
^C
--- www.a.shifen.com ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5008ms
rtt min/avg/max/mdev = 4.100/4.348/4.978/0.291 ms

ping命令正常返回说明互联网访问以及DNS配置均正确

升级系统镜像以及源信息sudo apt update sudo apt upgrade

测试ssh,ssh root@旭日X3派IP地址 这里旭日X3派IP地址为10.64.61.228,因此输入ssh root@10.64.61.228,第一次ssh登陆会有如下提示

 ssh root@10.64.61.241
The authenticity of host '10.64.61.241 (10.64.61.241)' can't be established.
ECDSA key fingerprint is SHA256:5NQuzIkfNYZftPkxrzCugbQs5Gy5CEC5U3Nhtu+sJs8.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes

输入yes回车,输入密码:root,即可正常访问旭日X3派

ssh root@10.64.61.241
The authenticity of host '10.64.61.241 (10.64.61.241)' can't be established.
ECDSA key fingerprint is SHA256:5NQuzIkfNYZftPkxrzCugbQs5Gy5CEC5U3Nhtu+sJs8.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '10.64.61.241' (ECDSA) to the list of known hosts.
root@10.64.61.241's password:
Permission denied, please try again.
root@10.64.61.241's password:
Welcome to Ubuntu 20.04.4 LTS (GNU/Linux 4.14.87 aarch64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage
Last login: Sat Apr  2 05:57:05 2022 from 10.64.37.219
root@ubuntu:~#

X86平台

使用X86平台物理机安装Ubuntu 20.04 64位系统,并配置好网络环境。也可使用虚拟机安装或docker,但是运行效率可能会较低。