Mac(1) 环境配置

Homebrew
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"

在这里插入图片描述

配置加速

1)替换brew.git
cd "$(brew --repo)"

git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git //清华
或
git remote set-url origin https://mirrors.ustc.edu.cn/brew.git //中科大

2)替换homebrew-core.git
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"

git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git //中科大
或
git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git //清华

3)替换homebrew-cask
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-cask"

git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-cask.git

4)替换homebrew-bottles: 
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.bash_profile 
或
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles' >> ~/.bash_profile source ~/.bash_profile 

5)应用生效
brew update -v (查看过程)

镜像复原

# 重置brew.git:
$ cd "$(brew --repo)"
$ git remote set-url origin https://github.com/Homebrew/brew.git

# 重置homebrew-core.git:
$ cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
$ git remote set-url origin https://github.com/Homebrew/homebrew-core.git

问题修复

# 诊断Homebrew的问题:
$ brew doctor

# 重置brew.git设置:
$ cd "$(brew --repo)"
$ git fetch
$ git reset --hard origin/master

# homebrew-core.git同理:
$ cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
$ git fetch
$ git reset --hard origin/master

# 应用生效:
$ brew update
FinalShell

http://www.hostbuf.com/t/988.html

cd /Applications/finalshelldata

curl -o finalshell_install.sh www.hostbuf.com/downloads/finalshell_install.sh;chmod +x finalshell_install.sh;sudo ./finalshell_install.sh
Termius

https://www.macwk.com/soft/termius

wget
brew install wget
ohmyzsh

https://github.com/ohmyzsh/ohmyzsh

https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh

mkdir -p ohmyzsh
touch install.sh
# 编写下载好的脚本内容到此文件
vim install.sh
# 安装
sh install.sh
# 修改zsh配置
vim ~/.zshrc

# 需修改的配置主要如下: -----------------------------------
ZSH_THEME="ys"

# 自动更新
DISABLE_UPDATE_PROMPT=true

# 【多个插件用空格分开】        
plugins=(
  git       # 默认开启的插件,提供了大量 git 的alias
  z         # z命令快速跳转目录,会记忆你曾经进入过的目录,用模糊匹配快速进入你想要的目录
  # zsh-autosuggestions # 历史命令记录
  extract   # x命令解压一切文件  ex: x test.zip
  web-search # 可在命令行中使用搜索引擎进行搜索  ex: 【 `baidu 郑清it`  或 `google 郑清it` 】
  last-working-dir         # 下次进入终端时定位到上次打开的目录下
  zsh-syntax-highlighting  # 一个类似 fish 的命令高亮插件
)
# ------------------------------------------------------

# 如果zsh提示如下:
[oh-my-zsh] plugin 'zsh-autosuggestions' not found
[oh-my-zsh] plugin 'zsh-syntax-highlighting' not found
# 则执行如下命令:
# 进入oh-my-zsh自定义插件目录
cd ~/.oh-my-zsh/custom/plugins
git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git
# 在配置文件最后加上source...
echo "source ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc

# 更新配置:
source ~/.zshrc
Docker

https://www.runoob.com/docker/macos-docker-install.html

brew cask install docker

docker 镜像加速器

{
  "features": {
    "buildkit": true
  },
  "experimental": false,
  "registry-mirrors": [
    "加速器地址"
  ]
}
docker-compose安装服务(portainer、mysql、redis、nginx、rabbitmq、nacos、sentinel、minio…)
# 环境准备
git clone https://gitee.com/zhengqingya/docker-compose.git
cd docker-compose/Liunx

# 运行服务...

# Docker可视化界面工具`Portainer`
docker-compose -f docker-compose-portainer.yml -p portainer up -d
# MySQL
docker-compose -f docker-compose-mysql.yml -p mysql up -d
# Redis
docker-compose -f docker-compose-redis.yml -p redis up -d
# Nginx
docker-compose -f docker-compose-nginx.yml -p nginx up -d
# RabbitMQ
docker-compose -f docker-compose-rabbitmq.yml -p rabbitmq up -d
# Nacos-mysql
docker-compose -f docker-compose-nacos-mysql.yml -p nacos up -d
# Sentinel
docker-compose -f docker-compose-sentinel.yml -p sentinel up -d
# MinIO
docker-compose -f docker-compose-minio.yml -p minio up -d
Node.js

https://nodejs.org/en

在这里插入图片描述

open ~/.bash_profile

############################## ↓↓↓↓↓↓ set nodejs environment ↓↓↓↓↓↓ #############################
NODEJS_HOME=/IT_zhengqing/soft/soft-dev/node-v12.18.3-linux-x64
PATH=$PATH:$NODEJS_HOME/bin
export NODEJS_HOME PATH
#################################################################################################

# 查看版本
npm -v

# npm 升级
npm install -g npm

# 设置淘宝`NPM`镜像
sudo npm install -g cnpm --registry=https://registry.npm.taobao.org
# 测试
cnpm -v
yarn
brew install yarn
JDK

https://www.oracle.com/java/technologies/javase-downloads.html

# 配置环境变量
open ~/.bash_profile


############################## ↓↓↓↓↓↓ set java environment ↓↓↓↓↓↓ #############################
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_271.jdk/Contents/Home
CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/jre/lib/rt.jar
PATH=$PATH:$JAVA_HOME/bin
export JAVA_HOME CLASSPATH PATH
###############################################################################################


# 使配置生效
source ~/.bash_profile

# 验证
java
javac
java -version
SnailGit

在这里插入图片描述
在这里插入图片描述

Navicat Premium 15.0.22

https://www.macwk.com/soft/navicat-premium

Maven
# 下载`apache-maven-3.6.3-bin.tar.gz` : http://maven.apache.org/download.cgi
wget https://mirrors.bfsu.edu.cn/apache/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz
# 解压
x apache-maven-3.6.3-bin.tar.gz

# 配置环境变量
open ~/.bash_profile

############################## ↓↓↓↓↓↓ set maven environment ↓↓↓↓↓↓ #############################
MAVEN_HOME=/Users/zhengqingya/IT_zhengqing/soft/soft-dev/Maven/apache-maven-3.6.3
PATH=$PATH:$JAVA_HOME/bin:$MAVEN_HOME/bin
export MAVEN_HOME PATH
################################################################################################

# 使配置生效
source ~/.bash_profile

# 解决zsh下找不到mvn命令问题
echo 'source ~/.bash_profile' >> ${ZDOTDIR:-$HOME}/.zshrc
# 更新zsh配置
source ~/.zshrc

# 验证
mvn -v
Dash

Mac专属的文档管理工具

https://www.macwk.com/soft/dash

Charles

抓包神器 / Mock工具

https://www.macwk.com/soft/charles

Typora

MarkDown写作

https://www.macwk.com/soft/typora

Finder中查看隐藏文件

shift+cmmand+.

终端中执行如下命令:

defaults write com.apple.finder AppleShowAllFiles -boolean true ; killall Finder
Jenkins
# 创建目录
mkdir -p /Users/zhengqingya/IT_zhengqing/soft/soft-dev/jenkins
cd /Users/zhengqingya/IT_zhengqing/soft/soft-dev/jenkins
# 下载 【 根据自己需要的版本下载 http://mirrors.jenkins.io/war-stable 】
wget  http://mirrors.jenkins.io/war-stable/2.263.1/jenkins.war
# 启动 (这里指定新的端口10000运行)
nohup java -jar jenkins.war --ajp13Port=-1 --httpPort=10000 &

# 查看密码
cat /Users/zhengqingya/.jenkins/secrets/initialAdminPassword
# d8c40d8b5cab47ef94fe8eccda05fe48


# 关闭jenkins
http://ip:10000/exit 
# 重启jenkies
http://ip:10000/restart 
# 重新加载配置信息
http://ip:10000/reload 
Go

https://golang.google.cn/dl/

# 查看版本
go version
# 查看环境配置
go env
XMind

https://www.macwk.com/soft/xmind-2020

Microsoft Office

https://www.macwk.com/soft/office

Path Finder

https://macwk.com/soft/path-finder

超级右键-iRightMouse

https://www.macwk.com/soft/irightmouse

在这里插入图片描述

AnotherRedisDesktopManager

Redis可视化工具

https://github.com/qishibo/AnotherRedisDesktopManager/

brew install --cask another-redis-desktop-manager
Axure RP

https://www.macwk.com/soft/axure-rp

Apifox

https://www.macwk.com/soft/apifox

Parallels Desktop

不重启在 Mac 上运行 Windows 应用程序

https://www.parallels.cn/products/desktop/download/


CleanMyMac X

一键智能清理工具

https://www.mycleanmymac.com/
https://wm.makeding.com/iclk/?zoneid=41969

向日葵

通过macOS远程控制macOS、Linux、Android、Windows设备,随时接受其他设备远程协助

https://sunlogin.oray.com/download/

rustdesk

远程桌面软件

https://github.com/rustdesk/rustdesk

其它

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

郑清

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值