I used the DigitalOcean 1-Click-Install Mastodon droplet, to set up a Mastodon instance. It has been working quite well. I have been attempting to set up Elasticsearch.
First I tested whether some or all of the Elasticsearch setup was already set up as part of the 1 Click Install image. I uncommented the following lines in mastodon/.env.production.sample:
ES_ENABLED=true ES_HOST=es ES_PORT=9200
That did not get search working with anything that might have come pre-installed in the image.
Next I followed these instructions in the tootsuite docs on Github.
When I reached the step to run
sudo apt update && sudo apt install elasticsearch, it said it was unable to locate the package.
I went back to the previous command,
sudo echo "deb https://artifacts.elastic.co/packages/6.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-6.x.list.
I opened up
/etc/apt/sources.list.d in an editor. Elasticsearch source had not been added to that source list.
apt-get update only shows sources for ubuntu, debian, and node_8.x.
So I tried surfing in a web browser to
https://artifacts.elastic.co/packages/6.x/apt. The browser said it was not found.
sudo apt-get install apt-transport-https worked just fine; that’s not the problem.
I went to the documentation on the elasticsearch website for how to install their deb package. The commands seem to be the same, except using 7.x instead of 6.x.
But this led to the same thing:
Unable to locate package elasticsearch.
Next I tried the option (still on the Elasticsearch installation documentation page) to download and install the package manually.
But still, when I ran:
sudo /bin/systemctl daemon-reload sudo /bin/systemctl enable elasticsearch.service
… it still said
Failed to enable unit: Unit file elasticsearch.service does not exist.
What next steps do you recommend?