linux安装java 下载java8,地址为: https://www.oracle.com/cn/java/technologies/downloads/#java8,下载后缀为tar.gz的解压 tar -zxvf jdk-8u381-linux-x64.tar.gz移动 mv jdk1.8.0_381/ /usr/local/ 环境变量 export JAVA_HOME=/usr/local/jdk1.8.0_381 export PATH= J A V A H O M E / b i n : JAVA_HOME/bin: JAVAHOME/bin:JAVA_HOME:$PATH source /etc/profile生效判断 java -version路径查询 which java linux安装maven 下载地址 https://maven.apache.org/download.cgi 选择后缀 bin.tar.上传解压 tar -zxvf apache-maven-3.6.1-bin.tar.gz环境变量 /etc/profile export MAVEN_HOME=/a-dev/maven/apache-maven-3.6.1 export PATH= J A V A H O M E / b i n : JAVA_HOME/bin: JAVAHOME/bin:MAVEN_HOME/bin:$PATH source /etc/profile判断 mvn -v