Allows you to search a variety of questions and answers
memcached and varnish are mysql and web accelerators that can greatly improve the performance of your server.
They can be installed from the EPEL repository. To add the EPEL repo to your repolist, first find the appropriate RPM (for Centos/RHEL) here:
http://fedoraproject.org/wiki/EPEL/FAQ#Using_EPEL
Note: If you are using Debian/Ubuntu or another OS look on the above site for the appropriate instructions.
Then add the repo using the following command:
Code:
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-5.noarch.rpm
Note: replace the above rpm link with the one you want to use.
Then run 'yum update' to update your repositories and finally run 'yum repolist' to ensure EPEL is installed.
Note: If you don't want to update any packages, just hit 'N' at the prompt and that's it.
After you have have EPEL repos active, you can use 'yum install' to install both memcached and varnish.
memcached configuration file will be located in /etc/sysconfig/memcached and you can start it using
Code:
/etc/init.d/memcached start
To have it start on boot, use
Code:
chkconfig memcached on
varnish configuration file will be in /etc/varnish. The file where you can change settings for varnish is /etc/sysconfig/varnish.
To start varnish, use:
Code:
/etc/init.d/varnish start
To have it start on boot use:
Code:
chkconcifg varnish on
For further details on how to get Varnish configured, please go here: http://www.thomasnetworks.net/2011/0...a-singel-site/
One thing to pay attention to is to ensure that you have your Apache and Varnish proxy setup correctly. I will provide an example below where your Cpanel's (or webserver's) main IP address is 1.2.3.4, with Apache running on port 81 instead of port 80.
1. First, go to WHM if using Cpanel and to Tweak Settings, then find where you can select on which port Apache listens. Change it to 81 from 80 and save.
2. In the /etc/varnish/default.vcl file, you will need to change
backend default {
.host = "127.0.0.1";
.port = "80";
}
to
backend default {
.host = "1.2.3.4";
.port = "81";
}
Quit & save (you can tweak additional options in the default. vcl file further, but that falls outside the scope of this tutorial)
3. Open up /etc/sysconfig/varnish and go to Advanced Method 3. There, change
#VARNISH_LISTEN_ADDRESS=
VARNISH_LISTEN_PORT=81
to
VARNISH_LISTEN_ADDRESS=1.2.3.4
VARNISH_LISTEN_PORT=80
Quit and save (You can also tweak some settings in this file further if you wish).
4. Now restart apache (/etc/init.d/httpd restart) and then varnish (/etc/init.d/varnish restart) and your site will be running via varnish on port 80 with apache feeding it through port 81.
If you are on a non-Cpanel server, you just need to edit your httpd.conf file accordingly. A good how-to can be found here: http://www.gnutoolbox.com/varnish-ht...erator-cpanel/.
If you are getting the following error when trying to start varnish:
varnishd dead but pid is still there (or something to that effect)
This may mean that your /dev/null is broken. Recreate it with mknod -m 666 /dev/null c 1 3.
I've been a client of AYK Solutions for about six months now. They have provided the best overall experience I have had in over 10 years. I've tried iWeb, SingleHop, and a few others supposed to be the so-called best. Specifically, you are dealing with personal, professionals with AYK Solutions, and they are willing to help when all others want to charge you $** for this and $**/hr for that. I'm happy, and have no plans of going anywhere else; ever.
Great servers, Great Service, Awesome uptime! Our company has been working with AYKSolutions for almost 3 years, hosting several servers for mission-critical projects. The network downtime has been way lower than 30 minutes for OVER 3 years and.. one of our Linux servers scored 450 days of uptime! Needless to say, their Ticket Support always responds in a matter of minutes. At any time of the d ay! I would rate them 10/5 if I could! Kudos to a great company! :)
Without doubt the most professional and friendly support team i have ever experienced. These guys are really way above any other company i have worked with in the past.