## Install prerequisites to build Varnish and configure system path sudo port install automake libtool pkgconfig pcre export PATH="/opt/local/bin:/opt/local/sbin:$PATH" ## Make sure ~/src exists and then downloads and extracts Varnish there (change as required) mkdir -p ~/src && cd ~/src wget "http://downloads.sourceforge.net/project/varnish/varnish/2.1.3/varnish-2.1.3.tar.gz" tar xvzf varnish-2.1.3.tar.gz && cd varnish-2.1.3 ## Build Varnish with it's install location as /opt/local/ (change as required) ## For example, varnishd will be installed to /opt/local/sbin/ for neatness ./autogen.sh ./configure --prefix=/opt/local && make sudo make install