The Raspberry Pi is a tiny, solid state, and ludicrously cheap hobby ARM based computer designed in the UK (but thanks to insane UK tax laws needs to be built in China). It has a USB port, video, sound, an Ethernet port, 256MB RAM, and can run 3 distinct flavours of Linux.

Ostensibly the device was developed with the aim of getting kids to code, and as someone who grew up with the UK hobby computing scene of the 1980s and cut their programming teeth hacking games together on the ZX Spectrum, this is something I can thoroughly get behind.

The blurb from their website:

The Raspberry Pi is a credit-card sized computer that plugs into your TV and a keyboard. It’s a capable little PC which can be used for many of the things that your desktop PC does, like spreadsheets, word-processing and games. It also plays high-definition video. We want to see it being used by kids all over the world to learn programming.

Coming out of Cambridge and with a decidedly hobbyist feel to it, the Raspberry Pi could almost be the spiritual successor to the humble and much loved Speccy. If it can get more kids coding then that’s all for the good, especially if it gives the UK tech scene a much needed shot in the arm.

This is not the reason why I’m excited.

Small. Capable. CHEAP.

The Raspberry Pi is tiny, which means it can be put in tiny things. It is low power and solid state, which means it doesn’t need much juice to run (4 AA batteries will do the trick) and it can take a fair amount of abuse.

Above all, it is cheap, and this is why I’m really excited. They are certainly something you can afford to buy more of than a traditional computer, even on a modest budget. I’d go further and say that they are so cheap that they can be thought of as practically disposable general computing units… this is game changing.

The reason I am really excited about this is that all these factors combine to make them the perfect choice for the control computer for any number of appliances or devices, and it reduces the barrier to entry for the home hacker to start putting some really cool things together.

I don’t think it will be long before we start seeing countless hobbyist developed bits of hardware; from internet radios, to cheap NAS appliances, right through to remote sensor platforms, robots, drones and maybe even spacecraft. Given the number of bits of Lego sent to the edge of space recently I don’t think this is too far off!

Increasingly you don’t need to wait for a company with a massive fabrication plant to see a market for a product in order to get one, but now micro-manufacturing is something you can do in your own home. I can think of hundreds of gizmos I could spend countless afternoons building with a Raspberry Pi at the centre.

I can’t wait to get my hands on one!

In my earlier post I explained how to set up Elgg Multisite fresh, but as some of you have been asking, what if you already have an Elgg install and want to convert it to Elgg Multisite?

Well, providing your modifications have been mostly limited to plugins, this should be fairly straightforward. Unfortunately I don’t have time to answer all of you individually, but hopefully this post will help!

Getting started

Your first step should be to back up your existing Elgg install and back up the database, just in case anything goes wrong. If your current Elgg install is where you want to install your Elgg Multisite install (e.g. in /var/www) you will want to move it out of the way before continuing.

Once you’ve backed up and prepared your installation directory, set up Elgg Multisite as documented in my previous article.

Migrating your domain

Migrating your domain to point at your new Elgg multisite domain is a two step process, and you’ll need an extra sub domain depending on your configuration.

Basically, you’ll need one domain to act as an admin domain (e.g. pointing at /var/www), and then the domain your migrating should be pointed at the Elgg multisite docroot (e.g. in /var/www/docroot).

Next, you need to visit your admin domain and add the Elgg multisite domain details in the configuration – the domain name your migrating, plus the database details of the existing Elgg database you’re importing.

On the current version of Elgg Multisite you’ll get an error at this point complaining that the database could not be created. It already exists, so this error can be ignored.

Importing plugins

You should now have a functional vanilla Elgg install visible when you visit your migrated domain.

If you have any custom plugins which are not part of the standard Elgg install (including themes), these should be copied over at this point. You must activate them for the domain through the Elgg Multisite admin interface in order for them to be visible in Elgg’s plugin administration page.

Have fun!

Elgg Multisite is a version of the popular social networking platform Elgg which lets you easily run multiple Elgg sites off a single install of the software, starting new Elgg sites at the click of a button.

Here’s how to get started…

What you’ll need

In addition to the existing Elgg system requirements (PHP 5.2+, Mysql, Apache) you will also need:

  • Control over your apache config: You will need to set up apache virtual hosts for each domain you want to run an Elgg site on and point it at your Elgg Multisite docroot. This is also true if you want to use wildcard subdomains (below).
  • A DNS provider that supports wildcard subdomains: Wildcard subdomains let you direct anything.yourdomain.com to a common endpoint, while preserving the request headers. This lets you serve up different content depending on whether you visit http://sitea.yourdomain.com vs http://siteb.yourdomain.com but without any extra configuration. This is the recommended Elgg Multisite setup.
  • A domain to act as the “Master”: Visiting this domain will bring up the Elgg Multisite control panel, so you’ll want to protect behind some form of access control. I recommend you modify your apache configuration to limit access to a handful of trusted IP addresses.

Installation

For this I am assuming you’ve got the domain example.com. You have your admin page at http://admin.example.com and your Elgg sites are at http://*.example.com.

  1. Download the source: Elgg Multisite is available on Github, either checkout the source and run the build.xml (you’ll need ant) or download the pre-built package for Elgg 1.7 or Elgg 1.8.
  2. Install the source to a suitable location: Unpack the Elgg Multisite and install the contents to a suitable location (e.g. /var/www/). You should end up with an index.php, plus the following sub directories…
    • schema: Holds the Elgg multisite admin database schema.
    • multi: Elgg multisite admin libraries.
    • docroot: The customised Elgg install where you will point your Elgg domains to.
    • data: Elgg multi’s data root, this will contain the data uploaded by your Elgg sites.
  3. Make the data directory writable: the previously mentioned data directory must be writable to the apache user (e.g chown www-root:www-root data; chmod 775 data; on most systems).
  4. Install the admin database schema: Install /var/www/schema/multisite_mysql.sql in a mysql database. Be sure to give the Elgg multisite admin user you configure in the next step the ability to create new databases!
  5. Rename /var/www/docroot/engine/settings.example.php to settings.php and configure the administration database settings:
    • $CONFIG->multisite->dbuser = 'your admin database user';
    • $CONFIG->multisite->dbpass = 'password';
    • $CONFIG->multisite->dbhost = 'host usually localhost';
    • $CONFIG->multisite->dbname = 'admin database name e.g. elggmultisite';

Configuring your domains

The next step is to set up your Apache virtual hosts to point to the appropriate locations in your Elgg Multisite install.

  1. Set up your admin domain: Point a domain at your admin root /var/www/, e.g

    <VirtualHost *>
    ServerAdmin webmaster@example.com
    ServerName admin.example.com
    DirectoryIndex index.html index.php
    DocumentRoot /var/www/
    UseCanonicalName off
    php_admin_flag engine on
    php_admin_flag safe_mode off
    <Directory "/var/www/">
    AllowOverride All
    Options +Indexes +Includes +FollowSymlinks +ExecCGI
    </Directory>
    </VirtualHost>

  2. Set up your Elgg Multi-site wildcard domain handler:

    <VirtualHost *>
    ServerAdmin webmaster@example.com
    ServerName hosts.example.com
    ServerAlias *.example.com
    DirectoryIndex index.html index.php
    DocumentRoot /var/www/docroot/
    UseCanonicalName off
    php_admin_flag engine on
    php_admin_flag safe_mode off
    <Directory "/var/www/docroot/">
    AllowOverride All
    Options +Indexes +Includes +FollowSymlinks +ExecCGI
    </Directory>
    </VirtualHost>

  3. Set up the appropriate hosts and wildcard domains with your DNS provider: You need to set up your DNS correctly for this configuration to work, and this is host specific. Your DNS provider can help you further.

Setting up your admin user and adding sites

Once you have set up everything, visit http://admin.example.com and you will be prompted to enter details for the administrator user.

You can then begin setting up and configuring individual Elgg sites!

Enjoy!