Full-text Search is the most common demand, Open-source Elasticsearch is currently the first choice of Full-text search Engine.
It's at the bottom of the open Source Library lucene, But we can't use Lucene directly. You must write the code yourself to invoke its interface.
The Elasticsearch is a Lucene package that provides the operator interface for the REST API and is very handy.
first, Install Java 8
Elasticsearch requires a Java 8 Environment.
If it is not installed, please refer to:
http://blog.csdn.net/justdoit_potato/article/details/77962670
second, Installation Elasticsearch
1. Download the compressed package
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.0.1.zip
2. Unzip
Unzip elasticsearch-6.0. 1. Zip
3. Start
./elasticsearch-6.0. 1/bin/elasticsearch
Possible error at startup: root user not allowed to run
Workaround:
1. Create a new user
AddUser [user]
2. Granting permissions to new users
chown -r [user] [elasticsearch installation directory]
3. Switch to a new user
su [user]
Complete.
third, Remote Access
By default, Elasticsearch only allows native access, if remote access is Required.
1. Open the configuration file
Vim elasticsearch-6.0. 1/config/elasticsearch.yml
2. Uncomment the Network.host configuration and change the value to 0.0.0.0
0.0. 0.0
3. may not start after the change, error:
Workaround:
1. sysctl.conf configuration file
VI /etc/sysctl.conf
Add or modify a configuration
Fs. file-max=655350 vm.max_map_count=655360
After saving settings take effect
// make effective sysctl-p
2. limits.conf configuration file
Vim/etc/security/limits.conf
Add configuration
655350 655350
4. Re-login to SSH and try to start Elasticsearch again.
To switch to a non-root user, start:
./elasticsearch-6.0. 1/bin/elasticsearch
Lucene learning-install Elasticsearch Server