首页 > 其他分享 >Mac开发装机必备

Mac开发装机必备

时间:2022-12-25 19:56:47浏览次数:65  
标签:bin 装机必备 Library maven Mac 开发 3.5 PATH com

  • chrome下载
  • docker、git 下载登陆
https://git-scm.com/download/mac

git config --global user.email [email protected]
git config --global user.name yonglang.chy       
git config --global credential.helper store


# docker config   【sudo vim /etc/profile】
export DOCKER_PATH="/Applications/Docker.app/Contents/Resources/bin"
export PATH=".\$PATH:$DOCKER_PATH"

# docker login
docker login --username=yonglang.chy@1552593593532704 registry.cn-hangzhou.aliyuncs.com
docker login --username=yonglang.chy reg.docker.alibaba-inc.com
  • idea下载
  • 设置mac root密码
sudo su
  • Java jdk下载

官方地址:https://www.oracle.com/java/technologies/downloads/#java8-mac

wget -c https://repo.huaweicloud.com/java/jdk/8u181-b13/jdk-8u181-macosx-x64.dmg

#vim  /etc/profile

JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk1.8.0_351.jdk/Contents/Home"
export JAVA_HOME
CLASS_PATH="$JAVA_HOME/lib"
PATH=".$PATH:$JAVA_HOME/bin"
  • tools.jarz找不到
cp /Library/Java/JavaVirtualMachines/jdk1.8.0_351.jdk/Contents/Home/lib/tools.jar /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/tools.jar
  • sublime text
  • 命令行工具下载
  • wget
brew install wget
  • brew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  • maven
下载 Maven 3.5.4 压缩包:
https://archive.apache.org/dist/maven/maven-3/3.5.4/binaries/apache-maven-3.5.4-bin.tar.gz

解压 maven 安装包 到目录 /Library 下
sudo tar -zxvf apache-maven-3.5.4-bin.tar.gz -C /Library

配置 maven 环境变量
vim ~/.bash_profile
最后面添加如下内容:
export M2_HOME=/Library/apache-maven-3.5.4 
export PATH=$PATH:$M2_HOME/bin

是配置生效:
source ~/.bash-profile

修改权限 
chmod a+x /Library/apache-maven-3.5.4/bin/mvn
查看是否安装成功
mvn -v

创建本地仓库文件夹【/Users/yonglang/Repository】并在idea中配置
  • idea 、pycharm community
  • vs code

 

标签:bin,装机必备,Library,maven,Mac,开发,3.5,PATH,com
From: https://www.cnblogs.com/chihaoyuIsnotHere/p/17004473.html

相关文章