This notes is about how to install elasticsearch on Centos 6.8
Create a new yum repository file for Elasticsearch
and then install elasticsearch using yum
Install Java first
you need to install java first, the following commands will get latest java sdk and then install itcd ~ wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u73-b02/jdk-8u73-linux-x64.rpm" sudo yum -y localinstall jdk-8u73-linux-x64.rpm rm ~/jdk-8u*-linux-x64.rpm
Install Elasticsearch
Run the following command to import the Elasticsearch public GPG key into rpmsudo rpm --import http://packages.elastic.co/GPG-KEY-elasticsearch
Create a new yum repository file for Elasticsearch
echo '[elasticsearch-2.x] name=Elasticsearch repository for 2.x packages baseurl=http://packages.elastic.co/elasticsearch/2.x/centos gpgcheck=1 gpgkey=http://packages.elastic.co/GPG-KEY-elasticsearch enabled=1 ' | sudo tee /etc/yum.repos.d/elasticsearch.repo
and then install elasticsearch using yum
sudo yum -y install elasticsearch
Run elasticsearch
sudo /etc/init.d/elasticsearch starttest it with a simple curl command, if the elasticsearch node information shows then you have success
[svision@svision ~]$ curl localhost:9200 { "name" : "Bulldozer", "cluster_name" : "elasticsearch", "version" : { "number" : "2.3.5", "build_hash" : "90f439ff60a3c0f497f91663701e64ccd01edbb4", "build_timestamp" : "2016-07-27T10:36:52Z", "build_snapshot" : false, "lucene_version" : "5.5.0" }, "tagline" : "You Know, for Search" }
No comments :
Post a Comment