亚洲最大看欧美片,亚洲图揄拍自拍另类图片,欧美精品v国产精品v呦,日本在线精品视频免费

  • 站長資訊網(wǎng)
    最全最豐富的資訊網(wǎng)站

    CentOS 7.3下安裝部署Elasticsearch 6.3.2過程詳解

    elasticsearch簡介

    ElasticSearch是一個基于Lucene的搜索服務(wù)器。它提供了一個分布式多用戶能力的全文檢索引擎,基于RESTful web接口。Elasticsearch是用Java開發(fā)的,并作為Apache許可條款下的開放源碼發(fā)布,是當(dāng)前流行的企業(yè)級搜索引擎。設(shè)計用于云計算中,能夠達(dá)到實時搜索,穩(wěn)定,可靠,快速,安裝使用方便。

    實驗部署

    1、實驗所需組件及環(huán)境

    1)JDK8以上環(huán)境
    2)CentOS7.3,IP地址:192.168.144.112
    3)elasticsearch6.3.2

    • es最新軟件軟件包可在官方網(wǎng)站下載:https://www.elastic.co/downloads/elasticsearch

    2、安裝jdk8以上版本

    yum install java -y
    java -version 查看java版本

    CentOS 7.3下安裝部署Elasticsearch 6.3.2過程詳解

    3、部署elasticsearch6.3.2

    • 首先在官網(wǎng)當(dāng)中下載es的軟件包,本文采用壓縮包解壓縮安裝方式啟動服務(wù)。

    • 值得注意的是,在es5.0版本后不支持與logstash和kibana2.x版本的混用,且安全級別的提升,使得es在后續(xù)的版本中不允許使用root用戶啟動,因此我們需要創(chuàng)建另外獨立賬戶專供es使用。并且需要在root權(quán)限下將該特定環(huán)境準(zhǔn)備好。

    tar zxvf elasticsearch-6.3.2.tar.gz -C /opt/

    • 創(chuàng)建獨立用戶與組(root用戶下創(chuàng)建設(shè)定)

    groupadd ela 創(chuàng)建ela組
    useradd -g ela ela 創(chuàng)建ela用戶,并且加入ela組
    passwd ela 為ela用戶設(shè)定登錄密碼
    visudo(或者vim /etc/sudoers)

    CentOS 7.3下安裝部署Elasticsearch 6.3.2過程詳解

    • 為了讓ela用戶擁有對elasticsearch執(zhí)行權(quán)限,在root用戶權(quán)限下解壓后,需要將軟件包更改屬主屬組。

    chown -R ela.ela /opt/elasticsearch-6.3.2/
    ls -l /opt/elasticsearch-6.3.2/

    CentOS 7.3下安裝部署Elasticsearch 6.3.2過程詳解

    • 切換到ela用戶,編輯配置文件,準(zhǔn)備啟動es

    su ela
    [ela@localhost ~]$ cd /opt/elasticsearch-6.3.2/config/
    [ela@localhost config]$ sudo vim elasticsearch.yml

    # ———————————- Cluster ———————————–
    #
    # Use a descriptive name for your cluster:
    #
    cluster.name: abner  //打開設(shè)定es群集名稱
    #
    # ———————————— Node ————————————
    #
    # Use a descriptive name for the node:
    #
    node.name: node-1      //es當(dāng)前節(jié)點名稱,用于區(qū)分不同節(jié)點
    #
    # Add custom attributes to the node:
    #
    #node.attr.rack: r1
    #
    # ———————————– Paths ————————————
    #
    # Path to directory where to store the data (separate multiple locations by comma):
    #
    path.data: /data/es-data    //修改數(shù)據(jù)目錄,此目錄為自定義,需要在root用戶下創(chuàng)建,且屬主屬組更改為ela
    #
    # Path to log files:
    #
    path.logs: /var/log/elasticsearch  //日志目錄位置,需自己創(chuàng)建,方式同上
                                      //yum安裝則系統(tǒng)自定義,在軟件版本或者系統(tǒng)升級時會被刪除,所以建議修改
    #
    # ———————————– Memory ———————————–
    #
    # Lock the memory on startup:
    #
    bootstrap.memory_lock: true  //elasticsearch官網(wǎng)建議生產(chǎn)環(huán)境需要設(shè)置bootstrap.memory_lock: true
    #
    # Make sure that the heap size is set to about half the memory available
    # on the system and that the owner of the process is allowed to use this
    # limit.
    #
    # Elasticsearch performs poorly when the system is swapping the memory.
    #
    # ———————————- Network ———————————–
    #
    # Set the bind address to a specific IP (IPv4 or IPv6):
    #
    network.host: 0.0.0.0  //監(jiān)聽訪問地址為任意網(wǎng)段
    #
    # Set a custom port for HTTP:
    #
    http.port: 9200  //服務(wù)監(jiān)聽端口
    #

    編輯完成配置文件后,數(shù)據(jù)目錄以及日志文件目錄需要創(chuàng)建

    sudo mkdir -p /data/es-data
    sudo mkdir -p /var/log/elasticsearch
    sudo chown -R ela.ela /data/
    sudo chown -R ela.ela /var/log/elasticsearch

    • 準(zhǔn)備工作完成,啟動es

    [ela@localhost /]$ cd /opt/elasticsearch-6.3.2/bin/
    [ela@localhost bin]$ ./elasticsearch 后面可以跟上-d后臺執(zhí)行

    CentOS 7.3下安裝部署Elasticsearch 6.3.2過程詳解

    4、啟動發(fā)現(xiàn)異常情況以及處理方式

    CentOS 7.3下安裝部署Elasticsearch 6.3.2過程詳解

    -當(dāng)發(fā)現(xiàn)如上圖無法分配內(nèi)存錯誤等,可執(zhí)行如下操作。(需要在root用戶權(quán)限下)

    vim /etc/security/limits.conf

    CentOS 7.3下安裝部署Elasticsearch 6.3.2過程詳解

    * soft nofile 65536
    * hard nofile 131072
    ela soft memlock unlimited
    ela hard memlock unlimited

    • 當(dāng)發(fā)現(xiàn)ERROR: [1] bootstrap checks failed錯誤時,解決方式如下(root用戶狀態(tài)下)

    CentOS 7.3下安裝部署Elasticsearch 6.3.2過程詳解

    vim /etc/sysctl.conf

    vm.max_map_count = 655360 //添加

    sysctl -p

    • 切換到ela用戶,執(zhí)行啟動程序

    [ela@localhost abc]$ cd /opt/elasticsearch-6.3.2/bin/
    [ela@localhost bin]$ ./elasticsearch

    CentOS 7.3下安裝部署Elasticsearch 6.3.2過程詳解

    • 新建終端,以root用戶查看9200端口是否開啟

    netstat -ntap | grep 9200

    tcp6      0      0 :::9200                :::*                    LISTEN      2095/java

    • 打開瀏覽器訪問驗證,出現(xiàn)如下界面即安裝成功,訪問時記得關(guān)閉防火墻!??!

    CentOS 7.3下安裝部署Elasticsearch 6.3.2過程詳解

    Elasticsearch 教程系列文章: 

    Linux上安裝部署ElasticSearch全程記錄  http://www.fxwbio.com/Linux/2015-09/123241.htm
    Linux下Elasticsearch 1.7.0安裝配置 http://www.fxwbio.com/Linux/2017-05/144215.htm
    在Ubuntu 16.04 中安裝 Elasticsearch 5.4分析引擎  http://www.fxwbio.com/Linux/2017-07/145588.htm
    Elasticsearch1.7升級到2.3實踐總結(jié)  http://www.fxwbio.com/Linux/2016-11/137282.htm
    Ubuntu 14.04中Elasticsearch集群配置  http://www.fxwbio.com/Linux/2017-01/139460.htm
    Elasticsearch-5.0.0移植到Ubuntu 16.04 http://www.fxwbio.com/Linux/2017-01/139505.htm
    ElasticSearch 5.2.2 集群環(huán)境的搭建  http://www.fxwbio.com/Linux/2017-04/143136.htm
    Linux下安裝搜索引擎Elasticsearch  http://www.fxwbio.com/Linux/2017-05/144105.htm
    CentOS上安裝 ElasticSearch 詳解  http://www.fxwbio.com/Linux/2017-05/143766.htm
    Elasticsearch5.3安裝插件head  http://www.fxwbio.com/Linux/2017-09/147008.htm

    Linux上安裝Elasticsearch http://www.fxwbio.com/Linux/2018-08/153391.htm

    贊(0)
    分享到: 更多 (0)
    網(wǎng)站地圖   滬ICP備18035694號-2    滬公網(wǎng)安備31011702889846號