mac 中安使用brew install elasticsearch / kibana

使用brew安装elasticsearch

1、执行brew install elasticsearch

2、安装成功如下

3、根据上面截图提示 执行这个

echo 'export PATH="/usr/local/opt/openjdk/bin:$PATH"' >> /Users/liuhongchun/.bash_profile

4、使用vi  .bash_profile 设置下面

export CPPFLAGS="-I/usr/local/opt/openjdk/include"

设置生效

source .bash_profile

5、执行brew services start elasticsearch 启动

6、执行启动elasticsearch,报错

解决办法:

进入/usr/local/etc/elasticsearch/

执行 vi jvm.options找到

-XX:+UseConcMarkSweepGC 注掉#-XX:+UseConcMarkSweepGC 增加一行 -XX:+UseG1GC

8:-Xloggc:logs/gc.log 注掉 #8:-Xloggc:logs/gc.log

9-:-Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m 注掉 #9-:-Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m

然后 保存,返回 目录 重新执行elasticsearch 即可成功!以上操作版本为elasticsearch 7

7、在页面中访问 http://localhost:9200/ 得到如下内容则表示安装成功

8、安装 brew install kibana

9、安装成功信息如下:

kibana 7.10.2 is already installed and up-to-date.

To reinstall 7.10.2, run:

  brew reinstall kibana

执行brew reinstall kibana 

10、启动kibana

11、访问http://localhost:5601

备注:kibana默认配置 连接 es 9200端口

猜你喜欢

转载自blog.csdn.net/CHL123456789/article/details/114800633