1、配置JAVA環境,最新版curl
.........省略.........elasticsearch
普通用戶不生效的話,重啓rebootide
2、安裝測試
下載zip文件elasticsearch-5.4.0.zipui
unzip elasticsearch-5.4.0.zipurl
cd elasticsearch-5.4.0spa
3、啓動blog
./bin/elasticsearch -d教程
-d 參數臺運行ip
4、測試
curl 'http://localhost:9200/'
看到如下信息說明啓動成功
{
"name" : "MkBlpSX",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "7OoxnHQgRqmu2p-8VsGlXA",
"version" : {
"number" : "5.4.0",
"build_hash" : "780f8c4",
"build_date" : "2017-04-28T17:43:27.229Z",
"build_snapshot" : false,
"lucene_version" : "6.5.0"
},
"tagline" : "You Know, for Search"
}
5、客戶端測試
顯示「沒法訪問」得需求修改配置文件
vi config/elasticsearch.yml
6、重啓服務,出現:
max file descriptors [4096] for elasticsearchprocess likely too low, increase to at least [65536]
解決:
vi /etc/security/limits.conf
添加以下內容:
* soft nofile 65536
* hard nofile 65536
* soft nproc 2048
* hard nproc 4096
vi /etc/security/limits.d/20-nproc.conf
修改以下內容:
* soft nproc 4096
#修改成
* soft nproc 65536
vi /etc/sysctl.conf
添加下面配置:
vm.max_map_count=655360
並執行命令:
sysctl -p
而後,再啓動elasticsearch,便可啓動成功。
再,本地測試與客戶端測試:進行對比
curl 'http://localhost:9200'
http://192.168.137.7:9200/
7、安裝elasticsearch-head
.............待續...........
通過幾天的測試,網上沒有響應的教程,只有零零散散的片斷,如下是本人親測安裝過程總結: