参照
https://blog.csdn.net/qq_41946216/article/details/134345137
操作系统版本:ubuntu-server-22.04.3
虚拟机:virtualbox7.0
安装jdk
上传解压
以root用户,将jdk上传至/opt目录下

tar zxvf jdk-8u271-linux-x64.tar.gz

配置环境变量
以root用户,配置环境变量
vi .profile

/opt/jdk1.8.0_271

以root用户,执行source .profle,使更改生效
