linux elasticsearch的安裝
(一)下載elasticsearch linux安裝包
https://www.elastic.co/downloads/past-releases,然後解壓,然後要有對應的java8,即必須先安裝java,可以參照:https://www.cnblogs.com/chenmz1995/p/10197859.html
(二)創建用戶,es需用非root用戶啟動。
useradd elasticsearch
passwd elasticsearch
su elasticsearch
(三)啟動es
在bin目錄下,./elasticsearch即可。
啟動可能遇到的問題:
1. main ERROR Could not register mbeans java.security.AccessControlException: access denied ("javax.management.MBeanTrustPermission" "register")
解決辦法:
chown -R elasticsearch elasticsearch-5.1.1
把安裝目錄的讀權限給當前用戶。elasticsearch表示用戶。
2.
ERROR: bootstrap checks failed
max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
解決辦法:
切換到root用戶:
(四)開啟某個端口號
然後找到對應的elasticsearch.yml,添加:
http.port: 9200
linux elasticsearch的安裝