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