当前位置:网站首页>elastic_ L02_ install
elastic_ L02_ install
2022-07-03 12:25:00 【jackaroo2020】
Reading guide
The description and explanation of this article are based on ElasticSearch 7.15.1 edition , Installed in the centos7 Environment , If the article configuration is different , Subject to the official website documents , Mainly about downloading 、 install 、 Description of operation and main configuration .
1. download
Official website download address
JVM To configure -config/jvm.options The default setting is 4GB
Configuration suggestions :Xmx Don't exceed the memory of the machine 50%, Don't exceed 30GB
2. install
Official website installation documents
# Download and install
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.15.1-linux-x86_64.tar.gz
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.15.1-linux-x86_64.tar.gz.sha512
shasum -a 512 -c elasticsearch-7.15.1-linux-x86_64.tar.gz.sha512
tar -xzf elasticsearch-7.15.1-linux-x86_64.tar.gz
cd elasticsearch-7.15.1/
# Install word segmentation plug-in
./bin/elasticsearch-plugin install analysis-icu
# Check the plugin
./bin/elasticsearch-plugin list
3. function
# start-up
./bin/elasticsearch
# verification ES Startup successful Check the process
ps -ef|grep es
# Access port verification :curl http://127.0.0.1:9200
{
"name" : "localhost.localdomain",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "_na_",
"version" : {
"number" : "7.15.1",
"build_flavor" : "default",
"build_type" : "tar",
"build_hash" : "83c34f456ae29d60e94d886e455e6a3409bba9ed",
"build_date" : "2021-10-07T21:56:19.031608185Z",
"build_snapshot" : false,
"lucene_version" : "8.9.0",
"minimum_wire_compatibility_version" : "6.8.0",
"minimum_index_compatibility_version" : "6.0.0-beta1"
},
"tagline" : "You Know, for Search"
}
# Running multiple instances
./bin/elasticsearch -d -E cluster.name=my_cluster -Enode.name=node_1
# Daemons start
./bin/elasticsearch -d -p pid
# close
pkill -F pid
4. problem
problem 1: user
Exception java.lang.RuntimeException: can not run elasticsearch as root
sudo userad es
sudo passwd es
sudo chown -R es:es elasticsearch-7.15.1
problem 2: File descriptor
bootstrap check failure [1] of [3]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]
# Additional content ; Log in the user again , Will take effect
cp /etc/security/limits.conf /etc/security/limits.conf.bak
echo "es soft nofile 65536" >> /etc/security/limits.conf
echo "es hard nofile 65536" >> /etc/security/limits.conf
problem 3: Number of threads
max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
# Additional content
cp /etc/sysctl.conf /etc/sysctl.conf.bak
echo "vm.max_map_count=655360" >> /etc/sysctl.conf
sysctl -p
problem 4: Node configuration
the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured
# stay elasticsearch.yml Uncomment keep a node
cluster.initial_master_nodes: ["node-1"]
边栏推荐
猜你喜欢
随机推荐
PHP export word method (one MHT)
Apprendre à concevoir des entités logicielles réutilisables à partir de la classe, de l'API et du cadre
How to deploy web pages to Alibaba cloud
242. Effective letter heteronyms
Differences between MySQL Union and union all
[embedded] - Introduction to four memory areas
Talk about the state management mechanism in Flink framework
pragma-pack语法与使用
Self made pop-up input box, input text, and click to complete the event.
shardingSphere分库分表<3>
Vulnhub's Nagini
PHP导出word方法(一mht)
ES6 standard
AOSP ~ NTP (Network Time Protocol)
The future of cloud computing cloud native
使用BLoC 构建 Flutter的页面实例
2.9 overview of databinding knowledge points
Laravel time zone timezone
Quantitative calculation research
OpenGL shader use








