1、 touch ~/.bash_profile 创建一个文件
2、vim ~/.bash_profile
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home
export JAVA_HOME
export CLASSPATH=.:$JAVA_HOME
export PATH=$PATH:$JAVA_HOME/bin:$JAVA_HOME/jre/bin
export CLASSPATH=.:$JAVA_HOME/lib:$CLASSPATH
M3_HOME=/Users/zhangfuxin/zfxTool/apache-maven-3.3.9
PATH=$M3_HOME/bin:$PATH
export M3_HOME
export PATH
HADOOP_HOME=/Users/zhangfuxin/zfxTool/hadoop-2.7.3
PATH=$HADOOP_HOME/bin:$PATH
PATH=$HADOOP_HOME/sbin:$PATH
export HADOOP_HOME
export PATH
3、source ~/.bash_profile
OK 了
时间: 2024-10-05 23:14:32