Announcement

Collapse
No announcement yet.

installing Varnish with cloudlinux

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • installing Varnish with cloudlinux

    Hello, Is there any suggestion on how to install Varnish with cloudlinux

  • #2
    Hi,

    You can use any guide that is applicable to CentOS, but heres one of them:

    1) Change the port in Tweak Settings" option in WHM.
    2) Install the epel-release repository and make sure that the following packages are installed:

    Code:
    yum install epel-release –y
    
    yum install pygpgme yum-utils
    3) Create /etc/yum.repos.d/varnishcache_varnish60.repo file with the following content:

    > [varnishcache_varnish60]
    > name=varnishcache_varnish60
    > baseurl=https://packagecloud.io/varnishcache/varnish60/el/7/$basearch
    > repo_gpgcheck=1
    > gpgcheck=0
    > enabled=1
    > gpgkey=https://packagecloud.io/varnishcache/varnish60/gpgkey
    > sslverify=1
    > sslcacert=/etc/pki/tls/certs/ca-bundle.crt
    > metadata_expire=300
    > [varnishcache_varnish60-source]
    > name=varnishcache_varnish60-source
    > baseurl=https://packagecloud.io/varnishcache...h60/el/7/SRPMS
    > repo_gpgcheck=1
    > gpgcheck=0
    > enabled=1
    > gpgkey=https://packagecloud.io/varnishcache/varnish60/gpgkey
    > sslverify=1
    > sslcacert=/etc/pki/tls/certs/ca-bundle.crt
    > metadata_expire=300

    4) Update local cache with:

    Code:
    yum -q makecache -y --disablerepo=* --enablerepo=varnishcache_varnish60
    5) Make sure that /etc/varnish/varnish.params file contains this directive:

    > VARNISH_LISTEN_PORT=80

    6) Modify backend default section in /etc/varnish/default.vcl file:

    > # Default backend definition. Set this to point to your content server.backend default {
    > .host = "10.0.2.15";
    > .port = "8080";
    > }

    7) Enable and start the service:

    Code:
    chkconfig varnish on
    
    service varnish start

    Comment


    • #3
      Thank u very much Sir for the guide
      from step 1-3 no problem but,
      step 4 and 5 the files are not there

      Code:
      yum -q makecache -y --disablerepo=* --enablerepo=varnishcache_varnish60
      
      Importing GPG key 0x4E8B9DBA:
      
      Userid     : "[URL]https://packagecloud.io/varnishcache/varnish60[/URL] ([URL]https://packagecloud.io/docs#gpg_signing[/URL]) <support@packagecloud.io>"
      
      Fingerprint: 7c5b 4672 1af0 0fd5 7e68 e6e8 d260 5bf7 4e8b 9dba
      
      From       : [URL]https://packagecloud.io/varnishcache/varnish60/gpgkey[/URL]
      
      cat /etc/varnish/varnish.params
      
      cat: /etc/varnish/varnish.params: No such file or directory
      
      [root@server1 ~]# cat /etc/varnish/default.vcl
      
      cat: /etc/varnish/default.vcl: No such file or directory
      
      [root@server1 ~]#
      Thank u

      Comment


      • #4
        Hi James,

        You may also look into /etc/sysconfig/varnish to find locations of config files.

        Comment

        Working...
        X