溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點(diǎn)擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

簡易elasticsearch服務(wù)器搭建

發(fā)布時(shí)間:2020-06-14 05:45:11 來源:網(wǎng)絡(luò) 閱讀:420 作者:棲木之地 欄目:大數(shù)據(jù)

1:下載和解壓:
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.3.2.tar.gz
2:配置config/elasticsearch.yml
network.host: 10.99.32.16
http.port: 9200
path.logs: /root/elasticsearch/log
path.data: /root/elasticsearch/data
node.name: node-1
cluster.name: mycluster
discovery.zen.ping.unicast.hosts: ["10.99.32.16", "10.99.32.17", "10.99.32.18"]
discovery.zen.minimum_master_nodes: 2
bootstrap.memory_lock: true
3:配置config/jvm.options
4:配置一些系統(tǒng)內(nèi)核參數(shù):

can not run elasticsearch as root:
不能使用root用戶進(jìn)行操作,需要?jiǎng)?chuàng)建一個(gè)用戶,并把原來的目錄的擁有者更改為該用戶
adduser myuser
passwd myuser
chown -R myuser /mypath

max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
修改/etc/security/limits.conf
添加:elastic hard nofile 65536

max file size [67107840] for user [elastic] is too low, increase to [unlimited]
修改/etc/security/limits.conf
elastic soft fsize unlimited

max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
解決:sysctl -w vm.max_map_count=262144

5:運(yùn)行:
bin/elasticsearch
后臺(tái)運(yùn)行:bin/elasticsearch -d -p pidFile
會(huì)生成一個(gè)pidFile文件,記錄pid
隨系統(tǒng)啟動(dòng):
sudo /bin/systemctl daemon-reload
sudo /bin/systemctl enable elasticsearch.service

向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI