How Do I Install Longview on Rocky Linux or AlmaLinux?
I'm trying to install Longview however I'm receiving the following error:
Error: Failed to download metadata for repo 'longview': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried.
Status code: 404 for https://yum-longview.linode.com/almalinux/8/noarch/repodata/repomd.xml (IP: 188.8.131.52)
How can I successfully install Longview on my Linode?
Longview doesn't currently support AlmaLinux or Rocky Linux, however it is possible to get Longview working on either of those distributions by forcing the installer to use our CentOS 8 packages.
The simplest way to accomplish this is by pipe the installation command supplied by the Cloud Manager through
sed in order to force the installer to use the packages we want.
Note: Installation script URLs can only be accessed from their unique Cloud Manager URL once. If you visit or otherwise download the installation script for your Longview client, this method will not work. In that case, simply delete and generate a new Longview client to use the new URL.
Run the following two commands to install and restart Longview. You will need to replace the
lv.linode.com URL with the Longview URL provided to you by the Cloud Manager.
curl -s https://lv.linode.com/830BA357-C03C-4187-A23B7DAF3F58B861 | sed 's/\$DIST/centos/' | sed 's/\$REV/8/' | sudo bash systemctl restart longview
You should begin to see your data populate in your Longview client after a minute or so.
We also have a guide on manually installing Longview for those that are interested in manual installation. Following the steps for CentOS should allow you to install longview on both Rocky and AlmaLinux.
There's a tiny typo in the above, "by pipe[sic] the installation…", should be "by piping". (OK, I did say it was tiny. :-) )
It might also be really helpful to have a link to this page in the "Install the Longview agent" section of https://www.linode.com/docs/guides/what-is-longview/
P.S. Also, the italicized section about "simply delete and generate a new longview client…" might also benefit from a link to https://stackoverflow.com/questions/59857492/dnf-broken-all-mirrors-were-tried
… which is exactly what happened to me (and Linode staff very helpfully pointed me at that same article).