Last active
September 10, 2018 14:42
-
-
Save hoangthienan/6fe6674c96c70619d79d to your computer and use it in GitHub Desktop.
Install ElasticSearch on CentOS 6.5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install missing libraries (if any) | |
[root@sm ~]# cd ~ | |
[root@sm ~]# sudo yum update | |
# get and unpack elasticsearch tar file | |
[root@sm ~]# wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.3.1.tar.gz -O elasticsearch.tar.gz | |
[root@sm ~]# tar -xvf elasticsearch.tar.gz | |
[root@sm ~]# mv elasticsearch-* elasticsearch | |
[root@sm ~]# sudo mv elasticsearch /usr/local/share | |
# make elasticsearch runnable as a service | |
[root@sm ~]# cd ~ | |
[root@sm ~]# curl -L http://github.com/elasticsearch/elasticsearch-servicewrapper/tarball/master | tar -xz | |
[root@sm ~]# mv *servicewrapper*/service /usr/local/share/elasticsearch/bin/ | |
[root@sm ~]# rm -Rf *servicewrapper* | |
[root@sm ~]# sudo /usr/local/share/elasticsearch/bin/service/elasticsearch install | |
[root@sm ~]# sudo /etc/init.d/elasticsearch start | |
# open port | |
[root@sm ~]# sudo vi /etc/sysconfig/iptables | |
-A INPUT -p tcp -m tcp --dport 9200 -j ACCEPT | |
-A INPUT -p tcp -m tcp --dport 9300 -j ACCEPT | |
[root@sm ~]# sudo /etc/init.d/iptables restart | |
# install elasticsearch plugins | |
[root@sm ~]# cd /usr/local/share/elasticsearch/bin/ | |
[root@sm bin]#./plugin -install mobz/elasticsearch-head |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Download and install the Public Signing Key | |
rpm --import http://packages.elasticsearch.org/GPG-KEY-elasticsearch | |
Add the following in your /etc/yum.repos.d/ directory in a file named (for example) elasticsearch.repo | |
[elasticsearch-1.3] | |
name=Elasticsearch repository for 1.3.x packages | |
baseurl=http://packages.elasticsearch.org/elasticsearch/1.3/centos | |
gpgcheck=1 | |
gpgkey=http://packages.elasticsearch.org/GPG-KEY-elasticsearch | |
enabled=1 | |
And your repository is ready for use. You can install it with : | |
yum install elasticsearch | |
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/setup-repositories.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment