树莓派4B
4G内存/16G存储
ARM64

环境 - 图1

基本信息

  1. $ uname -a
  2. Linux Tao-Desktop 5.4.0-1015-raspi #15-Ubuntu SMP Fri Jul 10 05:34:24 UTC 2020 aarch64 aarch64 aarch64 GNU/Linux

设置系统时间

  1. timedatectl set-timezone Asia/Shanghai
  2. root@Tao-Desktop:~# lsb_release -a
  3. No LSB modules are available.
  4. Distributor ID: Ubuntu
  5. Description: Ubuntu 20.04.1 LTS
  6. Release: 20.04
  7. Codename: focal

安装软件

🏷️ 镜像问题

首先查看系统信息

  1. cat /etc/os-release
  2. NAME="Ubuntu"
  3. VERSION="20.04.1 LTS (Focal Fossa)" # Tag
  4. ID=ubuntu
  5. ID_LIKE=debian
  6. PRETTY_NAME="Ubuntu 20.04.1 LTS"
  7. VERSION_ID="20.04"
  8. HOME_URL="https://www.ubuntu.com/"
  9. SUPPORT_URL="https://help.ubuntu.com/"
  10. BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
  11. PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
  12. VERSION_CODENAME=focal # Tag
  13. UBUNTU_CODENAME=focal

https://mirror.tuna.tsinghua.edu.cn/help/ubuntu/

https://mirror.tuna.tsinghua.edu.cn/help/raspbian/
环境 - 图2

默认镜像源

  1. cd /etc/apt/
  2. vi sources.list
  3. deb http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ buster main non-free contrib rpi
  4. deb-src http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ buster main non-free contrib rpi
  5. sudo apt update
  6. sudo apt upgrade

导入公钥

  1. apt-key adv --keyserver keyserver.ubuntu.com --recv 82B129927FA3303E

🏷️ Node

  1. wget https://nodejs.org/dist/v14.17.0/node-v14.17.0-linux-arm64.tar.xz

环境 - 图3
添加软链接

  1. ln -s /YOUR_PATH/nodejs/bin/npm /usr/local/bin/
  2. ln -s /YOUR_PATH/nodejs/bin/node /usr/local/bin/

🏷️ Java

  1. tar -zxvf jdk-8u251-linux-arm32-vfp-hflt.tar.gz
  2. mv jdk1.8.0_291/ jdk8
  3. mv jdk8/ /usr/local/
  4. vim /etc/profile
  1. #jdk
  2. export JAVA_HOME=/usr/local/jdk8/
  3. export PATH=$JAVA_HOME/bin:$PATH
  4. export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar

验证

  1. java -version
  2. java version "1.8.0_291"
  3. Java(TM) SE Runtime Environment (build 1.8.0_291-b10)
  4. Java HotSpot(TM) 64-Bit Server VM (build 25.291-b10, mixed mode)

🏷️ 外接硬盘

Fdisk是linux下管理磁盘的工具,可以对磁盘进行添加,删除,转换等操作

查看一下U盘是否有被识别到

  1. $ fdisk -l
  2. Disk /dev/mmcblk0: 14.86 GiB, 15931539456 bytes, 31116288 sectors
  3. Units: sectors of 1 * 512 = 512 bytes
  4. Sector size (logical/physical): 512 bytes / 512 bytes
  5. I/O size (minimum/optimal): 512 bytes / 512 bytes
  6. Disklabel type: dos
  7. Disk identifier: 0xd3408824
  8. Device Boot Start End Sectors Size Id Type
  9. /dev/mmcblk0p1 * 2048 524287 522240 255M c W95 FAT32 (LBA)
  10. /dev/mmcblk0p2 524288 31116254 30591967 14.6G 83 Linux
  11. Disk /dev/sda: 931.53 GiB, 1000204886016 bytes, 1953525168 sectors
  12. Disk model: PSSD T7
  13. Units: sectors of 1 * 512 = 512 bytes
  14. Sector size (logical/physical): 512 bytes / 512 bytes
  15. I/O size (minimum/optimal): 512 bytes / 33553920 bytes
  16. Disklabel type: dos
  17. Disk identifier: 0x15190fc4
  18. Device Boot Start End Sectors Size Id Type
  19. /dev/sda1 2048 1953522112 1953520065 931.5G 7 HPFS/NTFS/exFAT

网络

VNC

https://www.realvnc.com/en/connect/download/vnc/raspberrypi/

环境 - 图4