Elasticsearch 的安装与简单配置
JMV配置
-
修改 JMV - config/jmv.options
- 7.1下载的默认设置是1GB
-
配置的建议
-
Xmx 和 Xms设置成一样 (最大最小内存)
-
Xmx不要超过机器内存的50%
-
#启动单节点
bin/elasticsearch -E node.name=node0 -E cluster.name=geektime -E path.data=node0_data
#安装插件
bin/elasticsearch-plugin install analysis-icu
#查看插件
bin/elasticsearch-plugin list
#查看安装的插件
GET http://localhost:9200/_cat/plugins?v
#在开发机上运行多个ES实例
#start multi-nodes Cluster
bin/elasticsearch -E node.name=node0 -E cluster.name=geektime -E path.data=node0_data
bin/elasticsearch -E node.name=node1 -E cluster.name=geektime -E path.data=node1_data
bin/elasticsearch -E node.name=node2 -E cluster.name=geektime -E path.data=node2_data
bin/elasticsearch -E node.name=node3 -E cluster.name=geektime -E path.data=node3_data
#删除进程
ps | grep elasticsearch
kill pid
#查看集群
GET http://localhost:9200
#查看nodes
GET _cat/nodes
GET _cluster/health
相关阅读
- 安装指南 https://www.elastic.co/guide/en/elasticsearch/reference/7.1/install-elasticsearch.html
- Elastic Support Matrix(OS / JDK ) https://www.elastic.co/cn/support/matrix
- Elasticsearch 的一些重要配置 https://www.elastic.co/guide/en/elasticsearch/reference/current/important-settings.html
- https://www.elastic.co/guide/en/elasticsearch/reference/current/settings.html
- https://www.elastic.co/guide/en/elasticsearch/reference/current/important-settings.html
- Elasticsearch on Kuvernetes https://www.elastic.co/cn/blog/introducing-elastic-cloud-on-kubernetes-the-elasticsearch-operator-and-beyond
- CAT Plugins API https://www.elastic.co/guide/en/elasticsearch/reference/7.1/cat-plugins.html
Kibana 的安装与界面快速浏览
Kibana Console
-
Dev Tool
-
Search Profiler
-
Help + 一些快捷键
-
cmd + / (查看API帮助文档)
-
cmd + optin + I
-
cmd + optin + 0
-
cmd + optin + shift + 0
-
#启动kibana
bin/kibana
#查看插件
bin/kibana-plugin list
#安装插件
bin/kibana-plugin install plugin_location //插件名字;URL路径;下载指定路径离线安装
#移除插件
bin/kibana-plugin remove 插件名字
相关阅读
- Kibana 下载地址https://www.elastic.co/downloads/kibana
Logstash 安装与测试数据导入
需要
logstash.conf
配置文件需要下载测试数据CSV文件
#修改movielens目录下的`logstash.conf`文件
#path修改为,你实际的movies.csv路径
input {
file {
path => "YOUR_FULL_PATH_OF_movies.csv"
start_position => "beginning"
sincedb_path => "/dev/null"
}
}
#启动Elasticsearch实例,然后启动 logstash,并制定配置文件导入数据
bin/logstash -f /YOUR_PATH_of_logstash.conf
相关阅读
- 下载最MovieLens最小测试数据集:https://grouplens.org/datasets/movielens/
- Logstash下载:https://www.elastic.co/cn/downloads/logstash
- Logstash参考文档:https://www.elastic.co/guide/en/logstash/current/index.html
网友评论