Setting up Varnish for Drupal on CentOS 6

Varnish has an offical repository so let’s add it to Yum as outlined on https://www.varnish-cache.org/installation/redhat sudo rpm –nosignature -i http://repo.varnish-cache.org/redhat/varnish-3.0/el6/noarch/varnish-release/varnish-release-3.0-1.el6.noarch.rpm sudo yum install varnish Set Varnish to start on system boot sudo chkconfig varnish on Setup DAEMON_OPTS in /etc/sysconfig/varnish, something like below. It will be commented out by default: DAEMON_OPTS=”-a :80 \ -T localhost:8080 \ -u varnish -g… Continue reading Setting up Varnish for Drupal on CentOS 6

Setting up memcached with Drupal 7 on Centos 6

Firstly get access to RPMForge repositories. Next install memcached: sudo yum install memcached sudo service memcached start memcached -h Check memcache stats: echo “stats settings” | nc localhost 11211 watch “echo stats | nc 127.0.0.1 11211” Configure memcache: sudo vi /etc/sysconfig/memcached Configuration details for memcache can be found here Install the PECL memcached extension for… Continue reading Setting up memcached with Drupal 7 on Centos 6

Installing RPMForge repositories on CentOS

By default CentOS Yum has a pretty poor selection of packages compared to something like Debian. So it can be a good idea to add RPMForge to get access to more up to date packages. cat /etc/redhat-release uname -a Now choose the appropriate repository for the CentOs version and architecture: http://wiki.centos.org/AdditionalResources/Repositories/RPMForge Install the repo: wget… Continue reading Installing RPMForge repositories on CentOS

Setting up a self signed SSL certificate with Apache

I’m assuming you have Apache installed. Enable the SSL mod for apache: sudo a2enmod ssl Create a directory for the certificates: sudo mkdir /etc/apache2/ssl Generate the certificate: sudo openssl req -x509 -nodes -days 365000 -newkey rsa:2048 -keyout /etc/apache2/ssl/apache.key -out /etc/apache2/ssl/apache.crt Openssl will ask for some information, make sure you set the FQDN properly, the rest… Continue reading Setting up a self signed SSL certificate with Apache

Apt can’t see sources? Try changing the User Agent

If you are trying to use apt behind a corporate firewall, try changing the user agent apt is using with wget to load the package lists. By default it uses: User-Agent: Debian APT-HTTP/1.3 which isn’t recognised by the filter. 1. Create and edit /etc/apt/apt.conf sudo vi /etc/apt/apt.conf 2. Paste the following into the file: Acquire… Continue reading Apt can’t see sources? Try changing the User Agent