elasticsearch 0.20.2 install and configuration with tomcat ( CentOS 6.3 x64 )
1. solr 0.20.2 download , tar
wget http://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.20.2.tar.gz tar -xvzf elasticsearch-0.20.2.tar.gz cp -Rf /srv/src/elasticsearch-0.20.2 /srv/elasticsearch chown -Rf luvu.luvu /srv/elasticsearch2. running as a service
wget https://github.com/elasticsearch/elasticsearch-servicewrapper/archive/master.zip # download service wrapper unzip elasticsearch-servicewrapper-master.zip mv /srv/src/elasticsearch-servicewrapper-master/service /srv/elasticsearch/bin/ # move to under elasticsearch/bin/3. service command
- /srv/elasticsearch/bin/service/elasticsearch start
- console - Run the elasticsearch in the foreground.
- start - Run elasticsearch in the background.
- stop - Stops elasticsearch if its running.
- install - Install elasticsearch to run on system startup (init.d / service).
- remove - Removes elasticsearch from system startup (init.d / service).
4. register service
/srv/elasticsearch/bin/service/elasticsearch install (register init.d ) vi /etc/init.d/elasticsearch RUN_AS_USER=luvu # user add
5. allow firewall
iptables -I INPUT -p tcp --dport 9200 -j ACCEPT service iptables save service iptables restart
next. cluster setup
Reference :
http://www.elasticsearch.org/guide/reference/setup/installation.html
http://www.elasticsearch.org/guide/reference/setup/configuration.html