当前位置:网站首页>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"]
边栏推荐
- 2020-09_ Shell Programming Notes
- QT OpenGL rotate, pan, zoom
- Vulnhub pyexp
- OpenGL draws colored triangles
- regular expression
- Basic knowledge of OpenGL (sort it out according to your own understanding)
- Systemverilog-- OOP--对象的拷贝
- (construction notes) ADT and OOP
- Prompt unread messages and quantity before opening chat group
- Introduction to concurrent programming (I)
猜你喜欢
Talk about the state management mechanism in Flink framework
Why can't my MySQL container start
QT OpenGL texture map
QT OpenGL rotate, pan, zoom
During FTP login, the error "530 login incorrect.login failed" is reported
[learning notes] DP status and transfer
Summary of development issues
Is BigDecimal safe to calculate the amount? Look at these five pits~~
【mysql官方文档】死锁
Socket TCP for network communication (I)
随机推荐
在网上炒股开户可以吗?资金安全吗?
Dart: view the dill compiled code file
(construction notes) grasp learning experience
239. Sliding window maximum
网上炒股开户安不安全?谁给回答一下
[MySQL special] read lock and write lock
LeetCode 0556.下一个更大元素 III - 4步讲完
2.8 overview of ViewModel knowledge
20. Valid brackets
Oracle advanced (I) realize DMP by expdp impdp command
(构造笔记)ADT与OOP
PHP export word method (phpword)
pragma-pack语法与使用
JVM memory model
102. Sequence traversal of binary tree
Talk about the state management mechanism in Flink framework
OpenGL draws colored triangles
AOSP ~ NTP (Network Time Protocol)
Quantitative calculation research
Redis notes 01: Introduction