SPIP
Présentation
TODO cékoidonc
Mutualisation
Aide de référence : http://www.spip-contrib.net/La-mutualisation-facile Merci à Philippe Drouot pour ses explications et son plugin
Procédure rapide pour tester sur sa machine
Téléchargement des fichiers
- Création de /var/www/mutualisation/ et récupération de spip svn
sudo svn checkout svn://trac.rezo.net/spip/spip /var/www/mutualisation/
- Création de /var/www/mutualisation/mutualisation et récupération de zone.spip.org/spip-zone/_plugins_/_test_/mutualisation
sudo svn co svn://zone.spip.org/spip-zone/_plugins_/_test_/mutualisation/ /var/www/mutualisation/mutualisation/
Configuration
Modif de /etc/apache2/sites-available/default : modifier le DocumentRoot par défaut pour le remplacer par DocumentRoot /var/www/mutualisation + relance d'apache
sudo apache2ctl restart
Créer /var/www/mutualisation/config/mes_options.php comme indiqué dans http://www.spip-contrib.net/La-mutualisation-facile (typiquement prendre l'exemple indiqué dans la section "Création automatique d’un utilisateur sur la base de donnée créé automatiquement" en renseignant _INSTALL_USER_DB_ROOT et _INSTALL_PASS_DB_ROOT)
<?php if (!defined("_ECRIRE_INC_VERSION")) return; require _DIR_RACINE.'mutualisation/mutualiser.php'; $site = str_replace('www.', '', $_SERVER['HTTP_HOST']); if ($site != $_SERVER['HTTP_HOST']) { include_spip('inc/headers'); redirige_par_entete('http://'.$site.'/'); } define('_DIR_PLUGINS', _DIR_RACINE . 'sites/' . $site . '/plugins/'); define ('_INSTALL_SERVER_DB', 'mysql'); define ('_INSTALL_HOST_DB', 'localhost'); define ('_INSTALL_USER_DB_ROOT', 'root'); define ('_INSTALL_PASS_DB_ROOT', '******'); define ('_INSTALL_NAME_DB', 'mu_'.prefixe_mutualisation($site)); define ('_INSTALL_TABLE_PREFIX', 'spip'); /* Inutile pour le moment mais ca te servira pour le service d'hébergement avec les utilisateurs / code d'activation stockés en BD define ('_INSTALL_PANEL_HOST_DB', 'localhost'); define ('_INSTALL_PANEL_USER_DB', 'root'); define ('_INSTALL_PANEL_PASS_DB', '******'); define ('_INSTALL_PANEL_NAME_DB', 'mutualisation_spip'); define ('_INSTALL_PANEL_NAME_TABLE', 'utilisateurs'); define ('_INSTALL_PANEL_FIELD_SITE', 'url'); define ('_INSTALL_PANEL_FIELD_PASS', 'password'); define ('_INSTALL_PANEL_FIELD_CODE', 'code'); */ demarrer_site($site, array( 'creer_site' => true, 'creer_base' => true, 'creer_user_base' => true, 'repertoire' => 'spip', /*'code' => 'etrangerencontre', 'mail' => 'phil@africacomputing.org', 'utiliser_panel' => true */ ) ); ?>
Tests
Pour tester sur sa machine des trucs bidons, éditer /etc/hosts et ajouter des lignes du genre :
127.0.0.1 toto.chezmoi 127.0.0.1 titi.chezmoi 127.0.0.1 tutu.chezmoi
Se rendre sur http://toto.chezmoi, l'installation automatique de spip devrait apparaître. (Mot d'activation par défaut : ecureuil)