Skip to content

Instantly share code, notes, and snippets.

@Geoffrey-T
Last active December 27, 2015 11:09
Show Gist options
  • Save Geoffrey-T/7316586 to your computer and use it in GitHub Desktop.
Save Geoffrey-T/7316586 to your computer and use it in GitHub Desktop.
Elastic search

Elasticsearch

Mac Install

  • Download last version http://www.elasticsearch.org/download/
  • Extract in /usr/local/share/elasticsearch
  • cd /usr/local/share/
  • sudo chown -R root:wheel elasticsearch
  • cd elasticsearch
  • run start command : sudo bin/elasticsearch -f
  • try to access to http://localhost:9200/ (you must have something like {ok: true,status: 200, ...)
  • ES is ready !

Ubuntu Install

Install plugin JDBC (for mysql)

  • ./bin/plugin -install river-jdbc -url http://bit.ly/1iovWV9
  • Download mysql java connector on http://dev.mysql.com/downloads/connector/j/
  • copy .jar in elasticsearch/plugins/river-jdbc
  • !RESTART ElasticSearch!
  • You can have a connexion problem between Java and mysql -> - Go to your mysql conf file (/etc/mysql/my.conf) - remove line "skip-external-locking" to allow remote access (like java)

Plugin on Ubuntu

  • the elasticsearch folder is in /usr/share/elasticsearch
  • it's the same syntax to install a plugin
  • So go to your elasticsearch folder:
    • sudo bin/plugin -install river-jdbc -url http://bit.ly/1iovWV9
      • don't forget to copy jdbc connector .jar in plugins/river-jdbc
    • sudo bin/plugin -install mobz/elasticsearch-head

Divers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment