# instructions from official site at # http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/setup-repositories.html# http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/setup-configuration.html# import public key for elasticsearch############# remove old elastistic searchyum-yremoveelasticsearch# install new elasticsearchrpm--importhttp://packages.elasticsearch.org/GPG-KEY-elasticsearch# create file at /etc/yum.repos.d/elasticsearch.repo and add following contents[elasticsearch-1.5]name=Elasticsearchrepositoryfor1.5.xpackagesbaseurl=http://packages.elasticsearch.org/elasticsearch/1.5/centosgpgcheck=1gpgkey=http://packages.elasticsearch.org/GPG-KEY-elasticsearchenabled=1# check available packageyumlistavailable--disablerepo=*--enablerepo=elasticsearch-1.5-q# install elasticsearchyum-yinstalljava-1.7.0-openjdkyum-yinstallelasticsearchthenmakesuretoconfigureyourelasticsearchlikebeforeifyouhadpreviouslyinstalledelasticsearch########################################### ensure elasticsearch starts automatically + start service for first time# for CentOS 7systemctldaemon-reloadsystemctlenableelasticsearch.servicesystemctlstartelasticsearch.service# for CentOS 6.6chkconfigelasticsearchonserviceelasticsearchstart########################################### to stop# for CentOS 7systemctlstopelasticsearch.service# for CentOS 6.6serviceelasticsearchstop########################################### to restart# for CentOS 7systemctlrestartelasticsearch.service# for CentOS 6.6serviceelasticsearchrestart
Comments (0)
HTTPSSSH
You can clone a snippet to your computer for local editing.
Learn more.