Recently, the development team trained Elasticsearch, ready to launch a new project, I also went to gather the excitement, the following to record the learning process.
First, installation
1, the environment needs jdk1.8;
2. Download: Http://www.elastic.co/downloads/elasticsearch
3, after the completion of the end of the final decompression, decompression command:tar-vxf Elasticsearch-6.2.4.tar
Second, start Elasticsearch
Go to Folder: CD elasticsearch-6.2.4
Start command: Sh./bin/elasticsearch
As follows: Starting and started appear to start successfully, 127.0.0.1:9200 indicates default listening port 9200
In Browser input: 127.0.0.1:9200, the following appears to indicate that the startup was successful.
Third, interface plug-in head installation
1. Download from GitHub, address: Https://github.com/mobz/elasticsearch-head
2, terminal Ctrl + C, close Elasticsearch
3. Query node
As shown, my node version is too low, Nodejs is more than 6.0, so to upgrade
Upgrade node The first step is to install the N module, which is dedicated to managing the Nodejs version of the
sudo npm install-g n
To upgrade node to a stable version
sudo n Stable
This time node upgrade was pit, appeared segmentation fault:11 error, later resolved, directly with the n command to reset the version to use
9.3. 0
Unfortunately, and did not install success, but it doesn't matter, try several versions always have success, hehe ~ ~
Finally, I installed 9.11.0.
4. Start Plugin (NPM is the installation tool for node's package) input command: NPM run start
Enter Elasticsearch-head-master and then execute the command NPM run start.
Unfortunately, still unsuccessful, Ann, the following hint should mean no grunt
Grunt installed below, via NPM installation: Global installation installs GRUNT-CLI (not grunt, allows multiple versions of grunt to be installed)
NPM install-g GRUNT-CLI
However, executing the grunt command at this point will prompt command not found
This is typically an environment variable mismatch, reference article: https://www.cnblogs.com/jaina/p/6067464.html
The following is another run of NPM run start, the result is still a problem, error:unable to find local grunt.
(Problem solved: 25910919)
Execute command under Elasticsearch-head-master: NPM Install Grunt
After that, NPM run start again is wrong:
According to the great God, obediently install these modules.
Finally, run NPM run start and finally start the service:
Quickly enter in the browser: http://localhost:9100
Finally finished ...
Full-Text search engine Elasticsearch learning record: Install under Mac