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
相关推荐
小江村儿的文杰7 小时前
XCode Build时遇到 .entitlements could not be opened 的问题
ide·macos·ue4·xcode
天涯倦客的美丽人生10 小时前
2024年11月最新 Alfred 5 Powerpack (MACOS)下载
macos
SoraLuna10 小时前
「Mac玩转仓颉内测版24」基础篇4 - 浮点类型详解
开发语言·算法·macos·cangjie
总爱写点小BUG11 小时前
VM虚拟机装MAC后无法联网,如何解决?
macos
Cod_Next17 小时前
Mac系统下配置 Tomcat 运行环境
java·macos·tomcat
ZVAyIVqt0UFji19 小时前
iOS屏幕共享技术实践
macos·ios·objective-c·cocoa
Zhijun.li@Studio1 天前
Mac下的vscode远程ssh免密码登录
vscode·macos·ssh
SoraLuna1 天前
「Mac玩转仓颉内测版25」基础篇5 - 布尔类型详解
开发语言·算法·macos·cangjie
黑色叉腰丶大魔王2 天前
《macOS 开发环境配置与应用开发》
macos
Enougme2 天前
mac安装appuim
macos·appium