1. Installation
Download the latest version elasticsearch in any directory, unzip
Go to directory execution bin under the Elasticsearch file
2, start encountering problems
Issue One: Warning prompt
[2016-11-06t16:27:21,712] [WARN] [O.e.b.jnanatives] Unable to install Syscall filter:
Java.lang.UnsupportedOperationException:seccomp unavailable:requires kernel 3.5+ with Config_seccomp and Config_ Seccomp_filter compiled in
At Org.elasticsearch.bootstrap.Seccomp.linuxImpl (seccomp.java:349) ~[elasticsearch-5.0.0.jar:5.0.0]
At Org.elasticsearch.bootstrap.Seccomp.init (seccomp.java:630) ~[elasticsearch-5.0.0.jar:5.0.0]
It was a warning that a large list of errors had been reported.
workaround : With the experience Linux version, there will be no such problem.
Question two: Error:bootstrap checks failed
Max file descriptors [4096] for elasticsearch process likely too low, increase to at least [65536]
Max number of threads [1024x768] for user [Lishang] likely too low, increase to at least [2048]
FIX: switch to root user, edit limits.conf add similar to the following content
Vi/etc/security/limits.conf
Add the following content:
* Soft Nofile 65536
* Hard Nofile 131072
* Soft Nproc 2048
* Hard Nproc 4096
issue three : max number of threads [1024x768] for user [lish] likely too low, increase to at least [2048]
Workaround: switch to the root user and go to the LIMITS.D directory to modify the configuration file.
Vi/etc/security/limits.d/90-nproc.conf
Modify the following content:
* Soft Nproc 1024
#修改为
* Soft Nproc 2048
issue four : Max virtual memory Areas Vm.max_map_count [65530] likely too low, increase to at least [262144]
fix : Switch to root user to modify configuration sysctl.conf
Vi/etc/sysctl.conf
Add the following configuration:
vm.max_map_count=655360
and execute the command:
Sysctl-p
Question five:max file descriptors [4096] for elasticsearch process likely too low, increase to at least [65536]
fix : Modify switch to root user modify configuration limits.conf Add the following two lines
Command : vi/etc/security/limits.conf
* Hard Nofile 65536
* Soft Nofile 65536
The user who switched to ES.
Then, restart Elasticsearch to start the success.
Question six:don‘t run elasticsearch as root.
Create Elsearch user groups and Elsearch users
Groupadd Elsearch
Useradd elsearch-g elsearch-p Elasticsearch
Change the user and group of Elasticsearch folder and internal file to Elsearch:elsearch
Switch to Elsearch user and restart
Vii. allow access to external networks
Modify the ELASTICSEARCH.YML configuration file to allow extranet access.
network.host:0.0.0.0
Eight, the background run
Finally, there is a small problem, if you install Elasticsearch on the server and you want to develop on the local machine, you will probably need to keep elasticsearch running while shutting down the terminal. The simplest way is to use Nohup. Press Ctrl + CFirst, stop the currently running Elasticsearch, and use the following command instead of running Elasticsearch
Nohup ./bin/elasticsearch &
Reference http://www.open-open.com/lib/view/open1451451639167.html
Linux Elasticsearch installation Issues