Below are some notes of my install process on a Red Hat Enterprise Linux 5.3 System. I installed a 0.2 Head version including a (pre-bug) version of drush. (Mid March 2009) These notes were not verified (yet) and commands were reshuffled somewhat.
UPDATE: Instructions below will not work with Aegir 0.3 and higher. Drush provision now has more dependencies on the full php 5.2.x so just adding json to the native php 5.1.6 will no longer be sufficient.
Cheers,
Paul Krischer / "SqyD"
first@lastname.nl
The idea is to assemble a POC (Proof of concept) implementation of aegir on stock RHEL and play around with it in a testing lab and impress your coworkers ;-) I used a different root (/opt/drupal/aegir) and didn't bother with dns. You should NOT be runing this on anything with a direct outside connection, let alone use it for production use.
RPM's:
Warning: This was all done with the stock RHEL 5.3 packages in a controlled testing environment. Again: DO NOT run these versions on anything connected to the net but update your packages on a regular basis.
- httpd-2.2.3-11.el5.x86_64.rpm
- perl-DBI-1.52-1.fc6.x86_64.rpm
- mysql-5.0.22-2.1.0.1.x86_64.rpm
- perl-DBD-MySQL-3.0007-1.fc6.x86_64.rpm
- mysql-server-5.0.22-2.1.0.1.x86_64.rpm
- gmp-4.1.4-10.el5.x86_64.rpm
- php-common-5.1.6-15.el5.x86_64.rpm
- php-cli-5.1.6-15.el5.x86_64.rpm
- php-5.1.6-15.el5.x86_64.rpm
- php-gd-5.1.6-15.el5.x86_64.rpm
- php-pdo-5.1.6-15.el5.x86_64.rpm
- php-mysql-5.1.6-15.el5.x86_64.rpm
- php-pear-1.4.9-4.noarch.rpm
- php-devel-5.1.6-15.el5.x86_64.rpm
- cvs-1.11.22-5.el5.x86_64.rpm
- ynx-2.8.5-28.1.x86_64.rpm
- automake-1.9.6-2.1.noarch.rpm
- autoconf-2.59-12.noarch.rpm
- imake-1.0.2-3.x86_64.rpm
You may also need php-process.
JSON:
The Drupal Commandline (Drush) requires json functionality for php. This is part of PHP core since 5.2 but is not for PHP5.1.6 included in RHEL 5.x so I've compiled the json.so module for this distro. The resulting binary module should be portable to other (64 bit) Rh machines.
pear config-set http_proxy http://11.22.33.44:8080
pear channel-update pear.php.net && pear install pecl/json
extension=json.so
Package Installation
For this test I implemented a development version of Aegir 0.2 . Since the Poc server doesn't have a direct internet connection to reach cvs.drupal.org (yet) the files were checked out and packaged on a desktop system en then moved to the POC server. Here's how the package was created (based on [http://cvs.drupal.org/viewvc.py/drupal/contributions/profiles/hostmaster/INSTALL.txt?revision=HEAD&view=markup this INSTALL.txt] document, changed some paths)
cvs -z6 -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal co -d aegir/drupal-5.x -r DRUPAL-5-12 drupal
Note: Drupal 5.12 was the supported version at the time of writing the install instructions. Check [http://drupal.org/ drupal.org] for the latest release
cd aegir/drupal-5.x/
cvs co -d profiles/hostmaster contributions/profiles/hostmaster
cvs co -d sites/default/modules/hosting contributions/modules/hosting
cd ..
cvs co -d drush contributions/modules/drush
mkdir .drush
cvs co -d .drush/provision contributions/modules/provision
cd ..
tar czvf aegir0.2_20090310.tar.gz aegir/
Apache Configuration
mkdir -p /opt/drupal/aegir/etc/vhost.d
NameVirtualHost *:80
Options FollowSymLinks
AllowOverride None
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
RewriteEngine On
ServerAdmin webmaster@localhost
ServerName drupoc.your.domain
DocumentRoot /opt/drupal/aegir/drupal-5.x
cd /etc/httpd/conf.d/
mv welcome.conf welcome.conf.disabled
echo "Include /opt/drupal/aegir/etc/vhost.d/" > aegir.conf
MySQL:
mysql
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'@'%' IDENTIFIED BY 'XXXXXXXX' WITH GRANT OPTION;
Replace XXXXXXXX with a good password
Security:
All processes (outside of the database and webserver realm) of the aegir hosting system are run under a seperate user "aegir".
adduser aegir
chown -R aegir. /opt/drupal/aegir/drupal-5.x/
aegir ALL=NOPASSWD: /usr/sbin/apachectl
chown -R aegir. /opt/drupal/aegir/etc
chmod 0700 /opt/drupal/aegir/etc
mkdir /opt/drupal/aegir/backups
chown aegir. /opt/drupal/aegir/backups chmod 0700 /opt/drupal/aegir/backups
Webinstall
Now it's finaly time to do some webbased stuff!!
chmod a+w /opt/drupal/aegir/drupal-5.x/sites/default/settings.php
You will now be linked to the hostmaster/wizard url that will guide you through the rest of the aegir setup
Useraccount:
Provisioning/paths:
su aegir - cd /opt/drupal/aegir/drupal-5.x /opt/drupal/aegir/drush/drush.php hosting setup
quicknotes: Install a Drupal 6 platform
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
Workarounds
At the time of this POC dns provisioning is out of scope. We implemented a wildcard dns (*.drupoc.your.domain) To prevent the dns functionality in aegir from messing things up we disable it completely.
mv /opt/drupal/aegir/.drush/provision/dns_server /opt/drupal/aegir/.drush/provision/.dns_server