This site is a static archive of the Aegir community site. Documentation has moved to http://docs.aegirproject.org. Other community resources can be found on the Contacting the community page.
Skip navigation

Revision of Automatic install on Debian from Sun, 11/20/2011 - 18:10

Help

Automatic install on Debian

Tagged:

These are the installation instructions that are recommended on Debian. Aegir dependencies (Apache, MySQL, PHP...) are also automatically installed. If you are managing the installation from a remote Windows computer, well-known open source tools for this task are for example PuTTY (a SSH client for command line), and WinSCP (a SFTP client with easy text file editing).

If you wish to install Debian packages over an existing manual install, it's possible. See the Debian upgrade procedures.

Debian packages are uploaded to http://debian.aegirproject.org/ shortly after a release. We eventually want to upload those packages to the official archives, but this will take some adaptation and time to sponsor the packages in.

1. Adding the project repositories

Use this command to add the Aegir package "Software Source" repository to your system:

echo "deb http://debian.aegirproject.org stable main" | sudo tee -a /etc/apt/sources.list.d/aegir-stable.list

To install other versions, see the developer instructions for the debian package.

2. Adding the archive key to your keyring

This repository self-signs packages uploaded to it (and packages uploaded are verified against a whitelist of trusted uploaders) using OpenPGP (GnuPG, to be more precise).

Use these commands to download and add the repository's PGP key, then update the package list on your system:

wget -q http://debian.aegirproject.org/key.asc -O- | sudo apt-key add -
sudo apt-get update

3. Adding backports for or manually installing Drush

If you are running Debian wheezy or later, or Ubuntu Natty 11.04 or later, you don't need to do anything here. The Drush package you need is available from your distribution's repositories.

If not, you should also configure backports repositories for Drush. Version 4.4 of Drush is now in Debian unstable, wheezy, squeeze-backports and Ubuntu Natty.

If you are running Debian Squeeze 6.0, add the following line to /etc/apt/sources.list :

You might also have to add a proper Pin-Priority before this works. Create a file called drush containing the following and drop it into /etc/apt/preferences.d:

Package: drush
Pin: release a=squeeze-backports
Pin-Priority: 1001

Then run:

sudo apt-get update && sudo apt-get install drush

If you are running Debian lenny 5.0 or Ubuntu Maverick 10.10 or Karmic Koala or earlier, we recommend downloading and installing the Drush package manually. The version of Drush in the Ubuntu Universe repository for these versions of Ubuntu is outdated. If you are using Ubuntu Lucid LTS 10.04, you can install the Drush package manually or instead use Brian Mercer's PPA (Personal Package Archive) using the following command:

sudo add-apt-repository ppa:brianmercer/drush

4. DNS configuration

Aegir requires a properly configured "FQDN" (Fully Qualified Domain Name) be assigned to the machine. In practice, this means that the hostname returned by the hostname -f and uname -n shell commands should resolve to the IP address for this server, and vice versa, with the resolveip command (included with the mysql-server package).

5. Manual sudo configuration

If you are running Debian squeeze or later, or Ubuntu Lucid 11.04 or later, you don't need to do anything here. The Aegir package configures sudoers automatically.

If not, you will need to manually modify your /etc/sudoers file to add the following line:

echo "aegir ALL=NOPASSWD: /usr/sbin/apache2ctl" | sudo tee -a /etc/sudoers

The line above assumes that you have created a user aegir as specified in the installation instructions.

6. Installing Aegir

To install aegir, frontend and backend, use the following command:

sudo apt-get install aegir

If apt-get reports that the aegir packages have unmet dependencies, then make sure that you have installed Drush (as explained above). On a debian system, you can force the install of Drush from the squeeze-backports repository:

sudo apt-get -t squeeze-backports install drush

Then install aegir using the apt-get command above.

This will prompt you for the required information (MySQL password, Postfix configuration...) and go ahead with the install.

During the Postfix configuration, the following options appear: "No configuration, Internet site, Internet with smarthost, Satellite system, Local only". That first text screen only allows to use the tab key to select "OK", and then the enter key to display a second screen where you can select one of the choices. The default is "Internet site", useful in most cases to enable the server to send email messages, for example to the admin.

At the end of the installation, you will receive an email message or, if the user "aegir" has been assigned with a local email account during the installation, the file /var/mail/aegir will contain the message. It will include a one-time login to your new Aegir control panel, that is a URL to copy into your browser so that you can set the password for the "admin" user.

7. Custom distributions

If you have your own makefile, you can go ahead with the above process, but change the makefile to the one you want:

echo debconf aegir/makefile string /var/aegir/makefiles/aegir/aegir-koumbit.make | debconf-set-selections
apt-get install aegir

This allows you to specify the makefile path for your custom distribution of Aegir. To maintain these customizations, you'll need to ensure you do the same when upgrading.

An example aegir-koumbit.make file could look like:

core = 6.x
api = 2

includes[aegir] = "/usr/share/drush/commands/provision/aegir.make"

projects[] = module_filter

Note that for this to work, you may need the patch from this issue, allowing drush_make to reference absolute system paths.

8. Troubleshooting the install

To make the install smoother, the install command is run without much debugging information, which can make diagnostics pretty hard. For this, there's a special environment variable you can set that will trigger debugging output. Install aegir with this:

env DEBUG=yes apt-get install aegir

You can build your own Debian packages from our repositories using those instructions.

Note: the DEBUG flag is deprecated. In 1.x releases, it is accepted, but in 2.x it won't. You should use DPKG_DEBUG instead, it is usable starting from 1.1-4.

#1

On Squeeze, I tried to install aegir2, but have some dependency errors, firstly stating I need hostmaster2 and provision2, then stating I need drush5.5 or greater. I have installed drush5.8 using php-pear package, but apt-get mustn't know about this.

  • What is the 2.x procedure for the automatic installation?
  • Is there a method to add a higher version of drush than 4.5 to squeeze-backports so that apt-get knows the correct drush version?

I thought that running 'apt-get install aegir2' would have picked up the correct hostmaster and provision (aegir-provision2 and aegir-hostmaster2), as I think it does for 'apt-get install aegir'.

root@aegir2:~# apt-get install aegir2
Reading package lists... Done
Building dependency tree      
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
aegir2 : Depends: aegir-provision2 (>= 2.0~alpha1) but it is not going to be installed
          Depends: aegir-hostmaster2 (>= 2.0~alpha1) but it is not going to be installed
E: Broken packages
root@aegir2:~# apt-get install aegir-provision2 aegir-hostmaster2
Reading package lists... Done
Building dependency tree      
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
aegir-hostmaster2 : Depends: drush (>= 5.5) but 4.5-2~bpo60+1 is to be installed
aegir-provision2 : Depends: drush (>= 5.5) but 4.5-2~bpo60+1 is to be installed
E: Broken packages

Thanks in advance for any help with this.

#2

@mccrodp: I had a similar experiance, and opend this issue: http://drupal.org/node/1920152

#3

Would it be possible to add "profile" as an option, just like "makefile"?

#4

Sure. It would have to be added to the drush hostmaster-install and possibly hostmaster-migrate commands. Feel free to open an issue. Patches welcome ;)

#5

Thanks to jonpugh @ #32 and #33 for helping me get aegir 1.9 going with a fresh install of Debian Wheezy. The default wheezy version of drush is now too new (v5.x) for aegir 1.x. You need version 4.x, available in squeeze-backports. If you've already tried to install and run into "The drush command '@hostmaster status' could not be found." you must purge aegir and drush before attempting to reinstall with the correct drush version pinned.

#6

I had problem installing aegir2 on debian 7. Warning was

ERROR: Module ssl does not exist!

This can be solved with enabling mod_ssl on your apache2. For my case I needed to create /etc/apache2/mods-available/ssl.load with content

LoadModule ssl_module /usr/lib/apache2/modules/mod_ssl.so

After creating that file and restarting apache enable module sudo a2enmod ssl.

Need help?

Documentation

The notebook section provides a way for you to store and share information with your group members. With the book feature you can:

  • Add book pages and organize them hierarchically into different books.
  • Attach files to pages to share them with others.
  • Track changes that others have made and revert changes as necessary.
  • Archive books that are no longer of interest to the group. Archived books can be reactivated later if needed.

The revisions let you track differences between multiple versions of a post.