Red Hat EL 5.3 Install notes

Events happening in the community are now at Drupal community events on www.drupal.org.
You are viewing a wiki page. You are welcome to join the group and then edit it. Be bold!

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.

  • Install php-devel (php-devel-5.1.6-15.el5.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
  • Still no direct connection to the outside? Set a proxy for the pear tool:
    pear config-set http_proxy http://11.22.33.44:8080
    pear channel-update pear.php.net && pear install pecl/json

  • Create a file /etc/php.d/json.ini with the contents
    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)

  • Create a fresh temp dir and cd into it
  • 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/

  • upload the tarball to the target server and extract it under /opt/drupal
  • Apache Configuration

  • Create a directory to hold the apache configuration files aegir creates:
    mkdir -p /opt/drupal/aegir/etc/vhost.d

  • Create a new config file /opt/drupal/aegir/etc/vhost.d/drupoc.your.domain with this content:
    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/

  • Disable the default welcome page:
    mv welcome.conf welcome.conf.disabled

  • Include all config files in aegir/etc/vhost.d:
    echo "Include /opt/drupal/aegir/etc/vhost.d/" > aegir.conf

  • MySQL:

  • Log into the mysql server (as root):
  • mysql

  • Then issue the following 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'@'%' 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".

  • Create the user aegir:
    adduser aegir

  • Change file ownership:
    chown -R aegir. /opt/drupal/aegir/drupal-5.x/

  • Put the aegir user in the apache group by editing the /etc/group file
  • Edit the /etc/sudoers file and add the following line:
    aegir ALL=NOPASSWD: /usr/sbin/apachectl

  • Change ownership of the etc directory:
    chown -R aegir. /opt/drupal/aegir/etc

  • Limit rights of other users:
    chmod 0700 /opt/drupal/aegir/etc

  • Create a location for backups:
    mkdir /opt/drupal/aegir/backups

  • Change ownership and rights:
    chown aegir. /opt/drupal/aegir/backups
    chmod 0700 /opt/drupal/aegir/backups

  • Webinstall

    Now it's finaly time to do some webbased stuff!!

  • Visit the default website at http://drupoc.your.domain/
  • Select the "Hostmaster" option on the first screen
  • Next the installation wizard will complain it cannot write to the settings file. Set this temporarily with
    chmod a+w /opt/drupal/aegir/drupal-5.x/sites/default/settings.php

  • Refresh the page, it should now present the database configuration options
  • Select "mysqli" not "mysql". (for better performance) and insert "aegir" as username and databasename and the password you created before.
  • You will now be linked to the hostmaster/wizard url that will guide you through the rest of the aegir setup
    Useraccount:

  • create an "Administrator"/"root" account (userid=1) for drupal: "Administrator" with a strong password.
  • Provisioning/webserver: Provide "aegir" as the system username and "apache" as the webserver group. Leave the apache restart command at: "sudo /usr/sbin/apachectl graceful"
    Provisioning/paths:
  • Drush path: /opt/drupal/aegir/drush/drush.php
  • Configuration path: /opt/drupal/aegir/etc
  • Backup path: /opt/drupal/aegir/backups
  • Skip the next page. We allready provided all the database credentials
  • Hosting/Features: Uncheck all for now
  • Initialise: Issue the following commands:
    su aegir -
    cd /opt/drupal/aegir/drupal-5.x
    /opt/drupal/aegir/drush/drush.php hosting setup

  • quicknotes: Install a Drupal 6 platform

  • Download the latest Drupal 6 release. (6.10 for now)
  • Extract it in the aegir directory
  • Change file ownership to aegir:apache
  • Add these lines to /opt/drupal/aegir/etc/vhost.d/drupoc.your.domain
  •     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

    Aegir hosting system

    Group organizers

    Group categories

    Group notifications

    This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: