Installation, running, and basic configuration of Elasticsearch
Elasticsearch is a superb real-time distributed search and analysis engine. It can help you process large-scale data at an unprecedented speed. It can be used for full-text search, structured search, and analysis. More importantly, it is easy to get started and the api is clear. According to the official introduction, currently Wikipedia, Github and StackOverflow all use Elasticsearch for search and analysis.
Elasticsearch is based on the full-text search engine Apache Lucene. It can be said that Lucene is the most advanced and efficient fully-functional open-source search engine framework today, but Lucene is only a framework, to make full use of its functions, you need high learning costs, because Lucene is indeed very complicated. Elasticsearch uses Lucene as its internal engine and encapsulates powerful RESTful APIs. This allows you to complete search without learning the complex logic behind it ......
Install java
Elasticsearch is based on java and java needs to be installed before use. First download rpm, I downloaded the jdk-7u67-linux-x64.rpm, after the download, execute:
- Rpm-ivh jdk-7u67-linux-x64.rpm
For more information about installation, see the official documentation.
Install Elasticsearch
Elasticsearch installation is also very simple. First download the compressed package:
- Wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.3.4.tar.gz
Decompress the package:
- Tar-xvf elasticsearch-1.3.4.tar.gz
- Cd elasticsearch-1.3.4
OK, it's that simple, and then you can run it directly:
- ./Bin/elasticsearch
Then accesshttp://localhost:9200/?pretty
, J, you can see a response similar to the following:
- {
- "Status": 200,
- "Name": "Shrunken Bones ",
- "Version ":{
- "Number": "1.4.0 ",
- "Inclue_version": "4.10"
- },
- "Tagline": "You Know, for Search"
- }
Your Elasticsearch is running.
Use elasticsearch-servicewrapper
It is not enough to run Elasticsearch. We need to install Elasticsearch as a service and set it to start automatically. This requires the use of elasticsearch-servicewrapper (of course there are other methods), the installation method is still simple, download and unzip from Github, directly put the service folder inelasticsearch-1.3.4/bin
Run the following command to install:
- Bin/service/elasticsearch install
Then you can start it:
- Bin/service/elasticsearch start
Simplest Configuration
Elasticsearch is very powerful. It can run on your notebook or be deployed on thousands of servers to process petabytes of data. You can use it directly without any configuration. In addition, the default configuration of Elasticsearch is quite good. We do not recommend you modify it blindly until you fully understand the principles of Elasticsearch. Below is a simple limitation on the memory, because I encountered a problem that cannot be started when installing small memory VPS.
Since we use elasticsearch-servicewrapper to start and run Elasticsearch, it is easy to limit the memory.bin/service/elasticsearch.conf
File, set it to the appropriate size:
- Set. default. ES_HEAP_SIZE = 1024
The unit here is MB. Generally, the limit of 50% of the total memory is better, because it will be left half for Lucene.
Last
Elasticsearch provides the "getting started to proficient" guide. For more information, see here.
ElasticSearch latest version 2.20 released and downloaded
Full record of installation and deployment of ElasticSearch on Linux
Elasticsearch installation and usage tutorial
ElasticSearch configuration file Translation
ElasticSearch cluster creation instance
Build a standalone and server environment for distributed search ElasticSearch
Working Mechanism of ElasticSearch
Use Elasticsearch + Logstash + Kibana to build a centralized Log Analysis Platform
Build an ELK Log Analysis System (Elasticsearch + Logstash + Kibana) on Ubuntu 14.04)
ElasticSearch details: click here
ElasticSearch: click here
This article permanently updates the link address: