Installing ElasticSearch on Ubuntu 12.04

别等时光非礼了梦想. 提交于 2019-12-03 07:38:06
Hugo Rodger-Brown

Word of warning to anyone trying what I did before - the URL specified in the Gist is to the source version, not the compiled version, hence there being no *.class files.

You can use the Gist as is, but substitute the latest download URL from the ElasticSearch site instead of the github URL that is there at the moment, e.g.:

....
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.1.1.tar.gz -O elasticsearch.tar.gz
tar -xf elasticsearch.tar.gz
rm elasticsearch.tar.gz
sudo mv elasticsearch-* elasticsearch
sudo mv elasticsearch /usr/local/share
...

** This is the lastest version as of 20/5/2014. To get more updated version, visit this page, right click on the TAR link (under Downloads Section), copy the link and replace the wget argument in the first line.

I installed elasticsearch the same way you did and ran into the same issue. In the end I fixed the issue by installing the compiled version rather than from github. It involves using the same steps as the gist, except use the tar from http://www.elasticsearch.org/download/2012/12/27/0.20.2.html rather than github. I forked and updated the gist, which is available at https://gist.github.com/4512530. Hope this helps.

follow this step and easily configer an Elastic Search.

Step 1 — Installing Java :

$ sudo apt-get update 

$ sudo apt-get install openjdk-7-jre 

$ java -version 

Step 2 — Downloading and Installing Elasticsearch :

$ wget https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-1.7.2.deb 

$ sudo dpkg -i elasticsearch-1.7.2.deb 

$ sudo update-rc.d elasticsearch defaults

Step 3 — Configuring Elastic :

$ sudo nano /etc/elasticsearch/elasticsearch.yml

node.name: "My First Node" cluster.name: mycluster1

$ sudo service elasticsearch start 

Step 4 — Securing Elastic :

$ sudo nano /etc/elasticsearch/elasticsearch.yml 

network.bind_host: localhost

script.disable_dynamic: true

Step 5 — Testing :

$ curl -X GET 'http://localhost:9200' or run http://localhost:9200 in any browser. 

You should see the following response:

{ 
"status" : 200,
"name" : "Harry Leland",
"cluster_name" : "elasticsearch",
"version" : {
"number" : "1.7.2",
"build_hash" : "e43676b1385b8125d647f593f7202acbd816e8ec",
"build_timestamp" : "2015-09-14T09:49:53Z",
"build_snapshot" : false,
"lucene_version" : "4.10.4"
},
"tagline" : "You Know, for Search"
}

Refrence By:

http://laravelcode.com/post/how-to-install-elastic-search-in-local-system-and-live-server

Depackaging the deb file available on the elasticsearch website worked fine for me:

sudo dpkg -i elasticsearch-1.1.1.deb

Installing through apt as documented at https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-repositories.html seems to work well.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!