In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
Environment CentOS7
JDK1.8 is installed
The elasticsearch6.2.2 used here as an example, you can also use version 5.6.1 or higher
1. It is best to extract ElasticSearch with non-root users. If you use root users, otherwise, the permissions and groups of files will be transferred to non-foot users in the future.
1) decompress elasticsearch-5.2.2.tar.gz to / opt/module directory
[root@hdp21 ~] # su asy
[asy@hdp21 root] $tar-zxvf elasticsearch-5.2.2.tar.gz-C / opt/module
2) create data and logs folders under the / opt/module/elasticsearch-5.2.2 path
Mkdir data
Mkdir logs
If you use a root account, please add a non-root account first, because elaticsearch cannot be run under a root account
User add asy
Chown-R asy:asy / opt/module/elasticsearch-5.2.2/
3) modify configuration file / opt/module/elasticsearch-5.2.2/config/elasticsearch.yml for root account
[root@hdp21 config] # pwd
/ opt/module/elasticsearch-5.2.2/config
[root@hdp21 config] # vi elasticsearch.yml
Modify the following parameters
-- Cluster--
Cluster.name: Asy
-- Node-- (three cannot be the same)
Node.name: node-1
-- Paths--
Path.data: / opt/module/elasticsearch-5.2.2/data
Path.logs: / opt/module/elasticsearch-5.2.2/logs
-- Memory--
Bootstrap.memory_lock: false
Bootstrap.system_call_filter: false
-- Network--
Network.host: hdp21
Http.port: 9200
-- Discovery--
Discovery.zen.ping.unicast.hosts: ["hdp21"]
Path.data
Paths to path.logs data and logs
Network.host ip address or host domain name address
Http.port port number
5) configure linux system environment (refer to:
(1) Edit limits.conf and add something like the following
[root@hdp21 config] # vi / etc/security/limits.conf
Add the following:
Soft nofile 65536hard nofile 131072soft nproc 2048hard nproc 4096
(2) go to the limits.d directory to modify the configuration file.
[root@hdp21 config] # vi / etc/security/limits.d/20-nproc.conf
Modify the following: if it exceeds 2048, you do not need to modify soft nproc 1024.
# modified to soft nproc 2048
(3) modify the configuration sysctl.conf
[root@hdp21 config] # vi / etc/sysctl.conf
Add the following configuration:
Vm.max_map_count=655360
Go back to the previous directory
And execute the command:
[root@hdp21 config] # cd..
[root@hdp21 elasticsearch-5.2.2] # pwd
/ opt/module/elasticsearch-5.2.2
[root@hdp21 elasticsearch-5.2.2] # sysctl-p
Then, restart elasticsearch to start successfully.
6) start elasticsearch
[asy@hdp21 elasticsearch-5.2.2] $bin/elasticsearch
Background startup mode
[asy@hdp21 elasticsearch-5.2.2] $bin/elasticsearch-d
7) Test elasticsearch
[root@hdp21 ~] # curl http://hdp21:9200
{
"name": "node1"
"cluster_name": "Asy"
"cluster_uuid": "8T7xJ-NLTbmYHOPKa3a4tA"
"version": {
"number": "5.2.2"
"build_hash": "f9d9b74"
"build_date": "2017-02-24T17:26:45.835Z"
"build_snapshot": false
"lucene_version": "6.4.1"
}
"tagline": "You Know, for Search"
}
When performing bin/elasticsearch
If there is an error report of max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
This corresponds to v/etc/security/limits.conf.
Soft nofile 65536
It has been modified, why not take effect?
Just re-enter the non-root user
Google browser debugging Elastic Search
Open more tools, extend programs, and open developer mode
Drag elasticsearch-head.crx into the browser window to complete the plug-in installation successfully
Enter http://192.168.234.21:9200/
Where 192.168.234.21 is the IP address of the linux host and 9200 is the port number
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.