Skip to content
Commits on Source (8)
...@@ -71,7 +71,7 @@ class provisionService_db extends provisionService { ...@@ -71,7 +71,7 @@ class provisionService_db extends provisionService {
function suggest_db_name() { function suggest_db_name() {
$uri = $this->context->uri; $uri = $this->context->uri;
$suggest_base = substr(str_replace(array('.', '-'), '' , ereg_replace('^www\.', '', $uri)), 0, 16); $suggest_base = substr(str_replace(array('.', '-'), '' , preg_replace('/^www\./', '', $uri)), 0, 16);
if (!$this->database_exists($suggest_base)) { if (!$this->database_exists($suggest_base)) {
return $suggest_base; return $suggest_base;
......
...@@ -16,7 +16,7 @@ fairly simple. It's 3 basic steps:: ...@@ -16,7 +16,7 @@ fairly simple. It's 3 basic steps::
1. Install requirements 1. Install requirements
2. Configure system requirements, which include:: 2. Configure system requirements, which include::
* create a Aegir user * create a Aegir user
* configure Apache, MySQL, DNS, etc * configure Apache (or Nginx with PHP-FPM), MySQL, DNS, etc
3. Run the install script. 3. Run the install script.
Those steps are detailed below. The following instructions provide example Those steps are detailed below. The following instructions provide example
...@@ -32,10 +32,11 @@ bullet-point summary of the steps required for the installation. In case of ...@@ -32,10 +32,11 @@ bullet-point summary of the steps required for the installation. In case of
conflict between INSTALL.txt and other documentation, INSTALL.txt should be conflict between INSTALL.txt and other documentation, INSTALL.txt should be
considered the canonical source of information. considered the canonical source of information.
Also note that those instructions setup a complete Aegir system. If you want Also note that these instructions setup a complete Aegir system. If you want
to only setup a new server, it should be sufficient to install requirement to only setup a new remote web/db server, it should be sufficient to install
(step 1) and configure them (step 2). You will just need the --backend-only flag requirements (step 1), configure them (step 2) and follow the Remote server
to avoid installing the frontend on the server. how-to which you can find at http://community.aegirproject.org/node/30.
1. Install software requirements 1. Install software requirements
================================ ================================
...@@ -53,6 +54,7 @@ assumed to be run as root user. ...@@ -53,6 +54,7 @@ assumed to be run as root user.
A standard umask of 022 is assumed. This is the default on most systems. A standard umask of 022 is assumed. This is the default on most systems.
Web server Web server
---------- ----------
...@@ -62,6 +64,15 @@ need root access to that server and the server must be reserved for ...@@ -62,6 +64,15 @@ need root access to that server and the server must be reserved for
Aegir. Sharing the server with other control panels such as Cpanel, Plesk or Aegir. Sharing the server with other control panels such as Cpanel, Plesk or
AlternC will very likely create problems and is not supported. AlternC will very likely create problems and is not supported.
Aegir also supports Nginx web server, but requires at least version 0.7.27 or
newer. Since Nginx doesn't provide php-cgi or php-fpm (recommended) modules,
you will need to install and run php-fpm server separately. You can find
useful examples and tips in the third party Barracuda installer available
at http://gitorious.org/aegir/barracuda-octopus. Note: this third party
installer is not supported by the core Aegir developers, but you can find
helpful community support at http://community.aegirproject.org.
PHP 5.2 PHP 5.2
------- -------
...@@ -75,12 +86,15 @@ load. As a result, we suggest using PHP 5.2 for the time-being. ...@@ -75,12 +86,15 @@ load. As a result, we suggest using PHP 5.2 for the time-being.
See http://drupal.org/node/360605 (amongst other issues) for details. See http://drupal.org/node/360605 (amongst other issues) for details.
Database server Database server
--------------- ---------------
You will require a database server, obviously. Aegir currently only supports You will require a database server, obviously. Aegir currently only supports
MySQL. It is preferable to use a dedicated server since Aegir will create MySQL and MariaDB. It is preferable to use a dedicated (not shared-hosting)
database users and will requires the use of the mysql 'root' user. server since Aegir will create database users and will require the use of the
MySQL 'root' user.
Mail transfer agent Mail transfer agent
------------------- -------------------
...@@ -92,6 +106,7 @@ email". Additional messages will show that site has been removed because of ...@@ -92,6 +106,7 @@ email". Additional messages will show that site has been removed because of
this problem. To remedy the situation simply install an MTA like sendmail, this problem. To remedy the situation simply install an MTA like sendmail,
postfix, or exim and do the minimal configuration. postfix, or exim and do the minimal configuration.
Other utilities: sudo, rsync, git and unzip Other utilities: sudo, rsync, git and unzip
------------------------------ ------------------------------
...@@ -104,13 +119,14 @@ The jQueryUI library is used in the Aegir UI, unzip is required to extract it. ...@@ -104,13 +119,14 @@ The jQueryUI library is used in the Aegir UI, unzip is required to extract it.
Sudo is required to allow the aegir user the limited privilege to restart the Sudo is required to allow the aegir user the limited privilege to restart the
webserver when required. Rsync is used to sync files to remote servers. webserver when required. Rsync is used to sync files to remote servers.
Summary Summary
------- -------
This may vary according to your platform, but under a Debian derivative, you This may vary according to your platform, but under a Debian derivative, you
can install all those packages using the following. can install all those packages using the following.
Shell commands:: Shell commands as root::
apt-get install apache2 php5 php5-cli php5-gd php5-mysql mysql-server \ apt-get install apache2 php5 php5-cli php5-gd php5-mysql mysql-server \
postfix sudo rsync git-core unzip postfix sudo rsync git-core unzip
...@@ -150,6 +166,7 @@ the resolved IP address to be the '127.0.0.1' loopback address. ...@@ -150,6 +166,7 @@ the resolved IP address to be the '127.0.0.1' loopback address.
If you intend to manage multiple servers using Aegir, you will need to If you intend to manage multiple servers using Aegir, you will need to
make sure that the IP address is the public IP of this server. make sure that the IP address is the public IP of this server.
Aegir user Aegir user
---------- ----------
...@@ -170,7 +187,7 @@ username if desired. ...@@ -170,7 +187,7 @@ username if desired.
In addition we will create a directory layout for Aegir configuration and In addition we will create a directory layout for Aegir configuration and
backups. backups.
Shell commands:: Shell commands as root::
adduser --system --group --home /var/aegir aegir adduser --system --group --home /var/aegir aegir
adduser aegir www-data #make aegir a user of group www-data adduser aegir www-data #make aegir a user of group www-data
...@@ -196,7 +213,6 @@ Change the memory_limit directive in /etc/php5/apache2/php.ini to read:: ...@@ -196,7 +213,6 @@ Change the memory_limit directive in /etc/php5/apache2/php.ini to read::
memory_limit = 128M ; Maximum amount of memory a script may consume (128MB) memory_limit = 128M ; Maximum amount of memory a script may consume (128MB)
Apache configuration Apache configuration
-------------------- --------------------
...@@ -228,21 +244,47 @@ file. ...@@ -228,21 +244,47 @@ file.
/etc/sudoers configuration:: /etc/sudoers configuration::
aegir ALL=NOPASSWD: /usr/sbin/apache2ctl aegir ALL=NOPASSWD: /usr/sbin/apache2ctl
Nginx configuration
--------------------
Aegir assumes standard Nginx configuration is available on the server, and
generates its own configuration files. The way we enable this is by
symlinking a single file which contains all the configuration necessary.
In Debian-based systems, you should symlink this file inside
``/etc/nginx/conf.d`` that will be parsed on startup.
Shell command as root::
ln -s /var/aegir/config/nginx.conf /etc/nginx/conf.d/aegir.conf
**Do not reload/restart Nginx after running these commands, it will fail.**
The installer script creates the configuration file referenced by the newly
created symlink.
The aegir user needs to have sudo access. Add the relevant line to your sudoers
file.
/etc/sudoers configuration::
aegir ALL=NOPASSWD: /etc/init.d/nginx
Remote web servers Remote web servers
------------------ ------------------
Any number of remote web servers may be configured. They need an aegir user and Any number of remote web servers may be configured. They need an aegir user and
Apache configuration as above, with the same user name and directory paths. SSH Apache configuration as above, with the same user name and directory paths. SSH
public/private keys should be set up so hostmaster's Aegir user can access public/private keys should be set up so hostmaster's Aegir user can access
remote web Aegir users with no passwords. The above apache configuration needs remote web Aegir users with no passwords. The above Apache configuration needs
to be performed too. to be performed too.
They will also need a login shell, which can be modified using the ``chsh`` command. They will also need a login shell, which can be modified using the ``chsh`` command.
Shell command as root:: Shell commands as root::
chsh -s /bin/sh aegir chsh -s /bin/sh aegir
apt-get install rsync apache2 php5 php5-cli php5-mysql apt-get install rsync apache2 php5 php5-cli php5-mysql
Database configuration Database configuration
---------------------- ----------------------
...@@ -269,6 +311,7 @@ If you are concerned about MySQL being accessible in this way, you can also ...@@ -269,6 +311,7 @@ If you are concerned about MySQL being accessible in this way, you can also
configure your firewall to only allow incoming connections from certain addresses. configure your firewall to only allow incoming connections from certain addresses.
This is outside the scope of this document however. This is outside the scope of this document however.
3. Run the install script 3. Run the install script
========================= =========================
...@@ -276,6 +319,7 @@ This section deals with the actual installation of Aegir. You can ...@@ -276,6 +319,7 @@ This section deals with the actual installation of Aegir. You can
install aegir in one of two ways: one assumes you have already install aegir in one of two ways: one assumes you have already
downloaded drush and provision, while the other will do that for you. downloaded drush and provision, while the other will do that for you.
3.1 Installing aegir with only the install.sh script 3.1 Installing aegir with only the install.sh script
---------------------------------------------------- ----------------------------------------------------
...@@ -285,7 +329,7 @@ as the aegir user created above, so it needs to be placed somewhere that the ...@@ -285,7 +329,7 @@ as the aegir user created above, so it needs to be placed somewhere that the
aegir user can access in order to execute it. This file is available in aegir user can access in order to execute it. This file is available in
Provision or can be downloaded through the web with this command:: Provision or can be downloaded through the web with this command::
Shell commands:: Shell command::
wget -O install.sh 'http://git.aegirproject.org/?p=provision.git;a=blob_plain;f=install.sh.txt;hb=HEAD' wget -O install.sh 'http://git.aegirproject.org/?p=provision.git;a=blob_plain;f=install.sh.txt;hb=HEAD'
By default, the install script will install the "correct" version of Aegir By default, the install script will install the "correct" version of Aegir
...@@ -294,9 +338,12 @@ git master branch. If you downloaded an official release, it should install ...@@ -294,9 +338,12 @@ git master branch. If you downloaded an official release, it should install
the official release.). You can modify which version to install by editing the the official release.). You can modify which version to install by editing the
AEGIR_VERSION variable in the script. AEGIR_VERSION variable in the script.
Shell commands:: Shell command for Apache version::
su -s /bin/sh aegir -c "sh install.sh" su -s /bin/sh aegir -c "sh install.sh"
Shell command for Nginx version::
su -s /bin/sh aegir -c "sh install.sh --http_service_type=nginx"
Note you must run the above command as root or prefix with sudo. Note you must run the above command as root or prefix with sudo.
You will be prompted for the information necessary to complete the You will be prompted for the information necessary to complete the
...@@ -306,6 +353,7 @@ Once you have run install.sh once, drush and provision should be ...@@ -306,6 +353,7 @@ Once you have run install.sh once, drush and provision should be
installed and you can use the more powerful hostmaster-install command installed and you can use the more powerful hostmaster-install command
to retry the install if it failed the first time. to retry the install if it failed the first time.
3.2 Installing aegir with drush and provision installed 3.2 Installing aegir with drush and provision installed
------------------------------------------------------- -------------------------------------------------------
...@@ -315,7 +363,7 @@ provision in the commands directory of Drush (either ~aegir/.drush or ...@@ -315,7 +363,7 @@ provision in the commands directory of Drush (either ~aegir/.drush or
is properly installed, you can install all other aegir components using is properly installed, you can install all other aegir components using
the hostmaster-install command. the hostmaster-install command.
Shell commands:: Shell command::
drush hostmaster-install --version=HEAD drush hostmaster-install --version=HEAD
...@@ -335,6 +383,7 @@ or if not provided as a command line switch, the address prompted by the ...@@ -335,6 +383,7 @@ or if not provided as a command line switch, the address prompted by the
installer process. This e-mail address will also be used as the default e-mail installer process. This e-mail address will also be used as the default e-mail
address of the first user and client in Aegir, but can be changed later. address of the first user and client in Aegir, but can be changed later.
Checkpoint / Finished! Checkpoint / Finished!
---------------------- ----------------------
......
...@@ -87,19 +87,19 @@ you are reading this document. ...@@ -87,19 +87,19 @@ you are reading this document.
Shell commands:: Shell commands::
export AEGIR_VERSION=HEAD export AEGIR_VERSION=HEAD
export AEGIR_DIR=/var/aegir export AEGIR_HOME="$HOME"
export DRUPAL_DIR=$AEGIR_DIR/hostmaster-$AEGIR_VERSION export DRUPAL_DIR=$AEGIR_HOME/hostmaster-$AEGIR_VERSION
export DRUSH_VERSION=6.x-3.3 export DRUSH_VERSION=6.x-3.3
export DRUSH_MAKE_VERSION=6.x-2.0-beta9 export DRUSH_MAKE_VERSION=6.x-2.0-beta11
export AEGIR_DOMAIN=aegir.example.com export AEGIR_DOMAIN=aegir.example.com
export OLD_DRUPAL_DIR=$AEGIR_DIR/hostmaster-0.4-alpha9 export OLD_DRUPAL_DIR=$AEGIR_HOME/hostmaster-0.4-beta2
This document also assumes drush is installed properly and we use an This document also assumes drush is installed properly and we use an
environment variable to simplify the documentation again. environment variable to simplify the documentation again.
Shell commands:: Shell commands::
export DRUSH="php $AEGIR_DIR/drush/drush.php" export DRUSH="php $AEGIR_HOME/drush/drush.php"
Generic upgrade instructions Generic upgrade instructions
============================ ============================
...@@ -134,7 +134,7 @@ frontend. ...@@ -134,7 +134,7 @@ frontend.
Shell commands:: Shell commands::
cd $AEGIR_DIR cd $AEGIR_HOME
mv drush drush.bak mv drush drush.bak
wget http://ftp.drupal.org/files/projects/drush-$DRUSH_VERSION.tar.gz wget http://ftp.drupal.org/files/projects/drush-$DRUSH_VERSION.tar.gz
gunzip -c drush-$DRUSH_VERSION.tar.gz | tar -xf - gunzip -c drush-$DRUSH_VERSION.tar.gz | tar -xf -
......
...@@ -15,7 +15,7 @@ function drush_provision_hostmaster_install_validate($site = NULL) { ...@@ -15,7 +15,7 @@ function drush_provision_hostmaster_install_validate($site = NULL) {
drush_set_default('script_user', provision_current_user()); drush_set_default('script_user', provision_current_user());
drush_set_default('web_group', _provision_default_web_group()); drush_set_default('web_group', _provision_default_web_group());
drush_set_default('http_service_type', 'apache'); drush_set_default('http_service_type', 'apache');
drush_set_default('drush_make_version', '6.x-2.0-beta10'); drush_set_default('drush_make_version', '6.x-2.0-beta11');
drush_set_default('aegir_db_user', 'root'); drush_set_default('aegir_db_user', 'root');
$aegir_db_user = drush_get_option('aegir_db_user'); $aegir_db_user = drush_get_option('aegir_db_user');
drush_set_default('makefile', $aegir_root . '/.drush/provision/aegir.make'); drush_set_default('makefile', $aegir_root . '/.drush/provision/aegir.make');
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
# guess the aegir version based on the info file # guess the aegir version based on the info file
AEGIR_VERSION=HEAD AEGIR_VERSION=HEAD
DRUSH_VERSION=7.x-4.0 DRUSH_VERSION=6.x-3.3
######################################################################## ########################################################################
# functions # functions
......
...@@ -43,8 +43,8 @@ function drush_provision_drupal_provision_clone($new_uri, $platform = null) { ...@@ -43,8 +43,8 @@ function drush_provision_drupal_provision_clone($new_uri, $platform = null) {
$options['name'] = $new_uri; $options['name'] = $new_uri;
$options['platform'] = (isset($platform)) ? $platform : $options['platform']; $options['platform'] = (isset($platform)) ? $platform : $options['platform'];
$options['root'] = d($options['platform'])->root; $options['root'] = d($options['platform'])->root;
$options['aliases'] = array(); $options['aliases'] = drush_get_option('aliases');
$options['redirection'] = 0; $options['redirection'] = drush_get_option('redirection');
if ($profile = drush_get_option('profile', FALSE)) { if ($profile = drush_get_option('profile', FALSE)) {
$options['profile'] = $profile; $options['profile'] = $profile;
......
...@@ -173,14 +173,13 @@ class provisionContext_server extends provisionContext { ...@@ -173,14 +173,13 @@ class provisionContext_server extends provisionContext {
'relative' => TRUE, 'relative' => TRUE,
'keep-dirlinks' => TRUE, 'keep-dirlinks' => TRUE,
'omit-dir-times' => TRUE, 'omit-dir-times' => TRUE,
'delete' => TRUE,
), $additional_options); ), $additional_options);
// We need to do this due to how drush creates the rsync command. // We need to do this due to how drush creates the rsync command.
// If the option is present at all , even if false or null, it will // If the option is present at all , even if false or null, it will
// add it to the command. // add it to the command.
if (!isset($additional_options['no-delete'])) { if (!isset($additional_options['no-delete']) || $additional_options['no-delete'] == FALSE ) {
$options['delete'] = TRUE; $options['delete'] = TRUE;
} }
......
...@@ -16,8 +16,8 @@ AEGIR_DOMAIN=aegir.example.com ...@@ -16,8 +16,8 @@ AEGIR_DOMAIN=aegir.example.com
AEGIR_HOME="$HOME" AEGIR_HOME="$HOME"
DRUPAL_DIR=$AEGIR_HOME/hostmaster-$AEGIR_VERSION DRUPAL_DIR=$AEGIR_HOME/hostmaster-$AEGIR_VERSION
DRUSH_VERSION=7.x-4.0 DRUSH_VERSION=6.x-3.3
DRUSH_MAKE_VERSION=6.x-2.0-beta10 DRUSH_MAKE_VERSION=6.x-2.0-beta11
OLD_DRUPAL_DIR=$AEGIR_HOME/hostmaster-0.4-beta2 OLD_DRUPAL_DIR=$AEGIR_HOME/hostmaster-0.4-beta2
DRUSH_DIR=$AEGIR_HOME/drush DRUSH_DIR=$AEGIR_HOME/drush
DRUSH="php $DRUSH_DIR/drush.php" DRUSH="php $DRUSH_DIR/drush.php"
...@@ -75,8 +75,8 @@ cat <<EOF ...@@ -75,8 +75,8 @@ cat <<EOF
The Aegir version to upgrade to is $AEGIR_VERSION The Aegir version to upgrade to is $AEGIR_VERSION
The Aegir home dir is $AEGIR_HOME The Aegir home dir is $AEGIR_HOME
The new hostmaster platform will be $DRUPAL_DIR The new hostmaster platform will be $DRUPAL_DIR
The version of Drush is $DRUSH_VERSION The version of Drush will be $DRUSH_VERSION
The version of Drush Make is $DRUSH_MAKE_VERSION The version of Drush Make will be $DRUSH_MAKE_VERSION
Your Aegir domain is $AEGIR_DOMAIN Your Aegir domain is $AEGIR_DOMAIN
Your old hostmaster platform was $OLD_DRUPAL_DIR Your old hostmaster platform was $OLD_DRUPAL_DIR
The Drush command is "$DRUSH" The Drush command is "$DRUSH"
......