环境配置文件:/etc/profile
重新读取环境配置文件:source /etc/profile
java环境:
JAVA_HOME=/opt/jdk1.8.0_172
PATH=/opt/jdk1.8.0_172/bin:$PATH
export JAVA_HOME PATH
maven环境:
export M2_HOME=/opt/apache-maven-3.5.4
export PATH=$PATH:$JAVA_HOME/bin:$M2_HOME/bin
环境配置文件:/etc/profile
重新读取环境配置文件:source /etc/profile
java环境:
JAVA_HOME=/opt/jdk1.8.0_172
PATH=/opt/jdk1.8.0_172/bin:$PATH
export JAVA_HOME PATH
maven环境:
export M2_HOME=/opt/apache-maven-3.5.4
export PATH=$PATH:$JAVA_HOME/bin:$M2_HOME/bin