ELK-學習-1:elasticsearch6.3安裝和配置

安裝elacticsearch:

1,安裝jdk  要求1.8以上java

2,安裝elacticsearchnode

rpm –ivh https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.3.0.rpmgit

 

修改配置文件

[root@study08 elasticsearch]# grep "^[a-z]" elasticsearch.yml
cluster.name: coship-xdx-test      #集羣名稱,集羣內全部節點配置同樣
node.name: coship-node-1           #節點名稱,惟一
path.data: /elastic/data                 #數據存儲路徑
path.logs: /elastic/log                   #日誌存儲路徑
bootstrap.memory_lock: true        #內存鎖住,不會觸發交換,centos7配置
network.host: 0.0.0.0                   #監聽地址
http.port: 9200                            #監聽端口github

 

建立數據和日誌路徑bootstrap

mkdir /elastic/data –pcentos

mkdir /elastic/log –p瀏覽器

修改目錄權限:elasticsearch 會自動建立一個用戶和用戶組。數據和日誌路徑要對此用戶有寫權限。elasticsearch

chown –R elasticsearch:elasticsearch /elastictcp

 

 

常見報錯處理方法以下:oop

問題一:

[WARN ][o.e.b.JNANatives ] unable to install syscall filter:

緣由:報了一大串錯誤,你們沒必要驚慌,其實只是一個警告,主要是由於你Linux版本太低形成的。
解決方案:
一、從新安裝新版本的Linux系統
二、警告不影響使用,能夠忽略

問題二:

max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]

[緣由:沒法建立本地文件問題,用戶最大可建立文件數過小
解決方案:
切換到root用戶,編輯limits.conf配置文件, 添加相似以下內容:
vi /etc/security/limits.conf
添加以下內容:

* soft nofile 65536
* hard nofile 131072
* soft nproc 2048
* hard nproc 4096

備註:* 表明Linux全部用戶名稱(好比 hadoop)
保存、退出、從新登陸纔可生效

max number of threads [1024] for user [es] is too low, increase to at least [2048]

緣由:沒法建立本地線程問題,用戶最大可建立線程數過小
解決方案:切換到root用戶,進入limits.d目錄下,修改90-nproc.conf 配置文件。
vi /etc/security/limits.d/90-nproc.conf
修改成:

* soft nproc 4096

max virtual memory areas vm.max_map_count [65530] likely too low, increase to at least [262144]

緣由:最大虛擬內存過小
解決方案:切換到root用戶下,修改配置文件sysctl.conf
vi /etc/sysctl.conf
添加下面配置:

vm.max_map_count=655360

並執行命令:
sysctl -p
而後從新啓動elasticsearch,便可啓動成功。

system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk

緣由:由於Centos6不支持SecComp,而ES5.2.1默認bootstrap.system_call_filter爲true進行檢測,因此致使檢測失敗,失敗後直接致使ES不能啓動。詳見 :elastic/elasticsearch#22899
解決方案:在elasticsearch.yml中配置bootstrap.system_call_filter爲false,注意要在Memory下面:

bootstrap.memory_lock: false bootstrap.system_call_filter: false

 

其它問題能夠參考:

轉載:https://github.com/DimonHo/DH_Note/issues/3

 

 

啓動elasticsearch

service elasticsearch start,若是遇到java找不到的報錯,致使啓動失敗,能夠修改/etc/init.d/elasticsearch 腳本,增長JAVA_HOME變量;

有以下打印,表示啓動成功:

image

查看監聽端口:

[root@study08 ~]# netstat -nltp |grep 9200
tcp        0      0 :::9200                     :::*                        LISTEN      3523/java

瀏覽器輸入:http://10.80.0.168:9200,出現以下信息,表示安裝成功

image

相關文章
相關標籤/搜索