Yevgeniy A. Viktorov

Personal Weblog

XAMPP for Aegir

Here I’ll try to cover preliminary adjustments necessary to make XAMPP more friendly environment for Aegir.

I prefer XAMPP for development purposes because it can be used on demand, delivering common LAMP features out of box and makes it easy to establish similar environment on different distributions and/or even OS’es.

The steps explained in this post fits best to the following environment:

  • Ubuntu 10.10 Desktop(!!! for server edition you will need to setup administrative privileged user)
  • XAMPP 1.7.1
  • Aegir 0.4-beta2

But not limited to and your’re welcome to give it a try on environment of your choice. Make sure to drop a comment about your success 😉

XAMPP 1.7.1 is the last version shipped with PHP 5.2, all later versions uses PHP 5.3 which is supported by Drupal 6.14 core and higher (see the release notes for 6.14) and also by Drupal 7.x. But note that some contributed modules may not be compatible with PHP 5.3, and that some PHP 5.3 configurations still show warnings with Drupal 6.14. Also PHP 5.3 is not yet supported by Drupal 5.x

Preparing XAMPP

First off all you need to have XAMPP installed and this process already covered in many articles on the net, for example:

Now some adjustments needs to be done, but note the following instructions focused on using XAMPP for development purposes, from under your current account, i.e. you will need to replace user with in your(administrative privileged) username:

  • add XAMPP binaries directory to the PATH variable, i.e. add following into ~/.profile:
    # XAMPP
    if [ -d "/opt/lampp/bin" ] ; then
  • execute following command to apply adjustments from previous step:
    source ~/.profile
  • edit /opt/lampp/etc/php.ini and change the following values:
    memory_limit = 128M
    register_globals = Off
  • add following to the /etc/sudoers and replace user with your username:
    # xammp/aegir
    user ALL=NOPASSWD: /opt/lampp/lampp
    user ALL=NOPASSWD: /opt/lampp/bin/apachectl
  • install postfix(I’ve chosen local system):
    sudo apt-get install postfix
  • set email aliases, put the following into /etc/aliases replacing user with your username:
    webmaster:     user
    admin:         user
  • execute following command to apply adjustments from previous step:
    sudo newaliases
  • install following packages:
    sudo apt-get install mailutils rsync git-core unzip
  • change the group of apache webserver, modify /opt/lampp/etc/httpd.conf:
    #Group nogroup
    Group www-data
  • add your user(replace with your username) into www-data group:
    sudo adduser user www-data
  • setup mysql permissions if not yet set during XAMPP installation, i.e. answer NO to every question except the XAMPP: MySQL has no root passwort set!!!:
    sudo /opt/lampp/lampp security
  • remove empty mysql users entries, proceed with the following commands:
    mysql -u root -p
    use mysql;
    delete from user where User='';
  • restart the XAMPP:
    sudo /opt/lampp/lampp restart
  • create host name you will be accessing Aegir dashboard with, i.e. edit /etc/hosts and add the following:

Now you can proceed with Aegir installation as described in the next section.

Installing Aegir

Start your LAMP stack if not yet running:
/opt/lampp/lampp start

Now download Aegir quick install script, make it executable and run:

wget -O ';a=blob_plain;;hb=provision-0.4-beta2'
chmod +x

If everything went well you should see login url, e.g.:
Aegir is now installed. You can visit it at http://aegir.local/user/reset/1/1296754898/eca2e1c275f41846cc4a53f38070f1c3

Post install tweaks:

  • adjust crontab(crontab -e) entry to not bother us when xampp not running, add “>/dev/null 2>&1″ to the end of the following line:
    ... '@hostmaster' hosting-dispatch >/dev/null 2>&1
  • allow/enable default vhost to keep using phpMyAdmin and others xampp goodies, modify ~/config/apache.conf
    <VirtualHost *:80>
    #  ServerName default
    #  Redirect 404
  • and finally restart the stack:
    sudo /opt/lampp/lampp restart

That’s it, happy Drupalling! 😉


2 responses to “XAMPP for Aegir

  1. romain February 15, 2011 at 8:56 am

    Thanks very usefull. It seems to be a good solution for a dev local environment. Do you use a version control system for your sites hosted in aegir?

    • yeevgen February 15, 2011 at 9:07 am

      Sure, every site(themes + features folders) is under its own repository.
      And just in case here is what in my site specific .gitignore file:

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: