1、开启ssh、VNC服务
这里都用可视化配置
1、1 开启vnc服务
sudo raspi-config
1、2 开启ssh服务
在这里插入代码片
2、树莓派换源
2、1 查看树莓派架构:
lsb_release -a
uname -m 查看系统架构
打开清华源
https://mirrors.tuna.tsinghua.edu.cn/
网站教程
2、2 镜像源配置
vim /etc/apt/sources.list
打开配置文件,复制进去这个代码
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmwaredeb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmwaredeb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware# 以下安全更新软件源包含了官方源与镜像站配置,如有需要可自行修改注释切换
deb https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
deb-src https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
3、软件更新,下载必要
sudo apt-get update
sudo apt-get upgrade
3、1下载安装pycharm
https://wenku.csdn.net/answer/6swio4163x
wget https://download.jetbrains.com/python/pycharm-community-2021.1.3.tar.gz
#下载
tar -xvf pycharm-community-2021.1.3.tar.gz
#解压
cd pycharm-community-2021.1.3
sudo ./bin/pycharm.sh
#安装
3、2 下载jdk
sudo apt install default-jdk
java -version
#查看版本
sudo apt install openjdk-8-jdk
#jdk8
卸载jdk:
#删除于jdk-8相关的所有包,如果不知道openjdk几可以按tab会自动补全
sudo apt remove openjdk-8*
3.3 环境配置
sudo apt-get install gedit
gedit /home/week/.bash_profileexport JAVA_HOME=/home/week/downloads/jdk-23.0.1
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
source /home/week/.bash_profiletar -zxvf 文件名
#压缩命令