Installation (2015-05)

Vérification

  1. hostname -f : ____ # tester avec resolveip REPONSE
  2. uname -n : ______ # tester avec resolveip REPONSE
  3. /etc/php5/cli/php.ini : disable_functions en commentaires
  4. /etc/php5/cli/php.ini : mbstring.http_input = pass
  5. /etc/php5/cli/php.ini : mbstring.http_output = pass

Mise à jour

apt-get update
apt-get upgrade
aptitude safe-ugprade # trois fois

Installation de aegir/drush

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

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

apt-get install drush

apt-get install aegir2

Configuration

Configuration de aegir2-hostmaster
-> URL: ....
-> mysql password: *****
-> mysql root password: *****

Erreurs rencontrées:

ERROR:
The following restricted PHP modes have non-empty values:            [error]
disable_functions. This configuration is incompatible with drush. 
Please check your configuration settings in /etc/php5/cli/php.ini or
in your drush.ini file; see examples/example.drush.ini for details.

vim /etc/php5/cli/php.ini
;disable_functions = ...

ERROR 2:
The drush command '@hostmaster pm-enable hosting_queued' could not be[error]
found.  Run `drush cache-clear drush` to clear the commandfile cache
if you have installed new extensions.
A Drupal installation directory could not be found                   [error]

drush cache-clear drush
(ne fonctionne pas)

apt-get install drupal7
drush cache-clear drush
apt-get install aegir2

(installation drupal7 ne fonctionne pas)

mysql_safe_install
ne répare pas

su - aegir
drush hostmaster-install

Table 'HOSTNAME.system' doesn't exist                                                                          [warning]
query: SELECT filename FROM system WHERE name = 'jquery_ui' AND type = 'module' database.mysqli.inc:134

PROVISION_INSTALL_MISSING_REQUIREMENTS                                                                                           [error]
Multibyte string input conversion in PHP is active and must be disabled. Check the php.ini mbstring.http_input setting. Please   [error]
refer to the PHP mbstring documentation for more information. (Currently using Unicode library Error)

Drush was not able to start (bootstrap) the Drupal database.                                                                     [error]
Hint: This may occur when Drush is trying to:
 * bootstrap a site that has not been installed or does not have a configured database. In this case you can select another site
with a working database setup by specifying the URI to use with the --uri parameter on the command line. See `drush topic
docs-aliases` for details.
 * connect the database through a socket. The socket file may be wrong or the php-cli may have no access to it in a jailed shell.
See http://drupal.org/node/1428638 for details.
/etc/php5/cli/php.ini
mbstring.http_input = pass
mbstring.http_output = pass

Multibyte string output conversion in PHP is active and must be disabled. Check the php.ini mbstring.http_output setting. Please [error]
refer to the PHP mbstring documentation for more information. (Currently using Unicode library Error)

apt-get install aegir2

Modifier le virtual host si nécessaire

# edition pour remplacer *:80 par 127.0.0.1:80
vim /etc/apache2/conf-enabled/aegir.conf /var/aegir/config/server_master/apache/vhost.d/DOMAIN -o
service apache2 reload

Installer une plateforme

Se connecter à http://DOMAIN/ et créer une plateforme

makefile = http://cgit.drupalcode.org/kplatforms/plain/lockfiles/Drupal7.lock?id=8.x-3.11

Récupérer un site d'une autre installation

1. Copier le fichier FILE.tar.gz dans /var/aegir/tmp/migrate
2. préparer le version avec drush
su - aegir
drush sa | grep platform # connaitre les plateformes disponibles
ls /var/aegir/clients # connaitre la liste des clients

drush provision-save @SITEWEB.COM --context_type=site --platform=@PLATEFORMEICI --uri=SITEWEB.COM --db_server=@server_localhost --client_name=NOMCLIENT

3. déployer
drush @SITEWEB.COM provision-deploy /var/aegir/tmp/migrate/FILE.tar.gz

3. modifier le virtual host si nécessaire
vim /var/aegir/config/server_master/apache/vhost.d/SITEWEB.COM

4. modifier le /etc/hosts si nécessaire
vim /etc/hosts

5. redémarrer 
service apache2 reload

6. Se connecter SITEWEB.com/?q=user référence

7. Configurer les informations dans "Configuration > Système > Informations"