Elasticsearch - установка на CentOS 7
Материал из Wiki - Iphoster - the best ever hosting and support. 2005 - 2024
Elasticsearch - установка на CentOS 7
# rpm --import https://packages.elastic.co/GPG-KEY-elasticsearch # vi /etc/yum.repos.d/elasticsearch.repo [elasticsearch-2.x] name=Elasticsearch repository for 2.x packages baseurl=https://packages.elastic.co/elasticsearch/2.x/centos gpgcheck=1 gpgkey=https://packages.elastic.co/GPG-KEY-elasticsearch enabled=1
# yum repolist # yum install elasticsearch # systemctl daemon-reload # systemctl enable elasticsearch.service
Обязательно доустанавливаем Java 8:
# yum install java-1.8.0-openjdk.x86_64 # java -version openjdk version "1.8.0_101" OpenJDK Runtime Environment (build 1.8.0_101-b13) OpenJDK 64-Bit Server VM (build 25.101-b13, mixed mode)
Запускаем эластик:
# systemctl start elasticsearch # systemctl status elasticsearch ● elasticsearch.service - Elasticsearch Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: disabled) Active: active (running) since Tue 2016-07-26 04:01:02 EDT; 5s ago Docs: http://www.elastic.co Process: 693 ExecStartPre=/usr/share/elasticsearch/bin/elasticsearch-systemd-pre-exec (code=exited, status=0/SUCCESS) Main PID: 696 (java) CGroup: /system.slice/elasticsearch.service └─696 /bin/java -Xms256m -Xmx1g -Djava.awt.headless=true -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=... Jul 26 04:01:03 anton.test.com elasticsearch[696]: [2016-07-26 08:01:03,000][INFO ][node ] [Saturnyne] version[2.3.4]...24:31Z] Jul 26 04:01:03 anton.test.com elasticsearch[696]: [2016-07-26 08:01:03,001][INFO ][node ] [Saturnyne] initializing ... Jul 26 04:01:03 anton.test.com elasticsearch[696]: [2016-07-26 08:01:03,515][INFO ][plugins ] [Saturnyne] modules [reind...ites [] Jul 26 04:01:03 anton.test.com elasticsearch[696]: [2016-07-26 08:01:03,561][INFO ][env ] [Saturnyne] using [1] data... [ext4] Jul 26 04:01:03 anton.test.com elasticsearch[696]: [2016-07-26 08:01:03,562][INFO ][env ] [Saturnyne] heap size [989... [true] Jul 26 04:01:03 anton.test.com elasticsearch[696]: [2016-07-26 08:01:03,563][WARN ][env ] [Saturnyne] max file descr...[65536] Jul 26 04:01:05 anton.test.com elasticsearch[696]: [2016-07-26 08:01:05,429][INFO ][node ] [Saturnyne] initialized Jul 26 04:01:05 anton.test.com elasticsearch[696]: [2016-07-26 08:01:05,430][INFO ][node ] [Saturnyne] starting ... Jul 26 04:01:05 anton.test.com elasticsearch[696]: [2016-07-26 08:01:05,523][INFO ][transport ] [Saturnyne] publish_addres...1:9300} Jul 26 04:01:05 anton.test.com elasticsearch[696]: [2016-07-26 08:01:05,527][INFO ][discovery ] [Saturnyne] elasticsearch/...sOi2AXQ
# netstat -nlp | grep java tcp 0 0 127.0.0.1:9300 0.0.0.0:* LISTEN 696/java tcp 0 0 127.0.0.1:9200 0.0.0.0:* LISTEN 696/java
Проверка
# curl -X GET http://127.0.0.1:9200 { "name" : "Saturnyne", "cluster_name" : "elasticsearch", "version" : { "number" : "2.3.4", "build_hash" : "e455fd0c13dceca8dbbdbb1665d068ae55dabe3f", "build_timestamp" : "2016-06-30T11:24:31Z", "build_snapshot" : false, "lucene_version" : "5.5.0" }, "tagline" : "You Know, for Search" }
Link: