In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the Linux system how to install ES, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.
Elasticsearch is a Lucene-based search server. It provides a full-text search engine with distributed multi-user capability, based on RESTful web interface.
Introduction to ES: Elasticsearch is a distributed, free and open source search and analysis engine suitable for all types of data, including text, numbers, geospatial, structured and unstructured data.
Elasticsearch was developed on the basis of Apache Lucene and was first released by Elasticsearch N.V. (now Elastic) in 2010.
Elasticsearch, known for its simple REST style API, distributed features, speed and scalability, is the core component of Elastic Stack; Elastic Stack is a set of free and open source tools for data acquisition, expansion, storage, analysis and visualization.
Second, jdk installation through the above introduction, we understand that Elasticsearch is developed using java, so if we want to use it, we first need an java environment. 1. Go to the Oracle official website to download the jdk version that needs to be installed. I use jdk_x64_linux_hotspot_11.0.8_10.tar.gz here. Here are the files in my network disk.
Link: https://pan.baidu.com/s/1R6gB5BPqQf5iOTSnz_WXDw extraction code: j3wk
two。 Put the package in the / www/server directory, then extract the package, and enter the following instructions:
Tar-zxvf jdk_x64_linux_hotspot_11.0.8_10.tar.gz 1 then renames the extracted folder to java 3. Next, it's time to configure the environment variables, enter the following instructions to configure:
[root@localhost home] # vi / etc/profile export JAVA_HOME=/www/server/java export CLASSPATH=.:$ {JAVA_HOME} / jre/lib/rt.jar:$ {JAVA_HOME} / lib/dt.jar:$ {JAVA_HOME} / lib/tools.jar export PATH=$PATH:$ {JAVA_HOME} / bin 1234 Note: the JAVA_HOME=/usr/local/java on the first line is to the right of the equal sign is your own jdk actual decompression directory. If it is not this directory, you need to change it to your own actual directory, and the rest remains the same.
4. After editing, save and exit, and then enter the following directive to refresh the environment configuration to take effect:
Source / etc/profile 1 can be tested now to see if the installation is successful. Type java on the command line, and if you output the following, the installation is successful.
3. Elasticsearch installation download the corresponding elasticsearch version from the official website. What I use here is 7.6. Here are my official website files.
Link: https://pan.baidu.com/s/1SGAuQThrhlg2AglFr9YQ3g extraction code: d8zi
1. First extract the compressed package elasticsearch-7.6.1-linux-x86_64.tar.gz tar-xvf elasticsearch-7.6.1-linux-x86_64.tar.gz 12. Enter the decompressed elasticsearch directory (1) create a new data
Mkdir data 1 (2) modify config/elasticsearch.yml
Vi config/elasticsearch.yml 1 cancels or modifies the following comments and modifies:
Cluster.name: my-application # Cluster name node.name: node-1 # Node name # Storage directory for data and logs path.data: / www/server/es/data path.logs: / www/server/es/logs # set the bound ip. After setting it to 0.0.0.0, any computer node can access network.host: 0.0.0.0 http.port: 9200 # Port # all node names set in the cluster This node name is previously modified, of course, you can also use the default, currently it is a stand-alone machine, put into a node can be cluster.initial_master_nodes: ["node-1"] 12345678910 modified,: wq save exit
3. Modify java's jvm memory configuration elasticsearch uses java's jvm uses 1G of memory by default, here we modify the memory, but if your configuration is enough, you don't need to modify it. My amendment is as follows:
Cd / www/server/es vi config/jvm.options-Xms512m-Xmx512m 1234
4. To create a user elasticsearch for elasticsearch, you cannot use the root user action, so here we need to create another user.
After useradd es passwd es enters the password twice, modify the owner chown-R es / www/server/es 1234vi editor / etc/security/limits.conf of the es directory, adding at the end:
Es soft nofile 65536 es hard nofile 65536 es soft nproc 4096 es hard nproc 4096 1234vi Editor / etc/security/limits.d/20-nproc.conf, change * to user name (es)
Es soft nproc 4096 root soft nproc unlimited 12vi editor / etc/sysctl.conf, with the following at the end:
Vm.max_map_count = 655360 1 execute under root user:
[root@localhost ~] # sysctl-p vm.max_map_count = 655360 [root@localhost ~] # 123Log in to the newly created es user and start elasticsearch, all OK
Su es # switch to es user. / bin/elasticsearch # start es 12
Thank you for reading this article carefully. I hope the article "how to install ES in Linux system" shared by the editor will be helpful to everyone. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
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.