How to Install Varnish on Fedora 21
Varnish is a proxy and cache, or HTTP accelerator, designed to improve performance for busy, dynamic websites. By redirecting traffic to static pages whenever possible, varnish reduces the number of dynamic page calls, thus reducing load.
- These instructions are intended specifically for installing the Varnish on Fedora 21.
- I’ll be working from a Liquid Web Self Managed Fedora 21 server with HTTPD and PHP already installed, configured, and running, and I’ll be logged in as root.
First, you’ll follow a simple best practice: ensuring the list of available packages is up to date before installing anything new.
yum -y update
At this point, installing Varnish is as simple as running just one command:
yum -y install varnish
To configure varnish to start at boot, run the following command:
systemctl enable varnish
To start varnish, run the following command as root:
systemctl start varnish
To check the status of varnish, run the following command as root:
systemctl status varnish
Check the version of Varnish that is running:
varnishd -V
Varnish is configured to listen on port 6081 by default. It expects your web server to be local, or on the same server and listening on port 8080.
A basic and default configuration file can be found at:
/etc/varnish/default.vcl
An example configuration can be found in:
/usr/share/doc/varnish/example.vcl
For a refresher on editing files with vim see: New User Tutorial: Overview of the Vim Text Editor
To view or edit example.vcl:
vim /usr/share/doc/varnish/example.vcl
Related Articles:
- 4 Methods for How to Install Yarn on Windows Server
- How to Install Bpytop Resource Monitoring Tool on AlmaLinux
- How to Fix “This Site Can’t Provide a Secure Connection” Error
- How to Install MongoDB on AlmaLinux
- How to Install PostgreSQL on AlmaLinux
- How to Use the WP Toolkit to Secure and Update WordPress

About the Author: J. Mays
As a previous contributor, JMays shares his insight with our Knowledge Base center. In our Knowledge Base, you'll be able to find how-to articles on Ubuntu, CentOS, Fedora and much more!
Our Sales and Support teams are available 24 hours by phone or e-mail to assist.
Latest Articles
What Is WebP and What Makes it Different from Other Image Formats?
Read ArticleTop 10 Password Security Standards
Read ArticleTop 10 Password Security Standards
Read ArticleHow to Install MongoDB on AlmaLinux
Read ArticleHow to Use the WP Toolkit to Secure and Update WordPress
Read Article