After downloading the latest release and extracting it,
elasticsearch can be started using:

$ bin/elasticsearch

Under *nix system, the command will start the process in the foreground.
To run it in the background, add the -d switch to it:

$ bin/elasticsearch -d

*NIX

There are added features when using the elasticsearch shell script.
The first, which was explained earlier, is the ability to easily run the
process either in the foreground or the background.

Another feature is the ability to pass -X and -D or getopt long style
configuration parameters directly to the script. When set, all override
anything set using either JAVA_OPTS or ES_JAVA_OPTS. For example:

Elasticsearch is built using Java, and requires at least
Java 7 in
order to run. Only Oracle’s Java and the OpenJDK are supported. The same JVM
version should be used on all Elasticsearch nodes and clients.

We recommend installing the Java 8 update 20 or later, or Java 7 update 55
or later. Previous versions of Java 7 are known to have bugs that can cause
index corruption and data loss. Elasticsearch will refuse to start if a
known-bad version of Java is used.

The version of Java to use can be configured by setting the JAVA_HOME
environment variable.