ubuntu安装配置elasticSearch(vagrant)

安装jdk####

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
sudo update-alternatives --config java

安装elasticSearch####

mkdir /usr/local/elasticsearch/
sudo chmod -R 777 /usr/local/elasticsearch/
cd /usr/local/elasticsearch/
curl -L -O https://download.elasticsearch.org/elasticsearch/release/org/elasticsearch/distribution/zip/elasticsearch/2.1.1/elasticsearch-2.1.1.zip
unzip elasticsearch-2.1.1.zip
mv elasticsearch-2.1.1/* .
rm -v elasticsearch-2.1.1.zip

安装head监控工具####

/usr/local/elasticsearch/bin/plugin install mobz/elasticsearch-head

禁用监控####

echo 'head.agent.enabled: false' >> /etc/elasticsearch/elasticsearch.yml

运行elasticSearch####

/usr/local/elasticsearch/bin/elasticsearch
/usr/local/elasticsearch/bin/elasticsearch -d //守护进程启动

测试是否正常####

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

vagrant配置可访问####

修改/usr/local/elasticsearch/config/elasticsearch.yml
network.host: 0.0.0.0
vagrant配置:config.vm.network "forwarded_port", guest: 9200, host: 9230
通过http://127.0.0.1:9230/_plugin/head/访问

http://es.xiaoleilu.com/010_Intro/10_Installing_ES.html

posted @ 2016-01-21 14:29  天运子  阅读(550)  评论(0编辑  收藏  举报