หลังจากได้ทดลองติดตั้งใช้งานเป็นที่น่าพอใจ จึงนำวิธีการติดตั้งมาเผยแพร่ครับ
หมายเหตุ: อันนี้ติดตั้งเฉพาะ http ที่ port 80 นะครับ สำหรับ https ที่ port 443 จะเข้าตรงที่ apache ไม่ผ่าน varnish
หมายเหตุ: เครื่องที่มีมากกว่า 1 ip อาจจะมีปัญหากับ virtual host template นะครับ เพราะไม่ได้ทดสอบ แต่น่าจะใช้งานได้ และต้องเพิ่ม bind ip ให้ varnish ด้วย
Varnish Cache is an open source, state of the art web application accelerator. You install it on your web server and it makes your website fly.
https://www.varnish-cache.org/
วิธีการติดตั้งนั้นจะใช้วิธี compile จาก source เอานะครับ ไม่ลงผ่าน yum หรือ apt
ขั้นตอนที่ 1 ติดตั้งและทดสอบการทำงานของ varnish ก่อนใช้งานจริง
1.1: เตรียม dependencies ที่ varnish ต้องการ
สำหรับ OS อื่นๆ ดูได้ที่ https://www.varnish-…rce-or-packages
สำหรับ CentOS
#yum -y install automake autoconf libtool ncurses-devel libxslt groff pcre-devel pkgconfig