日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

CentOS6.5安装ElasticSearch6.2.3

發布時間:2023/12/20 编程问答 22 豆豆
生活随笔 收集整理的這篇文章主要介紹了 CentOS6.5安装ElasticSearch6.2.3 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

CentOS6.5安裝ElasticSearch6.2.3


1、Elastic 需要 Java 8 環境。(安裝步驟:http://www.cnblogs.com/hunttown/p/5450463.html)

2、安裝包下載:

#官網地址

https://www.elastic.co/downloads/elasticsearch

3、新建用戶

?????? Elastic高版本不建議使用root用戶

(1)創建elastic用戶組

[root@mycentos ~]# groupadd elastic

(2)創建用戶elastic

useradd elastic(用戶名) -g elastic(組名) -p 123456(密碼)

[root@mycentos ~]# useradd elastic -g elastic -p 123456

4、解壓安裝包

?????? 建議將安裝包放到/usr/local目錄下 ? .放到新建用戶目錄下,要不報錯 ? ?錯誤: 找不到或無法加載主類 org.elasticsearch.tools.java_version_checker.JavaVersionChecker

[root@mycentos local]# unzip elasticsearch-6.2.3.zip
tar zxvf xxx.gz

5、添加權限

chown -R elastic elasticsearch-6.2.3

6、修改配置文件

(1)ERROR: bootstrap checks failed

?????? ?memory locking requested for elasticsearch process but memory is not locked

原因:鎖定內存失敗

解決方案:使用root用戶,編輯limits.conf配置文件, 添加如下內容:

[root@mycentos ~]# vim /etc/security/limits.conf* soft memlock unlimited * hard memlock unlimited

備注:* 代表Linux所有用戶名稱,保存、退出、重新登錄生效。

(2)ERROR: bootstrap checks failed

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

原因:無法創建本地文件問題,用戶最大可創建文件數太小。

解決方案:使用root用戶,編輯limits.conf配置文件, 添加如下內容:

[root@mycentos ~]# vim /etc/security/limits.conf* soft nofile 65536 #軟件 * hard nofile 131072 #硬件

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

原因:無法創建本地線程問題,用戶最大可創建線程數太小

解決方案:使用root用戶,進入limits.d目錄下,修改90-nproc.conf 配置文件。

[root@mycentos ~]# vim /etc/security/limits.d/90-nproc.confsoft nproc 1024 #修改為: soft nproc 4096

(4)max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

原因:最大虛擬內存太小

解決方案:使用root用戶下,修改配置文件sysctl.conf

[root@mycentos ~]# vim /etc/sysctl.conf

添加下面配置:

vm.max_map_count=655360

并執行命令生效:

sysctl -p

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

原因:因為Centos6不支持SecComp

解決方法:在elasticsearch.yml中配置bootstrap.system_call_filter為false,注意要在Memory下面:

[root@mycentos config]# vim elasticsearch.ymlbootstrap.memory_lock: false bootstrap.system_call_filter: false

(6)配置host

[root@mycentos config]# vim elasticsearch.ymlnetwork.host: 0.0.0.0 #所有用戶都可以訪問 http.port: 9200

?

7、切換用戶

[root@mycentos local]# su elastic

8、啟動es? ? ?

[elastic@mycentos elasticsearch-6.2.3]$ bin/elasticsearch

?? ? ? ?后臺啟動:

[elastic@mycentos elasticsearch-6.2.3]$ bin/elasticsearch -d 或 [elastic@mycentos elasticsearch-6.2.3]$ bin/elasticsearch &

9、瀏覽器訪問

或者:

安裝完畢!

聲明:本文僅為作者個人筆記,請勿轉載!

轉載于:https://www.cnblogs.com/bigben0123/p/10102438.html

總結

以上是生活随笔為你收集整理的CentOS6.5安装ElasticSearch6.2.3的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。