Mahara Wiki > Mahara - en français > Installation de Mahara

Installation de Mahara

De $1

Traduction non complète ... avis aux amateurs !

Article proche: Upgrading Mahara

Installer Mahara necessite quelques connaissances basiques du fonctionnement d'une application web. Ce manuel necessite donc que vous compreniez les bases de la gestion de serveurs web et de bases de données.

Si vous fonctionnez sous Debian/Ubuntu, sachez que bon nombre des logiciels requis peuvent etre installé grace à la commande apt-get. Si vous utilisez une distriution differente de linux, vous devez etre en mesure d'utiliser les outils d'installation specifiques à cette derniere.

Si vous souhaitez installer mahara dans un language autre que l'anglais, vous pouvez installer les differents packs de langues une fois mahara installé, les instructions relative à l'installation d'un nouveau language sont disponibles ci-dessous.

1. Configuration requise

Environement de travail de base

  • Linux
  • PHP 5.1.3+
  • Postgres 8.1+ (recommander), or MySQL 5.0.25+. Avec MySQL, les tables InnoDB seront requises ainsi qu'un systeme Interclassement en UTF8.
  • Apache 2 (apache 1 fonctionnera egalement si necessaire.)

NOTE: Votre version de MySQL doit etre au minimum la 5.0.25 - Voir http://bugs.mysql.com/bug.php?id=20519 pour un bug avec les version precedentes affectant le bon fonctionnement de Mahara.

Les extensions PHP

  • gd
  • json
  • curl (Requis depuis Mahara 1.1. Precedemment necessaire pour le support réseau)
  • libxml
  • SimpleXML
  • session
  • pgsql OU mysqli
  • Pour le support réseau : openssl ET xmlrpc
  • Optionellement: imagick
  • exim, qui etait necessaire pour Mahara 1.1.0 à 1.1.4, est dorénavant optionel.

Puis-je utiliser un OS windows pour heberger mahara ?

Les utilisateurs peuvent acceder à Mahara avec un naviguateur web standard. Pour l'hebergement, Mahara à été conçu pour Linux, Apache, PHP et les bases de donnée SQL. Très peu d'experimentations ont, à ce jour, été faites sous un environnement Windows.

=== Partie non traduite ===

Mahara 1.1 should be installable on Windows, but Mahara 1.0 requires some things that don't ship with Windows. For those people who are adventurous enough to try, it seems that you need to install an equivalent of the 'file' program (see Bug #700), among other things, to make it work.

=== Partie non traduite ===

Des instructions pour l'installation de Mahara avec Wampserver sont disponibles et devraient vous aider à realiser cette opération.

Windows serat-il supporté dans le future ?

Nous avons dès à present entendu parlé d'installation fonctionnelles sous windows. Vous devrier donc etre à meme de faire fonctionner Mahara sous windows sans trop de peines, Mais nous ne prenont pas en charge officiellement le support de Mahara sous windows et ne seront pas en mesure de vous assister en cas de probleme.

Et sous un environnement Solaris, Mac, BSD ou autre ?

The developers do not explicitly test for these OSes. While they may well work, there may be issues that the developers cannot help you with. If you come across an issue and work out why it doesn't work, please consider posting in the forums or opening a bug report, so that others may benefit too!

What about using Other Web Server/Other Database/Other PHP?

No other webservers are tested, you're on your own. Please contact the dev team in #mahara/on forums if you're interested in implementing support for other databases. PHP 5.1+ is required, all versions above this should be fine.

Puis-je utiliser un hebergement partagé ?

Peut-etre. cela depend devotre hebergeur, certain desactivent certaine fonctions ou utilisent "safe mode", ce qui peut affecter serieusement le fonctionnement de mahara. Mahara n'est pas specifiquement concut pour les hebergement partagés - toujours etant, nous gardons cela à l'esprit et acceptons la creation de patchs dans cette intention mais l'hebergement partagé, par nature, limite votre champ d'action. Il est donc conseillé de travailler sur un Serveur Privé Virtuel (VPS) ou sur un serveur dédié tant que possible.

Si votre hebergeur a desactivé exec, Mahara 1.0 ne serat pas en mesure de detecter correctement les fichiers images, la generation de miniatures en sera donc affectée. voyez ce rapport d'erreur pour de plus amples informations. Depuis Mahara 1.1, cela n'est plus un probleme mais exec sera sans doute utilisé dans le futur pour d'autres fonctionnalités.

=== Partie non traduite ===

Hosts often (stupidly) set AllowOverride None, meaning that .htaccess isn't allowed. If you are getting 500 errors when trying to set up your site, you may find commenting out the php_flag lines, or removing the .htaccess file is necessary. This will not cause a critical reduction in functionality, but if you are forced to remove the entire file it will make your site less performant than it otherwise would be. [Note: The .htaccess file may be invisible on Mac OS X and your server; it may be best to make changes to this file from a Windows based PC and upload it from that platform, which is possible despite the fact that it may appear as a nameless file.]

 

=== Partie non traduite ===

 

2. Obtenir Mahara.

Vous pouvez telecharger une distribution standard de Mahara, ou obtenir le projet depuis un depot GIT si vous savez comment fonctionne ce dernier :

git clone git://git.mahara.org/git/mahara.git

Si vous passez par GIT, vous pouvez obtenir la version specifique de Mahara qui vous interesse :Voyez git.mahara.org pour une liste des version dans notre depot GIT. Par exemple :

git clone git://git.mahara.org/git/mahara.git
git checkout -b 1.1_STABLE origin/1.1_STABLE

3. Créer la base de données

Vous devez créer une base de donnée pour Mahara et vous assurer que le serveur web est en mesure de s'y connecter. Les instruction pour la creation de cette derniere suivent, si vous avez acces à CPanel ou à un logiciel similaire, vous avez la possibilité de créer la base par l'intermediaire de celui-ci.

Votre base de données doit etre encodée en UTF8. Les commandes suivantes créent une base UTF8, si vous utilisez CPanel, vous devez vous assurer que la base de données crée est bien en UTF8.

Lignes de commandes pour Postgres:

# Si vous avez à creer un utilisateur de base de données :
createuser -SRDP (nom d'utilisateur)
# création de la base :
createdb -U (nom de l'utilisateur de connection) -EUTF8 (nom de base de données)

lignes de commandes pour MySQL:

mysql -Uroot
[entrer un mot de passe]
create database (nom de base de données) character set UTF8;
grant all on (nom de base de données).* to 'nom'@'localhost' identified by 'password';

Quel type de base de données dois-je choisir en priorité ?

 

Les devellopeurs resommandent PostgreSQL pour une stabilité maximum et le respet de l'integrité des données. Convenablement configuré, PostgreSQL fournira de meilleures performances que MySQL.

 

=== Partie non traduite ===

Furthermore, PostgreSQL can do DDL in transactions - that is to say BEGIN; CREATE TABLE foo(bar int); ROLLBACK; actually works how you would expect. This makes the upgrade process a lot safer, if the upgrade fails you know you won't have left your database schema in a mess that can't be automatically upgraded once the original problem is fixed.

We cannot say this enough - even if you have never used PostgreSQL before, if you have the option to use it, then use it. You will save yourself a lot of hassle when your site needs upgrading, and the system will be more stable. Everyone who has used MySQL seriously is aware that sometimes MySQL corrupts tables, and performs badly under high load. PostgreSQL has none of these problems.

Here is a forum thread with a detailed explanation of this recommendation, and examples of where using Postgres is advantageous for Mahara.

=== Partie non traduite ===


4. Installation et configuration du programme.

Configuration PHP

Vous devez vous assurer que magic_quotes_gpc et register_globals sont off. Mahara vous avertira de toute autre configuration representant un risque quel qu'il soit lors de son fonctionnement. 

Mahara also ships with a .htaccess file that will ensure that bad settings are off.

Installation des fichiers Mahara

Copier le contenu du dossier htdocs/ sur votre serveur web :

  • Copier le repertoir en entier et le renommer dans quelque chose du genre 'mahara' - votre site apparaitra alors comme cela : example.org/mahara/; ou

  • Copier le contenu du repertoire htdocs/ au niveau superieur du repertoire publique (souvent appelé htdocs ou public_html) de votre serveur web, votre site apparaitra alors comme cela : example.org

Configuration de Apache 

=== Partie non traduite ===

If you're on shared hosting, you probably are not able to change this, so you can ignore this section.

For others, the simplest of Apache VirtualHost configurations will be sufficient:

<VirtualHost *:80>         ServerName example.org         DocumentRoot /path/to/mahara/htdocs          ErrorLog /var/log/apache2/mahara-1-1-stable.error.log         CustomLog /var/log/apache2/mahara-1-1-stable.access.log combined </VirtualHost>

Please note that your apache configuration should contain no ServerAliases. Mahara expects to be accessed through ONE URL. This gives certainty that cookies are set for the right domain, and also means that SSL certificates for the networking functionality can be generated for this one URL. If you use a server alias, you should expect to see problems like having to log in twice, and potentially SSO between your site and others breaking.

However, you can still make both example.org and www.example.org work for your site, if you use another VirtualHost directive:

<VirtualHost *:80>     ServerName www.example.org     # You can add ServerAliases here if you want more than one URL to redirect to your main site     # ServerAlias foo.example.org      Redirect Permanent / http://example.org/ </VirtualHost>


Mahara Configuration

You need to make a directory (outside the document root) and ensure the web server user has write access to it. This is where Mahara will store data like uploaded files, and is referred to as dataroot by Mahara. You also need to make sure that you can somehow write to this directory also - whether by having root access or otherwise.

In htdocs/ is config-dist.php. You need to make a copy of this called config.php. You then need to go through the file and make changes where appropriate. The file is commented, and there are not many settings to change. However, take special note of the following settings:

  • database connection details — ensure you include the database connection details by inserting the proper values for $cfg->dbname, $cfg->dbuser, $cfg->dbpass, $cfg->dbprefix.
    • Note: You do not need to set dbprefix, unlike Moodle. Try not using it first, and see if it works. If you find you do need it, you may find it best to leave dbprefix empty and add the prefix directly to $cfg->dbname, $cfg->dbuser values.

  • dataroot - set this to the filesystem path to the directory you made that the web server user can write to. Please note this is a filesystem path, which on linux will look like /path/to/your/directory and on windows will look like C:\path\to\your\directory. This is NOT a web address such as http://example.org/maharadata!

  • directorypermissions - if you're on a server where you do not have root access, you should change this from 0700 to 0777 or similar, so that you can download your dataroot later for backup purposes, and install language packs.

Cron Job

You will need to set up a cron job to hit htdocs/lib/cron.php every minute. Mahara implements its own cron internally, so hitting cron every minute is sufficient to make everything work.

If you don't set up the cron job, you will find that RSS feeds will not update, and some email notifications won't be sent out, such as forum post notifications.

You can set it up using the command line 'php' command to run the cron script, or by using a command line web browser such as lynx or w3m.

Something like the following in a crontab file will be sufficient:

* * * * * www-data php /path/to/mahara/htdocs/lib/cron.php

5. Run the Web Based Installer

Once you have set up your config.php, you should now be able to navigate to the Mahara installation using your web browser. This will pop up a page stating the conditions of using Mahara, and will ask for agreement. If you agree with the conditions, click "agree" and Mahara will install itself into your database. Click continue, and you should now be at a login screen.

Log into the system with user "admin", password "mahara". Congratulations!

What if the installation process breaks with an error?

Sometimes this can happen. Normally this is because of some misconfiguration in your system - for example, you haven't granted your database user permission to create tables, or you aren't using a high enough version of your database (see the dependencies). Sometimes, it's because of a bug in the Mahara installer. In order to find out, you will need to check the error log for your webserver. Mahara dumps detailed information in there where a bug occurs.

The message might show you that the problem is with your configuration, but if it looks like a problem with Mahara, you should make a bug report with the information from your logs, so we can fix it.

If you were able to fix the problem, you might need to drop and re-create your database again, so you're starting the installation again without any of the previously installed tables in the way.

6. Optional: Other Language Installation

Mahara ships only with an English language pack, but you can download and install support for other languages. You install language packs in a subdirectory of your dataroot directory, called "langpacks".

To install a language pack:

  1. Make sure you have a "langpacks" directory inside your dataroot directory - one should have already been created for you.
  2. Download the language pack you want to install from the language packs page.
  3. Decompress the downloaded TGZ archive.
  4. Copy the obtained directory to the 'langpacks' directory inside your dataroot.

Now you will be able to visit the Site Administration of your Mahara and choose the appropriate default language. Users will also be able to choose what language they use.

Troubleshooting

 If you are having problems installing Mahara, please check out the Installation Instructions Troubleshooting Page for answers to some common problems.

=== Partie non traduite ===

 

Mots clés:
 
Images (0)
 
Commentaires (0)
Vous devez être connecté pour poster un commentaire.

 
Propulsé par MindTouch Deki Edition Open Source v.8.08.1a