Install Elastic Search on Ubuntu

Update Package Manager

sudo apt-get update

Install JRE

sudo apt-get install openjdk-7-jre-headless -y

Install Elastic Search

wget -O elasticsearch.tar.gz
tar -xf elasticsearch.tar.gz
rm elasticsearch.tar.gz
sudo mv elasticsearch-* elasticsearch
sudo mv elasticsearch /usr/local/share

Install the Service Wrapper

curl -L | tar -xz
sudo mv *servicewrapper*/service /usr/local/share/elasticsearch/bin/
rm -Rf *servicewrapper*
sudo /usr/local/share/elasticsearch/bin/service/elasticsearch install
sudo ln -s `readlink -f /usr/local/share/elasticsearch/bin/service/elasticsearch` /usr/local/bin/elasticsearch
sudo service elasticsearch start
curl http://localhost:9200

Ubuntu ip-address

sudo vim /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static

Add public ssh key to server

cat ~/.ssh/ | ssh user@hostname 'cat >> .ssh/authorized_keys'
Previous Next