참고: https://www.varnish-cache.org/trac/wiki/Installation (Installing Varnish from source code)
m4 설치
# wget http://ftp.gnu.org/gnu/m4/m4-1.4.17.tar.gz
# tar zxvf m4-1.4.17.tar.gz
# cd m4-1.4.17
# ./configure --prefix=/usr
# make && make install
autoconf 설치
# wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
# tar zxvf autoconf-2.69.tar.gz
# cd autoconf-2.69
# ./configure --prefix=/usr
# make && make install
automake 설치
# cd /usr/local/src
# wget http://ftp.gnu.org/gnu/automake/automake-1.14.tar.gz
# tar zxvf automake-1.14.tar.gz
# cd automake-1.14
# ./configure --prefix=/usr
# make && make install
libtool 설치
# cd /usr/local/src
# wget ftp://ftp.gnu.org/gnu/libtool/libtool-2.4.2.tar.gz
# tar zxvf libtool-2.4.2.tar.gz
# cd libtool-2.4.2
# ./configure --prefix=/usr
# make && make install
ncurses 설치
# cd /usr/local/src
# wget http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.9.tar.gz
# tar zxvf ncurses-5.9.tar.gz
# cd ncurses-5.9
# ./configure --prefix=/usr
# make && make install
varnish 소스 설치
# cd /usr/local/src
# wget http://repo.varnish-cache.org/source/varnish-3.0.5.tar.gz
# tar zxvf varnish-3.0.5.tar.gz
# cd ../varnish-3.0.5
# ./autogen.sh
# ./configure
# make && make install
설치가 완료되면 설정 파일은 /etc/varnish 폴더에 있다.
(/etc/varnish/default.vcl)
varnish make시 아래와 같은 에러가 발생한다면 libedit-devel 설치해주자.
varnishadm.c:48:33: fatal error: editline/readline.h: No such file or directory
# yum install libedit-devel