ELK 安裝教學|Elasticsearch 7.x 線上及離線安裝

瀏覽人次: 10791
2022-11-26 更新

elasticsearch logo

下載最新版本 Elasticsearch 安裝包

具有網路環境,可直接新增 yum repo 來源,所以:

cat > /etc/yum.repos.d/elastic.repo << EOF
[elasticsearch-7.x]
name=Elasticsearch repository for 7.x packages
baseurl=https://artifacts.elastic.co/packages/7.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
autorefresh=1
type=rpm-md
EOF
yum install elasticsearch

離線環境下,下載 rpm 檔,並透過 rpm 檔進行安裝:

wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.11.0-x86_64.rpm
rpm -ivh elasticsearch-7.11.0-x86_64.rpm

編輯 elasticsearch.yml 設定

sudo vim /etc/elasticsearch/elasticsearch.yml
修改下面兩個設定
network.host: "{ YOUR IP }"
cluster.initial_master_nodes: ${HOSTNAME}

啟動 Elasticsearch

systemctl start elasticsearch

驗證 Elasticsearch

Browser 上輸入網址: http:// {{ IP }}:9200
如看到如下相關資訊,表示安裝成功


{
  "name" : "localhost.localdomain",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "SHCdqrgxQRWSWx03gvP51Q",
  "version" : {
    "number" : "7.11.0",
    "build_flavor" : "default",
    "build_type" : "rpm",
    "build_hash" : "78722783c38caa25a70982b5b042074cde5d3b3a",
    "build_date" : "2022-07-23T19:30:09.227964828Z",
    "build_snapshot" : false,
    "lucene_version" : "9.2.0",
    "minimum_wire_compatibility_version" : "7.17.0",
    "minimum_index_compatibility_version" : "7.0.0"
  },
  "tagline" : "You Know, for Search"
}

繼續安裝
LogstashBeatsKibana

滖動式升級 Elasticsearch Node

如何最佳化 Elasticsearch 效能



有任何問題,或是想看新主題?

聯絡我們

快速跳轉目錄

✦ 集先鋒 Bimap – 企業建置高速穩定的海量日誌分析平台✦

集中不同的結構化資料和非結構化日誌,並進行關聯性的大數據整合,客製化儀表版、自訂事件告警、機器學習等等,以滿足各種大數據的應用場景和解決方案。