centos安裝elasticsearch

1、下載es

wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.6.1.tar.gz

2、解壓

tar -zxvf elasticsearch-6.6.1.tar.gz -C /usr/local

3、進入到es

cd /usr/local/elasticsearch-6.6.1/

4、配置信息

4.1 創建用戶和用戶組。因爲es不支持使用root用戶啓動

groupadd esyun

useradd esyun -g yuns -p 123456

chown -R esyun:yuns  elasticsearch-6.6.1

4.2 

vi /etc/sysctl.conf

vm.max_map_count=655360

sysctl p

4.3

vi /etc/security/limits.conf

* soft nofile 65536

* hard nofile 131072

* soft nproc 2048

* hard nproc 4096

4.4

cd /usr/local/elasticsearch-6.6.1/config

vim elasticsearch.yml

---------------------------------

network.host: 0.0.0.0
http.port: 9200
-----------------------------------

4.5 

vim /usr/local/elasticsearch-6.6.1/config/jvm.options

-Xms200m
-Xmx200m

4.6 關閉防火牆

systemctl stop firewalld.service

4.6 啓動

./elasticsearch -d

然後打開瀏覽器

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章