Elk — elasticsearch7.10.1 installation configuration

Time:2021-8-6

Environmental Science:

vmware

centos7

 

1. Download the appropriate es Version (you only need to change the cluster.name parameter for cluster installation)

 

 

https://www.elastic.co/cn/downloads/past-releases/elasticsearch-7-10-1

2. Since I downloaded the binary package, since the JDK comes with me from ES7, I don’t need to install the JDK separately. I can use it by decompressing it directly

tar -xf elasticsearch-7.10.1-linux-x86_64.tar.gz 

Move the decompressed es to the corresponding path and you can use it

Install the ES head plug-in. Because the installation method of ES7 is different, I installedelasticsearch-head-master

https://github.com/mobz/elasticsearch-head

After downloading, enter elasticseal head master

I will execute the following in this folder

The new version of the head plug-in requires nodejs support, so install nodejs

curl –silent –location https://rpm.nodesource.com/setup_10.x | bash –

yum install -y nodejs

Check whether nodejs is successfully installed

node -v

npm -v

Install grunt

npm install -g grunt-cli

npm install

Modify gruntfile.js and add hostname: ‘0.0.0.0’

server: {
    options: {
        hostname: '0.0.0.0',
        port: 9100,
        base: '.',
        keepalive: true
    }
}            

Modification_ Site / app.js, this. Prefs. Get (“app base_ uri”) || “localhost:9200”

this._super();
this.prefs = services.Preferences.instance();
this.base_uri = this.config.base_uri || this.prefs.get("app-base_uri") || "http://192.168.25.180:9200";

Move the directory to your es installation directory to facilitate future startup. Finally, start head

npm run start           
Nohup NPM run start

 

Es start

edit/usr/lib/systemd/system/elasticsearch.service, set startup and self startup

[Unit]
Description=The elasticsearch Application Platform
After=syslog.target network-online.target remote-fs.target nss-lookup.target
Wants=network-online.target

[Service]
Type=forking
PIDFile=/usr/local/elasticsearch/es.pid
ExecStart=/usr/local/elasticsearch/bin/elasticsearch -d -p /usr/local/elasticsearch/es.pid
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s QUIT $MAINPID
PrivateTmp=true
User=es
Group=es
LimitNOFILE=65535
LimitNPROC=65535
LimitAS=infinity
LimitFSIZE=infinity
TimeoutStopSec=0
KillSignal=SIGTERM
KillMode=process
SendSIGKILL=no
SuccessExitStatus=143
TimeoutStartSec=75
[Install]
WantedBy=multi-user.target

Note: the root user cannot be used to start es, so you need to create the ES user first

groupadd es
useradd es -g es

Start es and set startup self startup

systemctl start elasticseach.service
systemctl enable elasticseach.service

Finally, access in the browser:

http://194.168.50.80:9200

Head plug-in access address

http://194.168.50.80:9100

 

So far, ES7 and head plug-ins have been installed! Remember to optimize the JVM…..

Also optimize / etc / sysctl.conf

vm.max_map_count=524288

Execute sysctl – P to take effect

 

Installing the monitoring plug-in cerebro

https://github.com/lmenezes/cerebro/releases
unzip cerebro-0.8.4.zip
cd cerebro-0.8.4/
nohup bin/cerebro >/dev/null &

 

Recommended Today

Getting to know Android

Getting to know Android Know Android Android originally meant “robot”. Google designed the Android logo as a green robot, indicating that the Android system is in line with the concept of environmental protection. It is a lightweight, short and powerful mobile system, and an open system for mobile phones. Introduction to Android The Android operating […]