Forem Creators and Builders 🌱

Cover image for Installing Forem on Ubuntu 18.04 (Part 6 - ElasticSearch)
Dawood Khan Masood
Dawood Khan Masood

Posted on

Installing Forem on Ubuntu 18.04 (Part 6 - ElasticSearch)

If there is anything you would like me to change, please comment. This section of the guide assumes you have already installed Redis from the previous article.

No Alt Text found!

Installing ElasticSearch

Use wget to download ElasticSearch debian package from the official website by typing:

$ wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.5.2-amd64.deb
Enter fullscreen mode Exit fullscreen mode

Install ElasticSearch by typing:

$ sudo dpkg -i elasticsearch-7.5.2-amd64.deb
Enter fullscreen mode Exit fullscreen mode

Configuration

To configure Elasticsearch to start automatically when the system boots up, type:

$ sudo /bin/systemctl daemon-reload
$ sudo /bin/systemctl enable elasticsearch.service
$ sudo systemctl start elasticsearch.service
Enter fullscreen mode Exit fullscreen mode

Testing ElasticSearch

Start by checking that the ElasticSearch service is running:

$ sudo systemctl status elasticsearch
Enter fullscreen mode Exit fullscreen mode

The output will be something like this:

● elasticsearch.service - Elasticsearch
   Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2020-08-23 06:31:46 UTC; 11min ago
     Docs: http://www.elastic.co
 Main PID: 6901 (java)
    Tasks: 49 (limit: 4671)
   CGroup: /system.slice/elasticsearch.service
           ├─6901 /usr/share/elasticsearch/jdk/bin/java -Des.networkaddress.cache.ttl=60 -Des.networkaddress.cache.
           └─7011 /usr/share/elasticsearch/modules/x-pack-ml/platform/linux-x86_64/bin/controller
Enter fullscreen mode Exit fullscreen mode

To verify ElasticSearch is active, type:

$ curl localhost:9200
Enter fullscreen mode Exit fullscreen mode

The output will be something like this:

{
  "name" : "instance-1",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "AT69_T_DTp_8FYJh4MXA",
  "version" : {
    "number" : "7.5.2",
    "build_flavor" : "default",
    "build_type" : "deb",
    "build_hash" : "cd1afcdf",
    "build_date" : "2020-01-15T12:11:52.313576Z",
    "build_snapshot" : false,
    "lucene_version" : "8.3.0",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },
  "tagline" : "You Know, for Search"
}
Enter fullscreen mode Exit fullscreen mode

Latest comments (2)

Collapse
 
akhil profile image
Akhil Naidu

Just came to check for your update 🤣🤣

Collapse
 
avalerionv profile image
Dawood Khan Masood

Thank you! :D

By the way are you having issue with the cache as well? Updates don't show up even after refreshing the page with Ctrl+F5.