MAC安装ES 极速下载
前言:由于国内下载ES资源太慢,所以在下载过程中苦不堪言,网上的国内资源仅有Linux和Win版本。对MAC十分不友好。所以提供以下两种方式。
一:使用docker下载ES镜像来搭建ES本地服务(速度还可以)
二:使用MAC神奇brew下载(本文方式)
brew默认源下载很慢所以第一步先替换下载源
1. 替换brew.git
homebrew托管于github,更新homebrew就是从git上拉取最新的版本。
有时候git的速度也很慢,会导致更新受阻,那么就需要给git仓库换一个远程地址。
cd "$(brew --repo)"
git remote set-url origin https://mirrors.ustc.edu.cn/brew.git
2. 替换homebrew-core.git
替换Homebrew 核心软件仓库的地址。
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
3. 替换Homebrew Bottles源
对于bash用户:
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.bash_profile
source ~/.bash_profile
对于zsh用户
在这里插入代码片echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.zshrc
source ~/.zshrc
参考:
https://www.jianshu.com/p/9592826c254b
第二步使用brew来下载ES资源
brew update
brew install elasticsearch
下载完打开下载位置
/usr/local/Cellar/elasticsearch/7.8.1
/usr/local/Cellar brew默认下载路径
进入bin点击es即可执行
(也可以使用命令行使用 -d 参数。使其后台运行)
shift+command+.开启隐藏文件显示(找路径时有可能用到)
第三步访问
http://localhost:9200/
总结:使用brew 配置国内源 然后install
后续的kibana。hand等工具也可以使用类似方式