ElasticSearch has an active community and the release cycles are very fast.
Because ElasticSearch depends on many common Java libraries (Lucene, Guice, and Jackson are the most famous ones), the ElasticSearch community tries to keep them updated and fix bugs that are discovered in them and in ElasticSearch core.
If it's possible, the best practice is to use the latest available release (usually the more stable one).
A supported ElasticSearch Operative System (Linux/MacOSX/Windows) with installed Java JVM 1.6 or above is required. A web browser is required to download the ElasticSearch binary release.
For downloading and installing an ElasticSearch server, we will perform the steps given as follows:
The latest version is always downloadable from the web address http://www.elasticsearch.org/download/.
There are versions available for different operative systems:
elasticsearch-{version-number}.zip
: This is for both Linux/Mac OSX, and Windows operating systemselasticsearch-{version-number}.tar.gz
: This is for Linux/Macelasticsearch-{version-number}.deb
: This is for Debian-based Linux distributions (this also covers Ubuntu family)These packages contain everything to start ElasticSearch.
At the time of writing this book, the latest and most stable version of ElasticSearch was 0.90.7. To check out whether this is the latest available or not, please visit http://www.elasticsearch.org/download/.
After downloading the correct release for your platform, the installation consists of expanding the archive in a working directory.
Choose a working directory that is safe to charset problems and doesn't have a long path to prevent problems when ElasticSearch creates its directories to store the index data.
For windows platform, a good directory could be c:es
, on Unix and MacOSX /opt/es
.
To run ElasticSearch, you need a Java Virtual Machine 1.6 or above installed. For better performance, I suggest you use Sun/Oracle 1.7 version.
To start your ElasticSearch server, just go in the install directory and type:
# bin/elasticsearch –f (for Linux and MacOsX)
or
# binelasticserch.bat –f (for Windows)
Now your server should start as shown in the following screenshot:
The ElasticSearch package contains three directories:
bin
: This contains script to start and manage ElasticSearch. The most important ones are:elasticsearch(.bat)
: This is the main script to start ElasticSearchplugin(.bat)
: This is a script to manage pluginsconfig
: This contains the ElasticSearch configs. The most important ones are:elasticsearch.yml
: This is the main config file for ElasticSearchlogging.yml
: This is the logging config filelib
: This contains all the libraries required to run ElasticSearchDuring ElasticSearch startup a lot of events happen:
elasticsearch.yml
.whqVp_4zQGCgMvJ1CXhcWQ
).There are more events which are fired during ElasticSearch startup. We'll see them in detail in other recipes.
3.134.104.161