Last active
October 9, 2020 06:45
-
-
Save gokhanakkurt/4d6caf51024e3da5fa8b81efb5111e7d to your computer and use it in GitHub Desktop.
Commands for installing Elasticsearch on Centos 6
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 Java JDK | |
sudo yum install java-1.8.0-openjdk.x86_64 | |
#download signing key | |
rpm --import https://packages.elastic.co/GPG-KEY-elasticsearch | |
#create repo file | |
sudo vi /etc/yum.repos.d/elasticsearch.repo | |
#paste repo configurations | |
[elasticsearch-2.x] | |
name=Elasticsearch repository for 2.x packages | |
baseurl=https://packages.elastic.co/elasticsearch/2.x/centos | |
gpgcheck=1 | |
gpgkey=https://packages.elastic.co/GPG-KEY-elasticsearch | |
enabled=1 | |
#install elasticsearch | |
sudo yum install elasticsearch | |
# set elasticsearch to run on boot | |
sudo chkconfig --add elasticsearch | |
sudo chkconfig elasticsearch on | |
# lookup list | |
sudo chkconfig --list | |
# open port 9200 (for http) and 9300 (for tcp) | |
sudo iptables -L -n | |
iptables -A INPUT -p tcp -m tcp --dport 9200 -j ACCEPT | |
iptables -A INPUT -p tcp -m tcp --dport 9300 -j ACCEPT | |
service iptables save | |
# restart server | |
service elasticsearch restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment