Big Data Development Kango
--- Elasticsearch distributed installation steps
Need to be considered as a web elasticsearch-head mounted display so the first is the use of npm nodejs
-
wget https://npm.taobao.org/mirrors/node/v11.0.0/node-v11.0.0.tar.gz
-
tar -zxvf node-v11.0.0.tar.gz
-
cd node-v11.0.0
-
yum install gcc gcc-c++
-
./configure
-
Make
-
Make install
- Node -v
Start the installation elasticsearch
1. 3 virtual machine installation
2. Installation jdk
-
Extracting tar -zxvf elasticsearch6.2.2
-
Switch user su cm (elasticsearch not start at root)
- After starting the host can not access the treatment program (start command: sh elasticsearch in the bin directory)
a) 修改 config / elasticsearch.yml
cluster.name: es-app # cluster name, you can modify
node.name: es-1 # node name, self-modifying
network.host: 192.168.235.133 # host address, the local IP write here
http.port: 9200 # port
http.cors.enabled: true # Set cross-domain
http.cors.allow-origin: "*" # set access
b) can not be started and then start to see reason
[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
[2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
i. Question 1 system maximum file number is too low
Modify the file append vi /etc/security/limits.conf
cm soft nofile 65536
cm hard nofile 131072
cm soft nproc 4096
cm hard nproc 4096
ii. Question 2 virtual memory is too low
Modify vi /etc/sysctl.conf file append
vm.max_map_count=655360
Switch to root privileges
sysctl -p
iii. java.nio.file.AccessDeniedException: …/elasticsearch-6.2.2/config/jvm.options
chown username elasticsearch-6.2.2 installation directory path -R
- You can install elasticsearch-head monitor elasticsearch cluster environment
a) tar –zxvf elasticsearch-head-master
b) npm install
c) npm run start
- Node configuration from the server
cluster.name: es-app # cluster name, you can modify
node.name: es-2 # node name, self-modifying
network.host: 192.168.235.132 # host address, the local IP write here
http.port: 9200 # port
Command [ "192.168.235.133"] # Set cluster: discovery.zen.ping.unicast.hosts
- Similarly third node arranged
Start the installation LogStash
nodejs file is written in c, you need to yum install gcc gcc-c ++
And then directly make file to compile nodejs