Installing Subversion 1.6 on CentOS 5 64bit

Submitted by Janak on Mon, 01/10/2011 - 13:53

Install RPM Forge repo:

Installing RPMforge on CentOS

Instructions:

cd /etc/yum.repos.d
sudo wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
sudo rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
sudo rpm -K rpmforge-release-0.5.2-2.el5.rf.*.rpm
sudo rpm -i rpmforge-release-0.5.2-2.el5.rf.*.rpm
sudo rm -f rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm

Varnish Cookie Tweak to allow Anonymous Comments with Pressflow

Submitted by Janak on Wed, 12/29/2010 - 13:28

If you are using Drupal and have allowed anonymous user to leave comments on the site, you will notice that the core comments module adds two cookies named comment_info_name and comment_info_mail. These cookies allow the comments form to be auto populated with name and email on any subsequent comments from the same user.

For majority of users this is not something of a concern. Whist this is useful, if any cookies are passed back from client side in the request, Varnish will simply request the page from the back end instead of requesting the page from the cache. This will result in many cache MISSes as the cookie is set for 365 days (!!!!)

Automated Drupal database backups using Drush, Bash and Cron

Submitted by Janak on Thu, 12/23/2010 - 10:19

Drush + Bash + Cron: Datbase Backup Goals

  • Scan sites directory for a given drupal install
  • Find all multisite folders/symlinks
  • For each multisite:
  • Use Drush to clear cache - we dont want cache table bloating up the MySQL dump file
  • Use Drush to delete watchdog logs - we dont want watchdog table bloating up the MySQL dump file
  • Use Drush to backup the database to pre-assigned folder
  • Use tar to compress and timestamp the Drush generated sql file

Free IMAP access to Yahoo! Mail - native access, no hacks required

Submitted by Janak on Wed, 10/06/2010 - 12:15

It seems Yahoo! Mail no longer requires the custom command (GUID 1), now you can access your Yahoo! Mail via IMAP using the settings below:

Yahoo! Mail IMAP Settings

Configure Yahoo imap with the following servers:

imap.mail.yahoo.com port 993 (SSL/TLS)
smtp.mail.yahoo.com port 465 (SSL/TLS)

or
android.imap.mail.yahoo.com port 993 (SSL/TLS)
android.smtp.mail.yahoo.com port 465 (SSL/TLS)

Yahoo! Mail IMAP "Hacks" - Background info

Varnish and Pressflow (Drupal) - Improve HIT rate and SEO - 301 redirects using Varnish

Submitted by Janak on Mon, 10/04/2010 - 18:52

Following on from previous post about VCL tweaks to improve hitrate; there are occasions when a website should not be served from both www.foobar.com and http://foobar.com. In some instances Google will deem the content to be duplicate copy of each other and a website can suffer from dupe content penalty.

Varnish and Pressflow (Drupal) - VCL tweaks for achieving a high hitrate

Submitted by Janak on Thu, 09/30/2010 - 11:58

The default Varnish config for Pressflow by Four Kitchens is an excellent starting point and gets you up and running with relatively little pain and effort. Having done a fair amount of Varnish tweaking for my personal and work websites, I came across a couple of varnish tweaks that resulted in a phenominal improvement in Varnish Hit rate.

Vary User Agent

Install Memcache for Drupal on CentOS 5.5

Submitted by Janak on Mon, 09/27/2010 - 17:21

Install EPEL Repo

Memcache can be found in the EPEL repo. Install EPEL repo:

rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm

Install Memcache

yum install memcached
pecl install memcache
yum install zlib-devel

Auto start memcache on reboot

chkconfig --level 2345 memcached on

Add PHP settings for Memcache

nano /etc/php.d/memcache.ini

extension=memcache.so
memcache.hash_strategy="consistent"