Version ELK environment version: 7.4.0

1. Download the latest version of your computer from the official website address: download address

ES7.0 comes with JDK, so this machine can run without JDK installed.

2. Download the elasticSearch-7.4.0-linux-x86_64.tar. gz installation package and run the following command to decompress the package.

Tar - ZXVF elasticsearch 7.4.0 - Linux - x86_64. Tar. GzCopy the code

Generate ElasticSearch -7.4.0, go to the folder, and run the following command to start elasticSearch:

cdElasticsearch 7.4.0 vi config/elasticsearch. YmlCopy the code

To modify the configuration file, refer to the following parameters:

 # cluster name
cluster.name: my-application
# node name
node.name: node-1 
Create /home/hadoop/data directory
path.data: /home/hadoop/data
# Directory for storing logs
path.logs: /home/hadoop/logs
Allow any IP accessNetwork. The host: 0.0.0.0# port
http.port: 9200
The primary qualified node boots the cluster
cluster.initial_master_nodes: ["node-1"]
Copy the code

Path. data and path.logs must be created. Otherwise, an error will be reported

Node-1 of cluster.initial_master_nodes must be the same as node.name. Will report to find abnormal node org. Elasticsearch. Discovery. MasterNotDiscoveredException: null

Execute the startup command:

./bin/elasticsearch -dParameters:-dThe background to startCopy the code

3. Run curl http://localhost:9200/ or enter http://localhost:9200/ in the browser to view ES information. The following information is displayed:

4. The ES plug-in has been installed. Run the following command to install it:

cd// ElasticSearch -plugin install analysis-icu // Check elasticSearch -plugin list // Check elasticSearch -plugin list // Check elasticSearch -plugin list // Check elasticSearch -plugin list GET http://localhost:9200/_cat/plugins? vCopy the code

Problems encountered during installation

Question 1
[xiaoquan @ localhost elasticsearch - 7.4.0] $. / bin/elasticsearch Exceptionin thread "main" java.nio.file.AccessDeniedException: /usr/local/ Java/elastic/elasticsearch - 7.4.0 / config/JVM options at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:90) at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111) at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116) at java.base/sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:219) at java.base/java.nio.file.Files.newByteChannel(Files.java:374) at java.base/java.nio.file.Files.newByteChannel(Files.java:425) at java.base/java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:420) at java.base/java.nio.file.Files.newInputStream(Files.java:159) at org.elasticsearch.tools.launchers.JvmOptionsParser.main(JvmOptionsParser.java:61)Copy the code
To solve
This error occurs because the user does not have the permission to configure and start the ElasticSearch node. Chown -r xiaoquan:xiaoquan /usr/local/java/
Copy the code
Question 2
ERROR: [2] bootstrap checks failed
[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]
Copy the code
To solve
The elasticSearch user has at least 65536 permissions to create file descriptions. Procedure Solutions:Change to user root

vim /etc/security/limits.conf

# Append the following to the end* hard nofile 65536 * soft nofile 65536 After saving and exit, switch to normal user bootCopy the code
Question 3
[2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
Copy the code
To solve
Conf file and add vm.max_map_count=262144 vi /etc/sysctl.conf sysctl -p Run the sysctl -p command to take effectCopy the code
Question 4
system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk
 
Copy the code
To solve
Cause: Centos6 does not support SecComp, and ES5.2.1 uses bootstrap.system_call_filter by defaulttrueThe bootstrap.system_call_filter command is set to "bootstrap.system_call_filter" in elasticSearch. ymlfalseBootstrap. memory_lock: bootstrap.memory_lock:false
bootstrap.system_call_filter: false
 
Copy the code

Reference: www.jianshu.com/p/2bdf92ff4…