Fast elastic install script:
#!/bin/bash
# Add users
sudo addgroup operator_user
sudo useradd operator_user-s /bin/bash -m -g operator_user -G sudo -p operator_password
# add APT keys and sources
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-7.x.list
# apt update && install all components
sudo apt-get update && sudo apt-get install -y apt-transport-https nano unzip ntpdate htop bwm-ng nfs-common elasticsearch && sudo apt upgrade -y
#restart service daemon
sudo /bin/systemctl daemon-reload
sudo /bin/systemctl enable elasticsearch.service
# configure elastic host
sudo mv /etc/elasticsearch/elasticsearch.yml /etc/elasticsearch/elasticsearch.yml.old
echo "
cluster.name: homenet
node.name: $HOSTNAME
node.attr.allocation: midnode.master: true
node.ingest: true
node.data: true
xpack.ml.enabled: false
path.data: [/es/]
path.logs: /var/log/elasticsearch/logs
bootstrap.memory_lock: true
network.host: _eth0:ipv4_
http.port: 59200
discovery.type: single-nodeaction.destructive_requires_name: true
xpack.security.audit.enabled: true
xpack.security.enabled: true
#xpack.security.transport.filter.allow:
xpack.security.transport.filter.deny: []
#xpack.security.http.filter.allow:
xpack.security.http.filter.deny: []
xpack.sql.enabled: true
xpack.security.transport.ssl.enabled: true
xpack.security.transport.ssl.verification_mode: full
xpack.security.transport.ssl.key: /etc/elasticsearch/certs/$HOSTNAME.key
xpack.security.transport.ssl.certificate: /etc/elasticsearch/certs/$HOSTNAME.crt
xpack.security.transport.ssl.certificate_authorities: [ "/etc/elasticsearch/certs/ca.crt" ]
xpack.security.http.ssl.enabled: true
xpack.security.http.ssl.key: /etc/elasticsearch/certs/$HOSTNAME.key
xpack.security.http.ssl.certificate: /etc/elasticsearch/certs/$HOSTNAME.crt
xpack.security.http.ssl.certificate_authorities: [ "/etc/elasticsearch/certs/ca.crt" ]
" | sudo tee -a /etc/elasticsearch/elasticsearch.yml
sudo chown elasticsearch:elasticsearch -R /es
echo '
elasticsearch - nofile 65535
'| sudo tee -a /etc/security/limits.conf
sudo mkdir /etc/systemd/system/elasticsearch.service.d/
echo '
[Service]
LimitMEMLOCK=infinity
'| sudo tee -a /etc/systemd/system/elasticsearch.service.d/override.conf
sudo systemctl daemon-reload
sudo swapoff -a
echo '
vm.max_map_count=262144
nproc=4096
'| sudo tee -a /etc/sysctl.conf
sudo mv /etc/elasticsearch/jvm.options /etc/elasticsearch/jvm.options.old
sudo sed 's/Xms1g/Xms4g/' /etc/elasticsearch/jvm.options.old | sudo tee /etc/elasticsearch/jvm.options
sudo mv /etc/elasticsearch/jvm.options /etc/elasticsearch/jvm.options.old
sudo sed 's/Xmx1g/Xmx4g/' /etc/elasticsearch/jvm.options.old | sudo tee /etc/elasticsearch/jvm.options
sudo mkdir /etc/elasticsearch/certs /es
echo Enter CA password:
sudo read pw && sudo /usr/share/elasticsearch/bin/elasticsearch-certutil ca --pem --out ca.zip --pass $capw
sudo unzip ca.zip
echo Enter cert password:
sudo read certpw && sudo /usr/share/elasticsearch/bin/elasticsearch-certutil cert --ca-cert ./ca/ca.crt --ca-key ./ca/ca.key --ca-pass $certpw --ip $(hostname -I| awk '{split($1,var,","); print var[1]}')
sudo cp ca/ca.crt /etc/elasticsearch/certs/
sudo unzip cert.zip
sudo cp instance/instance.crt /etc/elasticsearch/certs/$hostname.crt
sudo cp instance/instance.key /etc/elasticsearch/certs/$hostname.key
sudo chown elasticsearch:elasticsearch /etc/elasticsearch/certs/ /es -R
sudo chmod 700 /etc/elasticsearch/certs/ -R
Script downloads and installs elasticsearch in single node architecture.
What's a casino - DRM CD
ReplyDeleteThe Ultimate Guide to 상주 출장마사지 Playing Real Money Casinos — From the 광명 출장마사지 start, you couldn't 안양 출장샵 possibly want to leave the house. It 이천 출장샵 was 상주 출장샵 easy to play the slots. However,
Good postt
ReplyDelete