{"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
In this guide, you are going to learn how to install Elasticsearch 7 on Fedora 30. We have covered similar installations in our previous guides.<\/p>\n\n\n\n
Install Elasticsearch 7.x on Ubuntu 18.04\/Debian 9.8<\/a><\/p>\n\n\n\n Install Elasticsearch 7.x on CentOS 7\/Fedora 29<\/a><\/p>\n\n\n\n Install Elastic Stack 7 on Ubuntu 18.04\/Debian 9.8<\/a><\/p>\n\n\n\n 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 Note that Elasticsearch comes bundled with its own version of JDK, hence no need to install Java.<\/p>\n\n\n\n To install Elasticsearch 7 on Fedora 30 using the RPM repository, perform system update before proceeding<\/p>\n\n\n\n Once the system upgrade is done, run the command below to import the Elasticsearch PGP Signing Key.<\/p>\n\n\n\n To add the Elasticsearch 7 repository on Fedora 30, run the command below<\/p>\n\n\n\n Once you have created the Elasticsearch repository, update your system and install Elasticsearch.<\/p>\n\n\n\n If the installation is successful, you should be able to see such an output snippet.<\/p>\n\n\n\n To manually install Elasticsearch 7.x on Fedora 30 sing RPM package, download the RPM package.<\/p>\n\n\n\n Next, download the checksum for verifying the integrity of the RPM package.<\/p>\n\n\n\n Run the integrity check by comparing the checksums. Before that, install If all is well, then you will get an OK output.<\/p>\n\n\n\n Next, Install Elasticsearch 7.x on Fedora 30<\/p>\n\n\n\n Once the installation is done, you can start elasticsearch service by executing;<\/p>\n\n\n\n To stop or configure elasticsearch service to start automatically on system boot, run the commands below respectively.<\/p>\n\n\n\n To check the status of Elasticsearch;<\/p>\n\n\n\n If Elasticsearch fails with such error in the logs,<\/p>\n\n\n\n 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 Therefore, to fix the issue, install the missing libraries. For this case, this libraries can sorted by install the libxcrypt-compat<\/strong>.<\/p>\n\n\n\n Verify the missing libraries again.<\/p>\n\n\n\n Next, restart Elasticsearch and verify that it is actually running by executing the command below<\/p>\n\n\n\n Another Solution to fix this issue is by disabling the Machine learning<\/a> capability of Elasticsearch by appending the line xpack.ml.enabled: false<\/strong> to the Elasticsearch configuration file.<\/p>\n\n\n\n If FirewallD is running, you need to open tcp port 9200 on it.<\/p>\n\n\n\n Great, that is all it takes to install Elasticsearch 7 on Fedora 30.<\/p>\n\n\n\n Check our other articles by following the links below;<\/p>\n\n\n\n Install and Configure Logstash 7 on Ubuntu 18\/Debian 9.8<\/a><\/p>\n\n\n\n Install and Configure Filebeat 7 on Ubuntu 18.04\/Debian 9.8<\/a><\/p>\n\n\n\n Install and Setup TIG Stack on Fedora 30<\/a><\/p>\n\n\n\nInstall Elasticsearch 7 on Fedora 30<\/h2>\n\n\n\n
Install Elasticsearch 7 using RPM Repository<\/h3>\n\n\n\n
dnf update
dnf upgrade<\/code><\/pre>\n\n\n\nImport the Elasticsearch PGP Key<\/h4>\n\n\n\n
rpm --import https:\/\/artifacts.elastic.co\/GPG-KEY-elasticsearch<\/code><\/pre>\n\n\n\n
Add Elasticsearch 7 RPM Repository<\/h4>\n\n\n\n
cat > \/etc\/yum.repos.d\/elastic-7.x.repo << 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
dnf update
dnf install elasticsearch<\/code><\/pre>\n\n\n\n...\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
Install Elasticsearch 7.x using RPM package<\/h2>\n\n\n\n
wget https:\/\/artifacts.elastic.co\/downloads\/elasticsearch\/elasticsearch-7.1.1-x86_64.rpm<\/code><\/pre>\n\n\n\n
wget https:\/\/artifacts.elastic.co\/downloads\/elasticsearch\/elasticsearch-7.1.1-x86_64.rpm.sha512\n<\/code><\/pre>\n\n\n\n
perl-Digest-SHA -y<\/code> which provides shasum for checksum comparison.<\/p>\n\n\n\n
dnf install perl-Digest-SHA -y\nshasum -a 512 -c elasticsearch-7.1.1-x86_64.rpm.sha512<\/code><\/pre>\n\n\n\n
elasticsearch-7.1.1-x86_64.rpm: OK<\/code><\/pre>\n\n\n\n
sudo dnf install .\/elasticsearch-7.1.1-x86_64.rpm<\/code><\/pre>\n\n\n\n
Running Elasticsearch<\/h2>\n\n\n\n
systemctl daemon-reload
systemctl start elasticsearch<\/code><\/pre>\n\n\n\nsystemctl stop elasticsearch
systemctl enable elasticsearch<\/code><\/pre>\n\n\n\nsystemctl 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
tail -f \/var\/log\/elasticsearch\/elasticsearch.log<\/code><\/pre>\n\n\n\n
...\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
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
dnf install libxcrypt-compat<\/code><\/pre>\n\n\n\n
ldd \/usr\/share\/elasticsearch\/modules\/x-pack-ml\/platform\/linux-x86_64\/bin\/controller | grep \"not found\"<\/code><\/pre>\n\n\n\n
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
echo \"xpack.ml.enabled: false<\/strong>\" >> \/etc\/elasticsearch\/elasticsearch.yml<\/code><\/pre>\n\n\n\n
sudo firewall-cmd --add-port=9200\/tcp --permanent
sudo firewall-cmd --reload<\/code><\/pre>\n\n\n\n