To install varnish on centos or redhat
#!/bin/bash echo "Adding Varnish Repository and installing varnish" rpm --nosignature -i http://repo.varnish-cache.org/redhat/varnish-3.0/el5/noarch/varnish-release-3.0-1.noarch.rpm > /dev/null 2>&1 yum -q -y install varnish echo "Varnish installed." chkconfig varnish on echo "Fetching standard Varnish config from Cloud Files..." sed -i 's/VARNISH_LISTEN_PORT=6081/VARNISH_LISTEN_PORT=80/g' /etc/sysconfig/varnish wget --quiet -P /etc/varnish/ http://c460059.r59.cf2.rackcdn.com/cent_default3.vcl mv -f /etc/varnish/default.vcl /etc/varnish/default.vcl.orig mv -f /etc/varnish/cent_default3.vcl /etc/varnish/default.vcl echo "Varnish Configured."