elasticsearchをインストール
リポジトリの設定
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
sudo apt-get install apt-transport-https
echo "deb https://artifacts.elastic.co/packages/5.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-5.x.list
sudo apt-get update
インストール
sudo apt-get install elasticsearch
起動
sudo service elasticsearch start
設定変更
MAX_LOCKED_MEMORY
sudo vim /etc/init.d/elasticsearch
MAX_LOCKED_MEMORY=unlimited
再起動して設定反映
sudo service elasticsearch restart
curlで確認
curl 'http://localhost:9200/_nodes/process?pretty'
コマンドTips
ヘルスチェック
http://localhost:9200/_cat/health?v
findAll
curl 'localhost:9200/[インデックス名]/_search?q=*&pretty'