以下安装配置全部基于
MacBook Pro m1
1、安装jdk
代码语言:javascript复制$ vim ~/.zshrc
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-11.0.16 8/Contents/Home
export JAVA_HOME
export PATH=${PATH}:${JAVA_HOME}/bin
$ source ~/.zshrc
$ java -version
2、配置maven
代码语言:javascript复制$ vim ~/.zshrc
MAVEN_HOME=/Users/xiaozhang/Documents/maven
PATH=$PATH:$MAVEN_HOME/bin
export MAVEN_HOME
$ source ~/.zshrc
$ mvn -v
完整配置
代码语言:javascript复制JAVA_HOME=/Users/xiaozhang/Applications/jdk-11.0.18/Contents/Home
export JAVA_HOME
export PATH=${PATH}:${JAVA_HOME}/bin
MAVEN_HOME=/Users/xiaozhang/Documents/maven
PATH=$PATH:$MAVEN_HOME/bin
export MAVEN_HOME
3、安装git
代码语言:javascript复制$ brew install git
# 安装很慢
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# 替换gitee的安装源
$ /bin/bash -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"