Difference between revisions of "Template:OfficialUbuntuCore/zh"
From FriendlyELEC WiKi
(updated by API) |
(updated by API) |
||
Line 46: | Line 46: | ||
<!-- Build kernel header --> | <!-- Build kernel header --> | ||
{{#switch: {{{1}}} | {{#switch: {{{1}}} | ||
− | | NanoPi-R4S | + | | NanoPi-R4S = |
===编译内核头文件安装包=== | ===编译内核头文件安装包=== | ||
请参考 https://github.com/friendlyarm/sd-fuse_rk3399/blob/kernel-5.10.y/test/test-build-kernel-header-deb.sh <br /> | 请参考 https://github.com/friendlyarm/sd-fuse_rk3399/blob/kernel-5.10.y/test/test-build-kernel-header-deb.sh <br /> | ||
Line 61: | Line 61: | ||
| NanoPi-R2C = | | NanoPi-R2C = | ||
===配置状态灯=== | ===配置状态灯=== | ||
− | + | 下面的脚本代码将状态灯与网卡相关联, 需要加入到开机自动运行的脚本中:<br /> | |
− | + | <syntaxhighlight lang="bash"> | |
echo netdev > /sys/class/leds/wan_led/trigger | echo netdev > /sys/class/leds/wan_led/trigger | ||
echo eth0 > /sys/class/leds/wan_led/device_name | echo eth0 > /sys/class/leds/wan_led/device_name |
Revision as of 09:36, 18 November 2021
1 FriendlyCore的使用
1.1 FriendlyCore默认帐户
- 普通用户:
用户名: pi 密码: pi
- Root用户:
用户名: Root用户: 密码: fa
1.2 更新软件包
$ sudo apt-get update
1.3 配置网络
默认已将 eth0 配置成 dhcp 自动获取IP地址,要更改配置,可以修改这个文件:
vi /etc/network/interfaces.d/eth0
比如修改成静态IP地址,如下所示:
auto eth0 iface eth0 inet static address 192.168.1.231 netmask 255.255.255.0 gateway 192.168.1.1
还需要修改如下文件加入DNS的配置:
vi /etc/systemd/resolved.conf
例如设置为192.168.1.1:
[Resolve] DNS=192.168.1.1
再用以下命令重新启动systemd-resolved服务:
sudo systemctl restart systemd-resolved.service sudo systemctl enable systemd-resolved.service
要配置另一个网口 eth1,可以在 /etc/network/interfaces.d/ 下新增一个 eth1 文件,配置格式可以参考 eth0。
1.4 安装内核头文件
sudo dpkg -i /opt/linux-headers-*.deb