安装node
https://nodejs.org/en/download/
tar -xvf node-v6.10.0-linux-x64.tar.xz
mv node-v12.13.1-linux-x64 node-v12.13.1
建立软链
echo $PATH
ln -s /export/node/node-v12.13.1/bin/node /usr/bin/node
ln -s /export/node/node-v12.13.1/bin/npm /usr/bin/npm
下载:
[https://www.elastic.co/cn/downloads/elasticsearch]
设置淘宝镜像地址
启动关闭
nohup node index.js > myLog.log 2>&1 &
pkill node
安装
目录:/export/elk/elasticsearch/
复制集群
mv elasticsearch-7.5.0 elasticsearch-7.5.0-node01
cp -R elasticsearch-7.5.0-node01 elasticsearch-7.5.0-node02
vi elasticsearch.yml
设置权限
chmod -R 777 elasticsearch-7.5.0-node01
chmod -R 777 elasticsearch-7.5.0-node02
设置内存权限
vm.max_map_count=262144
修改配置文件
cluster.name: elk-cluster
node.name: node-1
cluster.name: elk-cluster
node.master: true
transport.tcp.port: 9300
network.host: 10.222.9.166
discovery.zen.minimum_master_nodes: 1 ##(节点数 / 2) + 1
cluster.name: elk-cluster
node.name: node-2
cluster.name: elk-cluster
node.master: false
transport.tcp.port: 9301
network.host: 10.222.9.166
http.port: 9201
discovery.zen.minimum_master_nodes: 1
discovery.zen.ping.unicast.hosts: ["10.222.9.166:9300"]
网友评论