Install Varnish Cache To Speed Up Apache Performance
Varnish is a proxy and Cache or High performance HTTP accelerator. Varnish Cache stores web pages in memory. So web server don’t have to create the same web page to server again and again. Varnish Cache serves much faster than any application Server.
Check Out : Configure Varnish To Work With Apache
Varnish Cache is a part of Epel repository. So you must have installed Epel repository on your machine. If you don’t install pygpgme, GPG ,verification won’t work.
Step 1: Install pygpgme package which allows you to handle GPG signatures, and yum-utils which contains the tool you need for installing source RPMs.
yum install pygpgme yum-utils -y
Check Out : Mount ISO Image Linux In Vmware
Step 2 : Install the Varnish
yum install varnish -y
Varnish-4.0.5-1 has been installed.
Step 3 : Start the service and enable it for running at boot
systemctl start varnish && systemctl enable varnish
Check Version using varnish -V
Step 4: Configuration of Varnish
Check Out : SElinux “ Semanage Command Not found “
The Varnish configuration files are located at /etc/varnish/ directory in CentOS 7. By default, Varnish listen on Port 6081.
Now you will have to change it to 80 So website requests access the varnish first.
By default, Apache listen on Port 80, Edit this value in /etc/varnish/varnish.params
Step 5 : Now edit the this file tells varnish to look for the server content. You can change IP address here
Check Out : Install LAMP (linux, Apache ,Mysql ,PHP)
Save the file.