{"id":3229,"date":"2019-06-05T15:47:00","date_gmt":"2019-06-05T12:47:00","guid":{"rendered":"https:\/\/kifarunix.com\/?p=3229"},"modified":"2019-06-08T17:39:34","modified_gmt":"2019-06-08T14:39:34","slug":"install-elasticsearch-7-on-fedora-30","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/install-elasticsearch-7-on-fedora-30\/","title":{"rendered":"Install Elasticsearch 7 on Fedora 30"},"content":{"rendered":"\n<p>In this guide, you are going to learn how to install Elasticsearch 7 on Fedora 30.&nbsp;We have covered similar installations in our previous guides.<\/p>\n\n\n\n<p><a rel=\"noreferrer noopener\" href=\"https:\/\/kifarunix.com\/install-elasticsearch-7-x-on-ubuntu-18-04-debian-9-8\/\" target=\"_blank\">Install Elasticsearch 7.x on Ubuntu 18.04\/Debian 9.8<\/a><\/p>\n\n\n\n<p><a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/kifarunix.com\/install-elasticsearch-7-x-on-centos-7-fedora-29\/\" target=\"_blank\">Install Elasticsearch 7.x on CentOS 7\/Fedora 29<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-elastic-stack-7-on-ubuntu-18-04-debian-9-8\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">Install Elastic Stack 7 on Ubuntu 18.04\/Debian 9.8<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Install Elasticsearch 7 on Fedora 30<\/h2>\n\n\n\n<p>You can install Elasticsearch using the tar.gz archive, RPM binary package or directly from RPM repository. We will discuss the use of RPM binary and RPM repository in this guide.<\/p>\n\n\n\n<p>Note that Elasticsearch comes bundled with its own version of JDK, hence no need to install Java.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"mce_3\">Install Elasticsearch 7 using RPM Repository<\/h3>\n\n\n\n<p>To install Elasticsearch 7 on Fedora 30 using the RPM repository, perform system update before proceeding<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>dnf update<br>dnf upgrade<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Import the Elasticsearch PGP Key<\/h4>\n\n\n\n<p>Once the system upgrade is done, run the command below to import the Elasticsearch PGP Signing Key.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>rpm --import https:\/\/artifacts.elastic.co\/GPG-KEY-elasticsearch<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Add Elasticsearch 7 RPM Repository<\/h4>\n\n\n\n<p>To add the Elasticsearch 7 repository on Fedora 30, run the command below<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cat > \/etc\/yum.repos.d\/elastic-7.x.repo &lt;&lt; EOF\n[elasticsearch-7.x]\nname=Elasticsearch repository for 7.x packages\nbaseurl=https:\/\/artifacts.elastic.co\/packages\/7.x\/yum\ngpgcheck=1\ngpgkey=https:\/\/artifacts.elastic.co\/GPG-KEY-elasticsearch\nenabled=1\nautorefresh=1\ntype=rpm-md\nEOF<\/code><\/pre>\n\n\n\n<p>Once you have created the Elasticsearch repository, update your system and install Elasticsearch.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>dnf update<br>dnf install elasticsearch<\/code><\/pre>\n\n\n\n<p>If the installation is successful, you should be able to see such an output snippet.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>...\nCreating elasticsearch group... OK\nCreating elasticsearch user... OK\n\n  Installing       : elasticsearch-7.1.1-1.x86_64                                                                                                  1\/1 \n  Running scriptlet: elasticsearch-7.1.1-1.x86_64                                                                                                  1\/1 \n### NOT starting on installation, please execute the following statements to configure elasticsearch service to start automatically using systemd\n sudo systemctl daemon-reload\n sudo systemctl enable elasticsearch.service\n### You can start elasticsearch service by executing\n sudo systemctl start elasticsearch.service\n\nCreated elasticsearch keystore in \/etc\/elasticsearch\n\n  Verifying        : elasticsearch-7.1.1-1.x86_64                                                                                                  1\/1 \n\nInstalled:\n  elasticsearch-7.1.1-1.x86_64                                                                                                                         \n\nComplete!<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Install Elasticsearch 7.x using RPM package<\/h2>\n\n\n\n<p>To manually install Elasticsearch 7.x on Fedora 30 sing RPM package, download the RPM package.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>wget https:\/\/artifacts.elastic.co\/downloads\/elasticsearch\/elasticsearch-7.1.1-x86_64.rpm<\/code><\/pre>\n\n\n\n<p>Next, download the checksum for verifying the integrity of the RPM package.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>wget https:\/\/artifacts.elastic.co\/downloads\/elasticsearch\/elasticsearch-7.1.1-x86_64.rpm.sha512\n<\/code><\/pre>\n\n\n\n<p>Run the integrity check by comparing the checksums. Before that, install&nbsp;<code>perl-Digest-SHA -y<\/code>&nbsp;which provides shasum for checksum comparison.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>dnf install perl-Digest-SHA -y\nshasum -a 512 -c elasticsearch-7.1.1-x86_64.rpm.sha512<\/code><\/pre>\n\n\n\n<p>If all is well, then you will get an OK output.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>elasticsearch-7.1.1-x86_64.rpm: OK<\/code><\/pre>\n\n\n\n<p>Next, Install Elasticsearch 7.x on Fedora 30<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>sudo dnf install .\/elasticsearch-7.1.1-x86_64.rpm<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Running Elasticsearch<\/h2>\n\n\n\n<p>Once the installation is done, you can start elasticsearch service by executing;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>systemctl daemon-reload<br>systemctl start elasticsearch<\/code><\/pre>\n\n\n\n<p>To stop or configure elasticsearch service to start automatically on system boot, run the commands below respectively.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>systemctl stop elasticsearch<br>systemctl enable elasticsearch<\/code><\/pre>\n\n\n\n<p>To check the status of Elasticsearch;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl status elasticsearch\n\u25cf elasticsearch.service - Elasticsearch\n   Loaded: loaded (\/usr\/lib\/systemd\/system\/elasticsearch.service; enabled; vendor preset: disabled)\n   Active: active (running) since Wed 2019-06-05 08:40:20 EAT; 37min ago\n     Docs: http:\/\/www.elastic.co\n Main PID: 27812 (java)\n    Tasks: 45 (limit: 2351)\n   Memory: 1.2G\n   CGroup: \/system.slice\/elasticsearch.service\n           \u251c\u250027812 \/usr\/share\/elasticsearch\/jdk\/bin\/java -Xms1g -Xmx1g -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitia>\n           \u2514\u250027873 \/usr\/share\/elasticsearch\/modules\/x-pack-ml\/platform\/linux-x86_64\/bin\/controller<\/code><\/pre>\n\n\n\n<p>If Elasticsearch fails with such error in the logs,<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>tail -f \/var\/log\/elasticsearch\/elasticsearch.log<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>...\n[2019-06-05T07:24:27,752][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [pdns.example.com] uncaught exception in thread [main]\norg.elasticsearch.bootstrap.StartupException: ElasticsearchException[Failed to create native process factories for Machine Learning]; nested: FileNotFoundException[\/tmp\/elasticsearch-5386718150248443450\/controller_log_24761 (No such file or directory)];\n        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:163) ~[elasticsearch-7.1.1.jar:7.1.1]\n...<\/code><\/pre>\n\n\n\n<p>You need to check if some Machine Learning X-pack controller Module libraries are missing. Hence, run the command below to verify this.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ldd \/usr\/share\/elasticsearch\/modules\/x-pack-ml\/platform\/linux-x86_64\/bin\/controller | grep \"not found\"\n\tlibcrypt.so.1 => not found\n\tlibcrypt.so.1 => not found\n\tlibcrypt.so.1 => not found<\/code><\/pre>\n\n\n\n<p>Therefore, to fix the issue, install the missing libraries. For this case, this libraries can sorted by install the <strong>libxcrypt-compat<\/strong>.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>dnf install libxcrypt-compat<\/code><\/pre>\n\n\n\n<p>Verify the missing libraries again.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ldd \/usr\/share\/elasticsearch\/modules\/x-pack-ml\/platform\/linux-x86_64\/bin\/controller | grep \"not found\"<\/code><\/pre>\n\n\n\n<p>Next, restart Elasticsearch and verify that it is actually running by executing the command below<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>curl -XGET localhost:9200\n{\n  \"name\" : \"pdns.example.com\",\n  \"cluster_name\" : \"elasticsearch\",\n  \"cluster_uuid\" : \"VmhyYe9KTnud1y4voHKdrg\",\n  \"version\" : {\n    \"number\" : \"7.1.1\",\n    \"build_flavor\" : \"default\",\n    \"build_type\" : \"rpm\",\n    \"build_hash\" : \"7a013de\",\n    \"build_date\" : \"2019-05-23T14:04:00.380842Z\",\n    \"build_snapshot\" : false,\n    \"lucene_version\" : \"8.0.0\",\n    \"minimum_wire_compatibility_version\" : \"6.8.0\",\n    \"minimum_index_compatibility_version\" : \"6.0.0-beta1\"\n  },\n  \"tagline\" : \"You Know, for Search\"\n}<\/code><\/pre>\n\n\n\n<p>Another Solution to fix this issue is by disabling the <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/master\/ml-settings.html\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"Machine learning (opens in a new tab)\">Machine learning<\/a> capability of Elasticsearch by appending the line <strong>xpack.ml.enabled: false<\/strong> to the Elasticsearch configuration file.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>echo \"<strong>xpack.ml.enabled: false<\/strong>\" &gt;&gt; \/etc\/elasticsearch\/elasticsearch.yml<\/code><\/pre>\n\n\n\n<p>If FirewallD is running, you need to open tcp port 9200 on it.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>sudo firewall-cmd --add-port=9200\/tcp --permanent<br>sudo firewall-cmd --reload<\/code><\/pre>\n\n\n\n<p>Great, that is all it takes to install Elasticsearch 7 on Fedora 30.<\/p>\n\n\n\n<p>Check our other articles by following the links below;<\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-and-configure-logstash-7-on-ubuntu-18-debian-9-8\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">Install and Configure Logstash 7 on Ubuntu 18\/Debian 9.8<\/a><\/p>\n\n\n\n<p><a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/kifarunix.com\/install-and-configure-filebeat-7-on-ubuntu-18-04-debian-9-8\/\" target=\"_blank\">Install and Configure Filebeat 7 on Ubuntu 18.04\/Debian 9.8<\/a><\/p>\n\n\n\n<p><a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/kifarunix.com\/install-and-setup-tig-stack-on-fedora-30\/\" target=\"_blank\">Install and Setup TIG Stack on Fedora 30<\/a><\/p>\n\n\n\n<p><a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/kifarunix.com\/install-graylog-3-0-on-centos-7\/\" target=\"_blank\">Install Graylog 3.0 on CentOS 7<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-grafana-6-2-x-on-ubuntu-18-04-debian-9\/\">Install Grafana 6.2.x on Ubuntu 18.04\/Debian 9<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this guide, you are going to learn how to install Elasticsearch 7 on Fedora 30.&nbsp;We have covered similar installations in our previous guides. Install<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[910,72],"tags":[912,911,913,924],"class_list":["post-3229","post","type-post","status-publish","format-standard","hentry","category-elastic-stack","category-monitoring","tag-elastic-stack","tag-elasticsearch-7-0","tag-elk","tag-fedora-30","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50"],"_links":{"self":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/3229"}],"collection":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=3229"}],"version-history":[{"count":3,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/3229\/revisions"}],"predecessor-version":[{"id":3253,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/3229\/revisions\/3253"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=3229"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=3229"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=3229"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}