groupadd esgroup useradd esroot -g esgroup -p password cd /home/esroot/ wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.4.2.tar.gz tar -zxvf elasticsearch-6.4.2.tar.gz mv elasticsearch-6.4.2 elasticsearch chown -R esroot:esgroup . su esroot
x'x'x'x修改elasticsearch的ip和端口linux
vi config/elasticsearch.yml (空格)network.host:(空格)0.0.0.0 (空格)http.port:(空格)9200
安装ik中文分词器:git
./bin/elasticsearch-plugin install https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v6.4.2/elasticsearch-analysis-ik-6.4.2.zip
安装完成后需重启esgithub
su e's'rootapache
./bin/elasticsearch -dbootstrap
curl http://localhost:9200/_cat/pluginsvim
//显示,表示安装 jbLBIzO analysis-ik 6.2.1centos
常见问题解决:bash
问题:elasticsearch dead but subsys locked 解决:rm -rf /var/lock/subsys/elasticsearch 重复出现建议看log,目录:/var/log/elasticsearch/elasticsearch.log 问题: max file descriptors [65535] for elasticsearch process is too low, increase to at least [65536] 解决: vi /etc/security/limits.conf esroot soft nofile 65536 esroot hard nofile 65536 问题:max number of threads [1024] for user [elasticsearch] is too low, increase to at least [4096] 解决: vi /etc/security/limits.d/90-nproc.conf * soft nproc 10240 问题:system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk 缘由:由于centos6.x操做系统不支持SecComp,而elasticsearch 5.5.2默认bootstrap.system_call_filter为true进行检测,因此致使检测失败,失败后直接致使ES不能启动 解决: vi config/elasticsearch.yml bootstrap.memory_lock: false bootstrap.system_call_filter: false 问题:max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144] 解决: vim /etc/sysctl.conf vm.max_map_count=262144 sysctl -p
https://blog.csdn.net/zhu815496402/article/details/83181300curl
https://my.oschina.net/liuyuantao/blog/1798724elasticsearch
https://blog.csdn.net/opensure/article/details/47617437
kibana安装
wget https://artifacts.elastic.co/downloads/kibana/kibana-6.4.2-linux-x86_64.tar.gz
tar -zxvf kibana-6.4.2-linux-x86_64.tar.gz
mv kibana-6.4.2-linux-x86_64 kibana
cd kibana
vi conf/kibana.yml
server.host:0.0.0.0
./bin/kibana &
http://127.0.0.1:5601
使用问题:
问题: Caused by: org.apache.lucene.search.BooleanQuery$TooManyClauses: maxClauseCount is set to 1024 解决: echo ' indices.query.bool.max_clause_count: 10240' >> /home/esroot/elasticsearch/config/elasticsearch.yml