Blogs

Install and configure Ejabberd 2.1 on Ubuntu 10.4

This how to is a great deal simpler than I remember but it's easy to miss a trick.

$ sudo apt-get install erlang ejabberd

I thought it was all kosher. Except I couldn't add users due to 'undefined RPC endpoint for localhost'. Thinking that these should have been automagically configured I tried to install from source and from processone packages but none were really good enough to easily repeat.

Drupal, OpenID and Google

Its taken me a long time (too much beer probably) to get round to using openID with Drupal sites. No particular reason - although i do seem to remember support being patchy and basecamp just not working with OpenID back in the day.

Well, now that Basecamp has been thoroughly twatted by OpenAtrium i find myself with lots of Drupal Atrium logins, Drupal site logins etc. LDAP over SSL is my preferred option for internal and production machines, but for third party access, you cant beat a bit of OpenID.

Multisites and Apache Vhosts with Project Mercury

The Mercury stack uses Tomcat6 as the servlet container for Solr. This is configured out of the box to run a single site. If you want to use multisites or vhosts for multiple drupals on one server then you will run into the following issues:

1. Memcache may have the default key set so you get cache collisions
2. Apache solr instances are configured for one site so if two sites both attempt to update the index at /solr then both sites will be searchable from the other, which is probably more confusing than anything

Point 1 Memcache collisions

ERROR 1018 (HY000): Can't read dir of '.' (errno: 24) and other jazz funk classics

Errno: 24 means 'Too many open files'. Everything you do in linux is a file (or rather a file descriptor).
Every mysql connection, every apache connection etc.

By default ubuntu allows users to open 1024 files. The hard limit is 8192. So if you start to hear the melodies of errno 24 its probably time to start increasing this limit

To see how many files a user has open try this

sudo lsof -u mysql

edit the file in /etc/security/limits.conf and add these two mysql lines in at the bottom


#@student - maxlogins 4

Standalone Solr Listen to Localhost only

I like firewalls as much a the next man. But sometimes they're just not necessary. Back in the day (back in the world of banking) I used to review sites that had a liberal sprinkling of firewalls. Literally. I remember one site that had as many firewalls as they did servers!

Conditional CCK fields module discovered!

Was looking round the interwebs for a lead on if statements in drupal view (would really like to do it in the gui rather than override it) when i wandered into this nugget

http://drupal.org/project/conditional_fields

havent done anything with it, but manipulating the dom for content types (i'm thinking webform and possibly ubercart) cant be a bad thing.

Resend Drupal registration email

Blimey, what a palavah that was!

I've been using a module called Account Reminder to resend peoples registration details if they hadnt activated their account.

This is all fine and dandy, you can set it so it emails after a predefined period with custom email content etc. All good so far.

drush snippet for ubercart site install

Use this 'uber' snippet (chortle) to install pretty much every module you could need for an online store (and a bit more)

How to create an internal Certificate authority

And generate server certificates, and how to set up apache2 on ubuntu for SSL

Create a root private key and a public key for the root (use makepasswd --chars 20 to make the passwds more secure)

$ openssl genrsa -des3 -out ca.key 4096

Generate a certificate - this is used by clients to verify the server identity. If they trust this certificate, then the server key is trusted.

$ openssl req -new -x509 -days 365 -key ca.key -out ca.crt

Apache2, Subversion and Webdav

Multi user subversion works completely differently to how i expected. I assumed i would be setting up an ldap server and have unix users for each developer. Turns out you configure developers using htpasswd files and run apache as svn user for repo access.

install required modules (assumes subversion is already installed and projects are located in /svn

$ sudo apt-get install libapache2-svn

create a new virtual host

ServerAdmin sysadmin+svn+projectname@initsix.co.uk
ServerName svn.initsix.co.uk
# User steev

Syndicate content