Skip to content

Commit

Permalink
Install varnish on centos7 (#874)
Browse files Browse the repository at this point in the history
* Install varnish on centos7

* Remove comment from install script in centos
  • Loading branch information
Sam DeHaan authored Sep 27, 2022
1 parent d1f43be commit dcf9219
Showing 1 changed file with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,8 +1,24 @@
set -e

# Centos Stream / RHEL 8: Varnish 6.0.8
source /etc/os-release
if [ "$ID" = centos ] && [ "$VERSION_ID" = 7 ]; then
sudo yum install -y epel-release
sudo tee /etc/yum.repos.d/varnishcache_varnish60lts.repo > /dev/null <<-EOF
[varnishcache_varnish60lts]
name=varnishcache_varnish60lts
baseurl=https://packagecloud.io/varnishcache/varnish60lts/el/${VERSION_ID%%.*}/$(arch)
repo_gpgcheck=0
gpgcheck=0
enabled=1
gpgkey=https://packagecloud.io/varnishcache/varnish60lts/gpgkey
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300
EOF
fi

sudo yum install -y varnish nginx curl

sudo systemctl enable --now varnish
sudo systemctl enable --now nginx

Expand Down

0 comments on commit dcf9219

Please sign in to comment.