I am using this link for installing Varnish for nginx on CentOS 7.
How can I start, restart or stop Varnish?
The post that you used for the base to install Varnish relies on installing from source. This should be avoided for many reasons:
Save yourself time, and install Varnish using official RPM repository here.
curl -s https://packagecloud.io/install/repositories/varnishcache/varnish5/script.rpm.sh | sudo bash
After this you can start, restart and stop Varnish using standard OS routines, like service varnish restart
.
It's quick and you will be running in no time!
Completely restarts Varnish, using the operating system mechanisms. Your cache will be flushed
Only reloads VCL. Cache is not affected.
Apart from these
service varnish start
&service varnish stop
can be used as general commands. Using these may effect your cache directly.