Skip to content

Instantly share code, notes, and snippets.

@robwilkerson
Created June 19, 2013 13:15
Show Gist options
  • Save robwilkerson/5814249 to your computer and use it in GitHub Desktop.
Save robwilkerson/5814249 to your computer and use it in GitHub Desktop.
Installs Varnish. Tested in a Vagrant shell provisioner for a Ubuntu 12.04 VM.
# Install Varnish
if [ -z `command -v varnishd` ]; then
echo -n "Installing varnish (http://www.varnish-cache.org)..."
# curl http://repo.varnish-cache.org/debian/GPG-key.txt | sudo apt-key add - > /dev/null
# echo "deb http://repo.varnish-cache.org/ubuntu/ precise varnish-3.0" | sudo tee -a /etc/apt/sources.list > /dev/null
apt-get install varnish -qq -y > /dev/null
echo "complete."
else
echo "Varnish is aleady installed."
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment