The following instructions are for setting up a local Aegir environment for development using a virtualbox machine.  First, you must have a basic working Ubuntu installation on your virtualbox machine.  Note that if you are using Ubuntu 10.4 or later, you may want to use special measures to downgrade from php 5.3, which doesn't play well with Drupal.

working basic infrastructure

sudo apt-get install apache2 php5 php5-mysql php5-gd mysql-server php5-curl imagemagick php5-imagick php5-ffmpeg php5-cli php5-xdebug phpmyadmin php-pear php-apc subversion openssh-client openssh-server vim

sudo sed -i 's/memory_limit = 16M/memory_limit = 128M/' /etc/php5/apache2/php.ini

sudo sed -i 's/memory_limit = 16M/memory_limit = 128M/' /etc/php5/cli/php.ini

sudo sed -i 's/upload_max_filesize = 2M/upload_max_filesize = 10M/' /etc/php5/apache2/php.ini

sudo sed -i 's/post_max_size = 24M/post_max_size = 24M/' /etc/php5/apache2/php.ini

sudo a2enmod deflate rewrite vhost_alias

sudo /etc/init.d/apache2 restart

no outgoing email

(remember to configure postfix for local only!)

sudo apt-get install postfix

sudo /etc/init.d/postfix restart

aegir-specific

NOTE: these instructions are from the canonical install instruction file at http://groups.drupal.org/aegir-hosting-system/documentation.  That file contains the same instructions with some added explanation, and I recommend that you read it; I have taken out the extra stuff for my own ease of use.  After running the commands in this section, you will have to run the install file for the version of Aegir you wish to install.  These commands are tested for 0.4-alpha7.

sudo apt-get install git-core unzip

sudo adduser --system --group --home /var/aegir aegir

sudo adduser aegir www-data #make aegir a user of group www-data

sudo ln -s /var/aegir/config/apache.conf /etc/apache2/conf.d/aegir.conf

SUDOERS:

You must add the following line to the sudoers file:
aegir ALL=NOPASSWD: /usr/sbin/apache2ctl

to edit the sudoers file:
sudo visudo

MYSQL COMMANDS:

CREATE DATABASE aegir;

GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, \
CREATE TEMPORARY TABLES, LOCK TABLES ON aegir.* TO \
'aegir'@'localhost' IDENTIFIED BY 'XXXXXXXX';

GRANT ALL PRIVILEGES ON *.* TO 'aegir_root'@'localhost' IDENTIFIED \
BY 'XXXXXXXX' WITH GRANT OPTION;

sudo mkdir /var/aegir/platforms

sudo chown aegir:aegir /var/aegir/platforms

wget "http://git.aegirproject.org/?p=provision.git;a=blob_plain;f=install.sh.txt;hb=provision-0.4-alpha8" -O install.sh.txt

sudo sed -i 's/AEGIR_DOMAIN=aegir.example.com/AEGIR_DOMAIN=aegir.loc/' install.sh.txt

chmod +x install.sh.txt

sudo su -s /bin/bash aegir -c "sh install.sh.txt"

sudo /etc/init.d/apache2 restart

Network Config - for VirtualBox guests ONLY

in virtualbox, with the machine shutdown, edit the networking settings to enable the second network interface and set it to a host-only network; then restart the machine.

on your host machine, add the following line to the "hosts" file (/etc/hosts or c:\windows\system32\drivers\etc\hosts):
192.168.56.126 localhost aegir.loc (etc...)

NOTE: every time you add a local host via aegir interface, you will have to add that host name to the same hosts file

sudo vi /etc/network/interfaces

to the end of the file, add the following:

# Communications with host OS (host-only network in virtualbox)
auto eth1
iface eth1 inet static
address 192.168.56.126
netmask 255.255.255.0
network 192.168.56.0
broadcast 192.168.56.255
gateway 192.168.56.100

sudo ifup eth1

NOTE:  occasionally, when you start the guest machine, you will not be able to access one of the networks.  When this happens, run the following command:
sudo dhclient

Samba configuration - for VirtualBox guests ONLY

sudo apt-get install samba

sudo vi /etc/samba/smb.conf

under #### NETWORKING #### :
interfaces = eth1
bind interfaces only = yes
New section:
[platforms]
    path = /var/aegir/platforms
    comment = Aegir platforms
    guest ok = yes
    guest only = yes
    security = share
    force user = aegir
    read only = no
[user]
    path = /home/user
    comment = Aegir user home
    guest ok = yes
    guest only = yes
    security = share
    force user = user
    read only = no

sudo /etc/init.d/samba restart

xdebug for Virtualbox Guests

sudo vi /etc/php5/apache2/php.ini

; (add the following lines)
[xdebug]
xdebug.remote_enable=on
xdebug.remote_handler=dbgp
xdebug.remote_host=192.168.56.1
xdebug.remote_port=9000

; NOTE: for each Netbeans project, you may have to map the files before debugging will work.  Do this under project properties, the "run configuration" selection, "Advanced..." button.  The "Server Path" should be a path like "/" or maybe "/var/aegir/platforms/drupal" - note that you do not use http:// here - and the "Project Path" should point to the Drupal folder that Netbeans can see.

 

User login