安装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
wget -qO - https://packages.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
echo "deb http://packages.elastic.co/elasticsearch/2.x/debian stable main" | sudo tee -a /etc/apt/sources.list.d/elasticsearch-2.x.list
sudo apt-get update && sudo apt-get install elasticsearch
安装Marvel监控工具
/usr/share/elasticsearch/bin/plugin install elasticsearch/marvel/latest
禁用监控
echo 'marvel.agent.enabled: false' >> /etc/elasticsearch/elasticsearch.yml
运行elasticSearch
sudo mkdir /usr/share/elasticsearch/logs
sudo mkdir /usr/share/elasticsearch/data
sudo mkdir /usr/share/elasticsearch/config
sudo chmod -R 777 /usr/share/elasticsearch/logs
sudo chmod -R 777 /usr/share/elasticsearch/data
sudo chmod -R 777 /usr/share/elasticsearch/config
/usr/share/elasticsearch/bin/elasticsearch
/usr/share/elasticsearch/bin/elasticsearch -d //守护进程启动
测试是否正常
curl 'http://localhost:9200/?pretty'