This guide helped me a lot:

After first installing with this parameter:

export ES_SKIP_SET_KERNEL_PARAMETERS=true && apt-get install elasticsearch

I then used the linked guide.

Important parts:

sudo vim /etc/elasticsearch/elasticsearch.yml

Edit the file as below: my-application node-1

# --------------------------------------------------------------------------------

# Enable security features false false

# Enable encryption for HTTP API client connections, such as Kibana, Logstash, and Agents
  enabled: false
  keystore.path: certs/http.p12

# Enable encryption and mutual authentication between cluster nodes
  enabled: false

Also, edit the JVM options to set the memory limits:

$ sudo vi /etc/elasticsearch/jvm.options

By karlo