安装elasticsearch在Mac上
安装JDK
使用Homebrew安装Homebrew/Cask-Versions/Java8。
安装Elasticsearch
$ brew update
$ brew install elasticsearch
$ brew info elasticsearch
elasticsearch: stable 6.2.4, HEAD
Distributed search & analytics engine
https://www.elastic.co/products/elasticsearch
/usr/local/Cellar/elasticsearch/6.2.4 (112 files, 30.8MB) *
Built from source on 2018-08-11 at 01:40:17
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/elasticsearch.rb
==> Requirements
Required: java = 1.8 ✔
==> Options
--HEAD
Install HEAD version
==> Caveats
Data: /usr/local/var/lib/elasticsearch/elasticsearch_hitoshimurakami/
Logs: /usr/local/var/log/elasticsearch/elasticsearch_hitoshimurakami.log
Plugins: /usr/local/var/elasticsearch/plugins/
Config: /usr/local/etc/elasticsearch/
To have launchd start elasticsearch now and restart at login:
brew services start elasticsearch
Or, if you don't want/need a background service you can just run:
elasticsearch
不需要通过通行证←因为这次不需要通过通行证,所以我放弃了。
编辑 ~/.bash_profile
bash_profile
export ELASTICPATH=/usr/local/var/elasticsearch/plugins/
export PATH=$PATH:$ELASTICPATH
启动elasticsearch
$ cd /usr/local/Cellar/elasticsearch/6.2.4
$ bin/elasticsearch
执行确认。通过curl请求返回的json正常。
MacBook-Pro:6.2.4 hitoshimurakami$ curl http://localhost:9200
{
"name" : "tnvsi2-",
"cluster_name" : "elasticsearch_hitoshimurakami",
"cluster_uuid" : "CkNLBgkgTvK3gioWuPTKWg",
"version" : {
"number" : "6.2.4",
"build_hash" : "ccec39f",
"build_date" : "2018-04-12T20:37:28.497551Z",
"build_snapshot" : false,
"lucene_version" : "7.2.1",
"minimum_wire_compatibility_version" : "5.6.0",
"minimum_index_compatibility_version" : "5.0.0"
},
"tagline" : "You Know, for Search"
请提供一个参考链接
https://qiita.com/y-temp4/items/ffafe1c0ea8a29ce8707 的内容是关于如何使用Flask框架来构建一个简单的Web应用程序。作者解释了Flask的基本概念,如路由、模板和表单,并提供了一些代码示例来帮助读者理解。
https://qiita.com/nbkn/items/01a11392921119fa0153 是一篇关于使用Python进行数据分析的文章。作者介绍了一些常用的Python库,如NumPy和Pandas,并提供了一些实用的示例代码来展示如何处理和分析数据。