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 have a two small shared hosting packages and the price I pay I don't expect to receive very good support. I accept with any shared hosting uptime cannot be guaranteed neither can it be 100% and anyone who suggests otherwise is living a dream. However on the occasions I have opened a ticket they have been answered and investigated promptly. I have been with ayksolutions.com since Jun/18/2008 oh wow where has the time gone!
This is my second time i m using your services, and the main reason i'm doing that, beside your prices is your customer support. I love the fact that you are fast, you always help me and never get bothered by my endless questions(i'm still a newbie when it comes to server setup) Thank you
You can trust your business with AYKsolutions After a horrible experience with my prior host that left me with over 14 hours of downtime, AYKSolutions came in, took care of the transfer completely and made my life easier. When they say their servers are semi-managed, it means they take care of more then most managed server hosting companies. Average ticket response time? 2-5 minutes. One time i n the middle of the night it took 30 minutes. Problems that I create are fixed immediately and they take care of their customers. Artyom is the owner, who is somehow capable of not sleeping. He's always there to take care of everything with a personal touch. 3 AM on a Saturday? Not an issue for AYKSolutions. Trust me, I'm very thorough in researching a company. When it comes to business, you can never be too careful. I trust my business with AYKSolutions