在Ubuntu14.04上安装Elasticsearch

安装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

更改设置

最大锁定内存

sudo vim /etc/init.d/elasticsearch
MAX_LOCKED_MEMORY=unlimited

重新启动以应用设置

sudo service elasticsearch restart

使用curl进行确认

curl 'http://localhost:9200/_nodes/process?pretty'

命令提示

健康检查

http://localhost:9200/_cat/health?v
curl 'localhost:9200/[インデックス名]/_search?q=*&pretty'
广告
将在 10 秒后关闭
bannerAds