title: Installing ElasticSearch on Ubuntu 12.04
body: <p>I have a VM running Ubuntu 12.04, and am trying to install ElasticSearch. I have followed this <a href="https://gist.github.com/2026107" rel="nofollow">gist</a> in the best 'learn X the hard way' spirit, and everything installs fine - packages are downloaded, untarred, copied to right place etc. </p>
  
  <p>The problem comes when I run it - either by calling:</p>
  
  <pre><code>$ /usr/local/share/elasticsearch/bin/elasticsearch
  </code></pre>
  
  <p>or by using the service wrapper (<code>$ rselasticsearch console</code>)</p>
  
  <p>The output is logged to <code>wrapper.log</code> and is included below. I think that I may be having JAVA home / classpath issues, but am not sure.</p>
  
  <p>Any help most gratefully received!</p>
  
  <pre><code>Running ElasticSearch...
  wrapper  | Unable to write to the configured log directory: /usr/local/share/elasticsearch/logs (No such file or directory)
  wrapper  |   The directory does not exist.
  wrapper  | Unable to write to the configured log file: /usr/local/share/elasticsearch/logs/service.log (No such file or directory)
  wrapper  |   Falling back to the default file in the current working directory: wrapper.log
  wrapper  | --&gt; Wrapper Started as Console
  wrapper  | Java Service Wrapper Community Edition 32-bit 3.5.14
  wrapper  |   Copyright (C) 1999-2011 Tanuki Software, Ltd. All Rights Reserved.
  wrapper  |     http://wrapper.tanukisoftware.com
  wrapper  | 
  wrapper  | Launching a JVM...
  jvm 1    | WrapperManager: Initializing...
  jvm 1    | WrapperSimpleApp Error: Unable to locate the class org.elasticsearch.bootstrap.ElasticSearchF : java.lang.ClassNotFoundException: org.elasticsearch.bootstrap.ElasticSearchF
  jvm 1    | 
  jvm 1    | WrapperSimpleApp Usage:
  jvm 1    |   java org.tanukisoftware.wrapper.WrapperSimpleApp {app_class{/app_method}} [app_arguments]
  jvm 1    | 
  jvm 1    | Where:
  jvm 1    |   app_class:      The fully qualified class name of the application to run.
  jvm 1    |   app_arguments:  The arguments that would normally be passed to the
  jvm 1    |                   application.
  wrapper  | JVM exited while loading the application.
  ...
  wrapper  | There were 5 failed launches in a row, each lasting less than 300 seconds.  Giving up.
  wrapper  |   There may be a configuration problem: please check the logs.
  wrapper  | &lt;-- Wrapper Stopped
  </code></pre>
  
  <p><strong>Update</strong></p>
  
  <p>Given that we are now in 2016, the easiest way to run ES on Ubuntu is to use Docker. <code>docker run elasticsearch</code> will download the latest and run it in the foreground, and obviously you can run it as a daemon, or run a specific version (e.g. <code>elasticsearch:1.7.2</code>), and set the ports etc.</p>