0

I want to install varnish cache 6 in Amazon Linux 2023.

Sudo dnf install varnish

Above command returns no packages found message.

Tried with direct rpm package installation but it failed to resolve so many dependencies.

Even tried with packagecloud repo, but all methods failed to install as some dependencies always missing.

Please advise if anybody knows the correct way to install varnish cache in Amazon linux 2023

Duke
  • 123
  • 1
  • 5

2 Answers2

0

The usual way to install package not from repo and get in consideration dependencies is to use command:

yum localinstall path://to/varnish.rpm

where the path can be URL or filesystem path

Romeo Ninov
  • 5,263
  • 4
  • 20
  • 26
0

While there are no official Varnish packages for Amazon Linux, you could try installing an EL9 package manually.

There's no guarantee on 100% compatibility, but I did manage to install it and run varnishd.

FYI: https://packagecloud.io/varnishcache is the place to find official Varnish packages.

Copy the URL of the download link and wget the RPM file on your server. Then you can install it using sudo dnf install.

Example using Varnish Cache 7.3

Here's an example using Varnish Cache 7.3:

sudo wget -O varnish.rpm https://packagecloud.io/varnishcache/varnish73/packages/el/9/varnish-7.3.0-1.el9.x86_64.rpm/download.rpm?distro_version_id=240

sudo dnf install varnish.rpm

Use Red Hat, Ubuntu or Debian instead

If you do want to make sure you can use official packages with 100% compatibility, you should consider switching to Red Hat, Ubuntu or Debian images on AWS.

See https://www.varnish-software.com/developers/tutorials/#installations for install guides.

Official Varnish AWS images

You could also use one of the official Varnish Software AWS images. Go to https://www.varnish-software.com/developers/tutorials/#cloud for install instructions for Debian or Red Hat.

FYI: the official AWS images will install Varnish Enterprise, the commercial version of Varnish. There will be an additional monthly license fee that is charged on top of the infrastructure cost. See https://docs.varnish-software.com/varnish-enterprise/ for more information about Varnish Enterprise features.

Thijs Feryn
  • 1,166
  • 4
  • 5