Install elasticsearch offline

#download package 
[root@localhost java-se-8u41-ri]# cat /etc/yum.repos.d/elasticsearch.repo
[elasticsearch]
name=Elasticsearch repository for 7.x packages
baseurl=https://artifacts.elastic.co/packages/7.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=0
autorefresh=1
type=rpm-md
[root@localhost java-se-8u41-ri]#
[root@localhost java-se-8u41-ri]# yum install --enablerepo=elasticsearch elasticsearch --downloadonly --downloaddir=/root/elastic
Loaded plugins: fastestmirror, langpacks
elasticsearch                                                                                                                                                                 | 1.3 kB  00:00:00
elasticsearch/primary                                                                                                                                                         | 115 kB  00:00:01
Loading mirror speeds from cached hostfile
 * base: mirror.kakao.com
 * extras: mirror.kakao.com
 * updates: mirror.kakao.com
elasticsearch                                                                                                                                                                                315/315
Resolving Dependencies
--> Running transaction check
---> Package elasticsearch.x86_64 0:7.6.2-1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=====================================================================================================================================================================================================
 Package                                           Arch                                       Version                                        Repository                                         Size
=====================================================================================================================================================================================================
Installing:
 elasticsearch                                     x86_64                                     7.6.2-1                                        elasticsearch                                     283 M

Transaction Summary
=====================================================================================================================================================================================================
Install  1 Package

Total download size: 283 M
Installed size: 475 M
Background downloading packages, then exiting:
경고: /root/elastic/elasticsearch-7.6.2-x86_64.rpm.18305.tmp: Header V4 RSA/SHA512 Signature, key ID d88e42b4: NOKEY==============================================-] 254 kB/s | 283 MB  00:00:00 ETA
Public key for elasticsearch-7.6.2-x86_64.rpm.18305.tmp is not installed
elasticsearch-7.6.2-x86_64.rpm                                                                                                                                                | 283 MB  00:19:39
exiting because "Download Only" specified 
#install openjdk
[root@localhost ~]# tar zxvf openjdk-8u41-b04-linux-x64-14_jan_2020.tar.gz
java-se-8u41-ri/
java-se-8u41-ri/src.z
 

#install elasticsearch
[root@localhost elastic]# rpm -ivh elasticsearch-7.6.2-x86_64.rpm
경고: elasticsearch-7.6.2-x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID d88e42b4: NOKEY
준비 중...                         ################################# [100%]
Creating elasticsearch group... OK
Creating elasticsearch user... OK
Updating / installing...
   1:elasticsearch-0:7.6.2-1          ################################# [100%]
### NOT starting on installation, please execute the following statements to configure elasticsearch service to start automatically using systemd
 sudo systemctl daemon-reload
 sudo systemctl enable elasticsearch.service
### You can start elasticsearch service by executing
 sudo systemctl start elasticsearch.service
Created elasticsearch keystore in /etc/elasticsearch
 
#config env
[root@localhost elastic]# vi /usr/share/elasticsearch/bin/elasticsearch-env
JAVA_HOME="/usr/share/java-se-8u41-ri"

[root@localhost elastic]# vi /etc/elasticsearch/elasticsearch.yml# 
---------------------------------- Cluster -----------------------------------
#
# Use a descriptive name for your cluster:
#
cluster.name: myes
#
# ------------------------------------ Node ------------------------------------
#
# Use a descriptive name for the node:
#
node.name: node-1
cluster.initial_master_nodes: node-1
#
# Add custom attributes to the node:
#
#node.attr.rack: r1
#
# ----------------------------------- Paths ------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#
path.data: /var/lib/elasticsearch
#
# Path to log files:
#
path.logs: /var/log/elasticsearch
#
# ----------------------------------- Memory -----------------------------------
#
# Lock the memory on startup:
#
#bootstrap.memory_lock: true
#
# Make sure that the heap size is set to about half the memory available
# on the system and that the owner of the process is allowed to use this
# limit.
#
# Elasticsearch performs poorly when the system is swapping the memory.
#
# ---------------------------------- Network -----------------------------------
#
# Set the bind address to a specific IP (IPv4 or IPv6):
#
#network.host: 192.168.0.126
network.host: 0.0.0.0
network.bind_host: 0.0.0.0
transport.host: 127.0.0.1
http.host: 0.0.0.0
#
# Set a custom port for HTTP:
#

#start elasticsearch 

[root@localhost elastic]# systemctl start elasticsearch
[root@localhost elasticsearch]# tail -f elasticsearch.log
[2020-04-07T22:21:10,407][INFO ][o.e.c.m.MetaDataIndexTemplateService] [node-1] adding template [.monitoring-es] for index patterns [.monitoring-es-7-*]
[2020-04-07T22:21:10,542][INFO ][o.e.c.m.MetaDataIndexTemplateService] [node-1] adding template [.monitoring-beats] for index patterns [.monitoring-beats-7-*]
[2020-04-07T22:21:10,642][INFO ][o.e.c.m.MetaDataIndexTemplateService] [node-1] adding template [.monitoring-alerts-7] for index patterns [.monitoring-alerts-7]
[2020-04-07T22:21:10,811][INFO ][o.e.c.m.MetaDataIndexTemplateService] [node-1] adding template [.monitoring-kibana] for index patterns [.monitoring-kibana-7-*]
[2020-04-07T22:21:10,902][INFO ][o.e.x.i.a.TransportPutLifecycleAction] [node-1] adding index lifecycle policy [watch-history-ilm-policy]
[2020-04-07T22:21:11,053][INFO ][o.e.x.i.a.TransportPutLifecycleAction] [node-1] adding index lifecycle policy [ilm-history-ilm-policy]
[2020-04-07T22:21:11,191][INFO ][o.e.x.i.a.TransportPutLifecycleAction] [node-1] adding index lifecycle policy [slm-history-ilm-policy]
[2020-04-07T22:21:11,544][INFO ][o.e.l.LicenseService     ] [node-1] license [fef04ff9-3e23-4fc4-8e27-ec9f8a2951fe] mode [basic] - valid
[2020-04-07T22:21:11,546][INFO ][o.e.x.s.s.SecurityStatusChangeListener] [node-1] Active license is now [BASIC]; Security is disabled




댓글

이 블로그의 인기 게시물

error You have $NVM_DIR set to "/root/.nvm", but that directory does not exist. Check your profile files and environment.

linux mint install xrdp

centos 6.x yum update problem making ssl connection