In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article shows you the operation process of Elasticsearch7.3 installation and configuration, which is concise and easy to understand, which will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.
1. Installation of jdk
1. Download jdk
.JDK download address: click to download directly to the official website, please add a link description
two。 Extract and install
Tar-zxvf jdk-11.0.4_linux-x64_bin.tar.gz
Mkdir-p / usr/local/jdk/
Mv jdk-11.0.4 / usr/local/jdk/
3. Configure environment variables
Vi / etc/profile
Export JAVA_HOME=/usr/local/jdk/jdk-11.0.4
Export PATH=$JAVA_HOME/bin:$PATH
Export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib
4. Compile
Source / etc/profile
5. View
Java-version
II. Es installation and configuration
1. download
Wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.3.0-linux-x86_64.tar.gz
two。 Decompression
Tar-zxvf elasticsearch-7.3.0-linux-x86_64.tar.gz
Create a new account and authorize
Elasticsearch # requires that it cannot be run with superuser root, so we set up a test account
Groupadd testes
Useradd testesuser-g testes-p 123456 then authorizes the elasticsearch directory to the testesuser user. Chown-R testesuser:testes / usr/local/es/ changes to the elasticsearch directory and runs su testesuser as the testesuser user, which is specifically used for es operations, such as start, pause, etc. 4. The startup service goes to the bin folder under the es installation directory to run elasticsearch. If you want to run it in the background, adding-dmenes will start http port 9200 and tcp 9300 port 5 by default. Add firewall-cmd-- zone=public-- add-port=9200/tcp-- permanent firewall-cmd-- zone=public-- add-port=9300/tcp-- permanent firewall-cmd-- reload6. Test method 1 is tested directly through the browser
Method 2 curl test
Curl http://localhost:9200
III. Description of directory structure
Home directory: represented by $ES_HOME
Bin/: location $ES_HOME/bin, which contains scripts such as elasticsearch and elasticsearch-plugin
Conf/: location $ES_HOME/config, which contains the configuration files elasticsearch.yml and log4j2.properties, specified using path.conf
Data/: location $ES_HOME/data, which contains the data file for each index/shard. You can specify multiple locations, using path.data.
Logs/: location $ES_HOME/logs, specified using path.logs
Plguins/: location $ES_HOME/plugins
Repo/: specified using path.repo, there is no default location, which represents the location of the shared file system repository. You can specify multiple locations.
Script/: location $ES_HOME/scripts, specified using path.scripts.
Fourth, start the service to report and solve the error.
1.curl port error
. Curl http://192.168.43.96:9200 refuses to connect
The default is 127.0.0.1, and the configuration file needs to be modified.
Network.host: 192.168.43.96
Http.port: 9200
2.ERROR: bootstrap checks failed
Max file descriptors [10240] for elasticsearch process likely too low, increase to at least [65536]
Switch to root user
Vi / etc/security/limits.conf
# add the following:
Soft nofile 65536
Hard nofile 131072
Soft nproc 4096
Hard nproc 4096
Modify / etc/sysctl.conf
# add the following configuration:
Vm.max_map_count=655360
Execute the command:
Sysctl-p
Note: if an exception is still prompted
Max file * *
Max number * *
Max virtual * *
It can be solved by adjusting the parameters of the above file according to the prompt.
Sysctl-p execute this command after saving
3.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
Modify XX-nproc.conf (different machines have different XX, you can check cd / etc/security/limits.d/ first)
Vi / etc/security/limits.d/20-nproc.conf* soft nproc 4096 (changed to 4096, originally 1024) add configuration items to elasticsearch.yml: bootstrap.system_call_filter is false:bootstrap.memory_lock: falsebootstrap.system_call_filter: falsecluster.initial_master_nodes: ["node-1"] the above is the operation process of Elasticsearch7.3 installation and configuration. Have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.