Mac安装开发环境

参考博客

一、Mac安装HomeBrew

先安装HomeBrew,后续安装其他环境,直接通过Homebrew命令安装,省时省力参考此文

Haskell 复制代码
# 安装命令
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"

# 查看是否安装成功
brew --version 

二、HomeBrew安装JDK

参考此文

Haskell 复制代码
# 更新JDK
brew tap AdoptOpenJDK/openjdk

# 安装JDK
brew install adoptopenjdk8

# 切换root用户
sudo -i

# 编辑环境变量(必须以root用户编辑,否则修改不了)
sudo /usr/bin/vim /etc/profile

JAVA_HOME=/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home
CLASS_PATH="$JAVA_HOME/lib"
PATH=".$PATH:$JAVA_HOME/bin"
export PATH=/usr/local/bin:$PATH

# 再切换回普通用户
exit

# 查看用户
whoami

# 查看是否设置成功
java -version

三、HomeBrew安装Git

Haskell 复制代码
# 安装git
brew install git

# 查看是否安装成功
git --version

# git全局配置
git config --global user.name 'jak' 
git config --global user.email 'xxx@qq.com'

# 用户密码登录
用户名:xxx@qq.com
密码:xxx

四、HomeBrew安装maven

Haskell 复制代码
# 安装maven
brew install maven

# 查看是否安装成功
mvn --vserion

# 查看maven目录
brew --prefix maven

# setting目录
/opt/homebrew/Cellar/maven/3.9.7/libexec

五、Mac安装IDEA

官网直接下载最新的IDEA官网,其余参考参考这个

关闭SIP

Haskell 复制代码
# 需要先关闭mac电脑SIP,否则会报错
mac M3 芯片,长按开机键进入恢复模式,实用工具终端里执行

# 关闭
csrutil disable 

# 开启
csrutil enable 

# 执行脚步
sudo bash install.sh

# 执行完脚本以后电脑关机打开idea输入激活码
X9MQ8ML8U7-eyJsaWNlbnNlSWQiOiJYOU1ROE1MOFU3IiwibGljZW5zZWVOYW1lIjoi5YWs5LyX5Y+377ya5a6J5a6J6K+05YmN56uvIiwiYXNzaWduZWVOYW1lIjoi5LuF5L6b5aix5LmQ5rWL6K+V77yM5q2j54mI5om+5YWs5Ly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v6vpcDkBo0XvuQwmZnbpf/Ndpy4ypP2OXIw94TlfOkGKVLdHDQU8ES1HpgAtscFtNg4dyZijF4pLgiK2nbCokvHI3oWQZY3ROswrjsh0HNHWdVKooEhWt3vBpXorusNRNWbwidznxySM5aABbHrlW0+EgXuLMEHBrybLu0QenEuTFZS3E91uSa7JLpU92aQyAmZUJAhogfIvssgwnmyfnOF3csixUV6lDBCf+SUGzQbYtZd/QsGI9uUUhBbLjoZnFhVEbbOntmB4/aUvSziZnbhRAY+OhVTrNX6GtXI03cAxVBk2Kh6DE62vBW3biBGHK5ClsQGW1f5RLWhqJh0d3EP6+dsAo2P3Ic5MCuspFwSfWoK3gNhvYlr57PNrzAWhBn6Od78RMaqg+dl+GHsm5sW5mbvXpvYNukEe1RHVIONl8OTKex1U12DeS4pAIA9aQxd1vYapmNdam3rnOQbynKLYa09aDPrWO5Y+LtaCix7TBmwXPtyCxBLK4S7EZ+FE7Xz322ulpKcvLZCTKBzUH5y62xHIcSijnxJfSU0W5UCApsnwochM5S6RPuVpvyQoBR5IX3Ugjw48jpuf2TGL/INWPHQ5AjK9ZNtWAfpkYc9w+AcNAa/v6J/Ha
相关推荐
梦魇梦狸º13 小时前
mac 配置 python 环境变量
chrome·python·macos
丁总学Java18 小时前
macOS如何进入 Application Support 目录(cd: string not in pwd: Application)
macos
qdprobot18 小时前
Mixly米思齐1.0 2.0 3.0 软件windows版本MAC苹果电脑系统安装使用常见问题与解决
windows·macos
麦克Mapp18 小时前
不用安装双系统,如何在mac上玩windows游戏呢?
macos
符小易18 小时前
Mac苹果电脑 怎么用word文档和Excel表格?
macos·word·excel
梦魇梦狸º1 天前
node安装与管理
macos·node.js
缘友一世1 天前
macOS查看当前项目的 tree 结构
macos
梦魇梦狸º1 天前
mac 安装 python2
python·macos
篮l球场2 天前
mac m1下载maven安装并配置环境变量
macos
YAIMZA2 天前
mac配置 iTerm2 使用lrzsz与服务器传输文件
服务器·macos·lrzsz