### download es
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.7.1-linux-x86_64.tar.gz
### os info
# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.4 LTS
Release: 18.04
Codename: bionic
root@es-node1:/home/gavin# uname -r
4.15.0-106-generic
10.135.111.23 es-node1
### modify hosts
echo '
10.135.111.23 es-node1
' >> /etc/hosts
###install
mkdir -p /opt/services
cd /opt/services
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.7.1-linux-x86_64.tar.gz
tar -zxvf elasticsearch-7.7.1-linux-x86_64.tar.gz
cd /opt/services/elasticsearch-7.7.1
mkdir -p /data/es/data
mkdir -p /data/es/log
### es-node1
# cat elasticsearch.yml|grep -v '#'
node.name: es-node1
path.data: /data/es/data
path.logs: /data/es/log
network.host: 10.135.111.23
http.port: 9200
#vi jvm.options
-Xms10g
-Xmx10g
groupadd elsearch
useradd elsearch -g elsearch
passwd elsearch
----anming123
chown -R elsearch.elsearch /opt/services/elasticsearch-7.7.1
chown -R elsearch.elsearch /data/es
$ cat elasticsearch.yml|grep -v '#'
node.name: es-node1
path.data: /data/es/data
path.logs: /data/es/log
network.host: 10.135.111.23
http.port: 9200
discovery.seed_hosts: ["es-node1"]
cluster.initial_master_nodes: ["es-node1"]
### start es node
su elsearch
nohup /opt/services/elasticsearch-7.7.1/bin/elasticsearch &
### access es
# curl 10.135.111.23:9200
{
"name" : "es-node1",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "D0nPAEMVTe-Bev2Gzm0Msg",
"version" : {
"number" : "7.7.1",
"build_flavor" : "default",
"build_type" : "tar",
"build_hash" : "ad56dce891c901a492bb1ee393f12dfff473a423",
"build_date" : "2020-05-28T16:30:01.040088Z",
"build_snapshot" : false,
"lucene_version" : "8.5.1",
"minimum_wire_compatibility_version" : "6.8.0",
"minimum_index_compatibility_version" : "6.0.0-beta1"
},
"tagline" : "You Know, for Search"
}
###install kibana on our local
wget https://artifacts.elastic.co/downloads/kibana/kibana-7.7.1-linux-x86_64.tar.gz
scp root@154.209.249.77:/tmp/kibana-7.7.1-linux-x86_64.tar.gz .
cd /opt/services/
tar -zxvf kibana-7.7.1-linux-x86_64.tar.gz
cd /opt/services/kibana-7.7.1-linux-x86_64
$vi config/kibana.yml
elasticsearch.hosts: ["http://10.135.111.23:9200"]
sudo chown -R elsearch.elsearch /opt/services/kibana-7.7.1-linux-x86_64
/opt/services/kibana-7.7.1-linux-x86_64/bin/kibana
nohup /opt/services/kibana-7.7.1-linux-x86_64/bin/kibana &
10.135.111.23:5601
### Could not close browser client handle!
log [03:21:32.223] [error][reporting] The Reporting plugin encountered issues launching Chromium in a self-test. You may have trouble generating reports.
log [03:21:32.224] [error][reporting] Error: Failed to launch chrome!
/opt/services/kibana-7.7.1-linux-x86_64/data/headless_shell-linux/headless_shell: error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory
sudo echo 'deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main' > /etc/apt/sources.list.d/google-chrome.list
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo apt update
sudo apt install google-chrome-stable
### error
[1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
bound or publishing to a non-loopback address, enforcing bootstrap checks
ERROR: [1] bootstrap checks failed
[1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
sudo echo 'vm.max_map_count=655360' >> /etc/sysctl.conf
sudo sysctl -p
master not discovered yet, this node has not previously joined a bootstrapped (v7+) cluster, and this node must discover master-eligible nodes [es-node1, es-node2, es-node3] to bootstrap a cluster: have discovered [{es-node1}{HHMg6XZ1QTqEtpKXJ9Gq8A}{rXGIlEl9TFWJ1NZx_15NEg}{10.135.111.23}{10.135.111.23:9300}{dilmrt}{ml.machine_memory=134780829696, xpack.installed=true, transform.node=true, ml.max_open_jobs=20}]; discovery will continue using [127.0.0.1:9300, 127.0.0.1:9301, 127.0.0.1:9302, 127.0.0.1:9303, 127.0.0.1:9304, 127.0.0.1:9305, [::1]:9300, [::1]:9301, [::1]:9302, [::1]:9303, [::1]:9304, [::1]:9305] from hosts providers and [{es-node1}{HHMg6XZ1QTqEtpKXJ9Gq8A}{rXGIlEl9TFWJ1NZx_15NEg}{10.135.111.23}{10.135.111.23:9300}{dilmrt}{ml.machine_memory=134780829696, xpack.installed=true, transform.node=true, ml.max_open_jobs=20}] from last-known cluster state; node term 0, last-accepted version 0 in term 0
discovery.seed_hosts: ["es-node1", "es-node2","es-node3"]