Step 1: 下載檔案
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.6.0.tar.gz
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.6.0.tar.gz.sha512
shasum -a 512 -c elasticsearch-6.6.0.tar.gz.sha512
tar -xzf elasticsearch-6.6.0.tar.gz
檢查下載檔案是否正確
shasum -a 512 -c elasticsearch-6.6.0.zip.sha512
Step 2: 修改設定檔案
cd ~/elasticsearch-6.6.0/config
nano ./elasticsearch.yml
network.host: 0.0.0.0
http.port: 9200
transport.tcp.port: 9300
http.cors.enabled: true
http.cors.allow-origin: “*”
Step 3: 執行
cd ~/elasticsearch-6.6.0/bin
chmod +x elasticsearch
chmod +x ~/elasticsearch-6.6.0/modules/x-pack-ml/platform/linux-x86_64/bin/controller
nohup ./elasticsearch &
Step 4: 停止執行中的ES
ps -aux| grep elasticsearch-6.6.0 | awk '{print $2}'|xargs kill -9
檢查是否成功
http://{hostname}:9200/