{"_id":"5aea329a228f8f00032ade8a","project":"5633ebff7e9e880d00af1a53","version":{"_id":"5a8fae0268264c001f20cc00","project":"5633ebff7e9e880d00af1a53","__v":4,"createdAt":"2018-02-23T06:00:34.961Z","releaseDate":"2018-02-23T06:00:34.961Z","categories":["5a8fae0268264c001f20cc01","5a8fae0268264c001f20cc02","5a8fae0368264c001f20cc03","5a8fae0368264c001f20cc04","5a8fae0368264c001f20cc05","5a8fae0368264c001f20cc06","5a8fae0368264c001f20cc07","5a8fae0368264c001f20cc08","5a8fae0368264c001f20cc09","5abaa7eb72d6dc0028a07bf3","5b8ee7842790f8000333f9ba","5b8ee8f244a21a00034b5cd9"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"2.0.0","version":"2.0"},"category":{"_id":"5a8fae0268264c001f20cc02","version":"5a8fae0268264c001f20cc00","project":"5633ebff7e9e880d00af1a53","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-12-23T20:06:16.013Z","from_sync":false,"order":4,"slug":"quickstart-guides-1","title":"Quickstart Guides"},"user":"5637d336aa96490d00a64f81","githubsync":"","__v":0,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-05-02T21:50:18.237Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":1,"body":"Do you need to test a certain analyzer or a new Elasticsearch feature? Testing locally is usually the fastest way to make iterative changes before pushing them to staging or production. Find your OS system below, and follow the instructions to get Elasticsearch running locally and connect to it.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"$ brew install elasticsearch\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\n##Windows\n\nWindows users can [download Elasticsearch](https://www.elastic.co/downloads/elasticsearch) as a ZIP file. Simply extract the contents of the ZIP file, and run `bin/elasticsearch.bat` to start up an instance. Note that you'll need Java installed and configured on your system in order for Elasticsearch to run properly.\n\nElasticsearch can also be run [as a service](https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-service-win.html) in Windows.\n\n##Linux\n\nThere are many Linux distributions out there, so the exact method of getting Elasticsearch installed will vary. Generally, you can [download](https://www.elastic.co/downloads/elasticsearch) a tarball of Elasticsearch, and extract the compressed contents to a folder. It should have all of the proper executable permissions set, so you can just run `bin/elasticsearch` to spin up an instance. Note that if you're managing Elasticsearch in Linux without a package manager, you'll need to ensure all the dependencies are met. Java 7+ is a hard requirement, and there may be others. \n\n### Arch Linux\nSome distributions have preconfigured Elasticsearch binaries available through repositories. Arch Linux, for example, offers it through the [community repo](https://www.archlinux.org/packages/community/any/elasticsearch/), and can be easily installed via pacman:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"$ sudo pacman -Syu elasticsearch\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\nThis package also comes with a systemd service file for starting/stopping Elasticsearch with `sudo systemctl <enable | start | restart| stop> elasticsearch.service`. \n\nOne caveat with Arch: packages are bleeding edge, which means updates are pushed out as they become available. Bonsai is *not* a bleeding edge service, so you'll need to be careful to version lock the Elasticsearch package to whatever version you're running on Bonsai. You may also need to edit the PKGBUILD and elasticsearch.install files to ensure you're running the same version locally and on Bonsai.\n\n### Ubuntu and Debian-flavors\nOther distros can use the DEB and RPM files that Elasticsearch offers on the [download](https://www.elastic.co/downloads/elasticsearch) page. Debian-based Linux distributions can use `dpkg` to install Elasticsearch (note that this doesn't handle configuring dependencies like Java):\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"# Update the package lists\\n$ sudo apt-get update\\n\\n# Make sure Java is installed and working:\\n$ java -version\\n\\n# If the version of Java shown is not 7+ (1.7+ if using OpenJDK),\\n# or it doesn't recognize java at all, you need to install it:\\n$ sudo apt-get install openjdk-7-jre\\n\\n# Download the DEB from Elasticsearch:\\n$ wget https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-X.Y.Z.deb\\n\\n# Install the DEB:\\n$ sudo dpkg -i elasticsearch-1.7.2.deb\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\nThis approach will install the configuration files to `/etc/elasticsearch/` and will add init scripts to `/etc/init.d/elasticsearch`.\n\n### Red Hat / Suse / Fedora / RPM\n\nElasticsearch does provide an RPM file for installing Elasticsearch on distros using rpm:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"# Download the package\\n$ wget https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-X.Y.Z.rpm\\n\\n# Install it\\n$ rpm -Uvh elasticsearch-X.Y.Z.rpm\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\n\n`rpm` should handle all of the dependency checks as well, so it will tell you if there is something missing.","excerpt":"How to test Elasticsearch on your local machine.","slug":"testing-elasticsearch-locally","type":"basic","title":"Testing Elasticsearch Locally"}

Testing Elasticsearch Locally

How to test Elasticsearch on your local machine.

Do you need to test a certain analyzer or a new Elasticsearch feature? Testing locally is usually the fastest way to make iterative changes before pushing them to staging or production. Find your OS system below, and follow the instructions to get Elasticsearch running locally and connect to it. [block:code] { "codes": [ { "code": "$ brew install elasticsearch", "language": "shell" } ] } [/block] ##Windows Windows users can [download Elasticsearch](https://www.elastic.co/downloads/elasticsearch) as a ZIP file. Simply extract the contents of the ZIP file, and run `bin/elasticsearch.bat` to start up an instance. Note that you'll need Java installed and configured on your system in order for Elasticsearch to run properly. Elasticsearch can also be run [as a service](https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-service-win.html) in Windows. ##Linux There are many Linux distributions out there, so the exact method of getting Elasticsearch installed will vary. Generally, you can [download](https://www.elastic.co/downloads/elasticsearch) a tarball of Elasticsearch, and extract the compressed contents to a folder. It should have all of the proper executable permissions set, so you can just run `bin/elasticsearch` to spin up an instance. Note that if you're managing Elasticsearch in Linux without a package manager, you'll need to ensure all the dependencies are met. Java 7+ is a hard requirement, and there may be others. ### Arch Linux Some distributions have preconfigured Elasticsearch binaries available through repositories. Arch Linux, for example, offers it through the [community repo](https://www.archlinux.org/packages/community/any/elasticsearch/), and can be easily installed via pacman: [block:code] { "codes": [ { "code": "$ sudo pacman -Syu elasticsearch", "language": "shell" } ] } [/block] This package also comes with a systemd service file for starting/stopping Elasticsearch with `sudo systemctl <enable | start | restart| stop> elasticsearch.service`. One caveat with Arch: packages are bleeding edge, which means updates are pushed out as they become available. Bonsai is *not* a bleeding edge service, so you'll need to be careful to version lock the Elasticsearch package to whatever version you're running on Bonsai. You may also need to edit the PKGBUILD and elasticsearch.install files to ensure you're running the same version locally and on Bonsai. ### Ubuntu and Debian-flavors Other distros can use the DEB and RPM files that Elasticsearch offers on the [download](https://www.elastic.co/downloads/elasticsearch) page. Debian-based Linux distributions can use `dpkg` to install Elasticsearch (note that this doesn't handle configuring dependencies like Java): [block:code] { "codes": [ { "code": "# Update the package lists\n$ sudo apt-get update\n\n# Make sure Java is installed and working:\n$ java -version\n\n# If the version of Java shown is not 7+ (1.7+ if using OpenJDK),\n# or it doesn't recognize java at all, you need to install it:\n$ sudo apt-get install openjdk-7-jre\n\n# Download the DEB from Elasticsearch:\n$ wget https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-X.Y.Z.deb\n\n# Install the DEB:\n$ sudo dpkg -i elasticsearch-1.7.2.deb", "language": "shell" } ] } [/block] This approach will install the configuration files to `/etc/elasticsearch/` and will add init scripts to `/etc/init.d/elasticsearch`. ### Red Hat / Suse / Fedora / RPM Elasticsearch does provide an RPM file for installing Elasticsearch on distros using rpm: [block:code] { "codes": [ { "code": "# Download the package\n$ wget https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-X.Y.Z.rpm\n\n# Install it\n$ rpm -Uvh elasticsearch-X.Y.Z.rpm", "language": "shell" } ] } [/block] `rpm` should handle all of the dependency checks as well, so it will tell you if there is something missing.