Root/
| Source at commit a5acd5d6cacc388450bd91573436722fabc40a8f created 1 year 4 months ago. By Loic d'Anterroches, Improved the documentation based on a LinuxFr comment. | |
|---|---|
| 1 | # Quick installation instruction |
| 2 | |
| 3 | The installation of InDefero is composed of 2 parts, first the |
| 4 | installation of the [Pluf framework](http://www.pluf.org) and second, |
| 5 | the installation of InDefero by itself. |
| 6 | |
| 7 | ## Installation of Pluf |
| 8 | |
| 9 | * Checkout the trunk of [Pluf](http://www.pluf.org). |
| 10 | * Install the `Mail` and `Mail_mime` classes from [PEAR](http://pear.php.net). You must use the `--alldeps` flag when installing these modules: |
| 11 | |
| 12 | $ sudo pear install --alldeps Mail |
| 13 | $ sudo pear install --alldeps Mail_mime |
| 14 | |
| 15 | The Pluf installation folder is the folder containing the file `Pluf.php`. |
| 16 | |
| 17 | ## Installation of InDefero |
| 18 | |
| 19 | The installation is composed of the following steps: |
| 20 | |
| 21 | * Get the InDefero archive. |
| 22 | * Configure it correctly. |
| 23 | * Installation the database with the `migrate.php` script. |
| 24 | * Bootstrap the application with a `bootstrap.php` script. |
| 25 | |
| 26 | Here is the step-by-step installation procedure: |
| 27 | |
| 28 | * Extract the InDefero archive somewhere. |
| 29 | * The InDefero installation folder is the folder containing this file INSTALL.mdtext. |
| 30 | * Make a copy of `src/IDF/conf/idf.php-dist` as `src/IDF/conf/idf.php`. |
| 31 | * Update the idf.php file to match your system. |
| 32 | * Open a terminal/shell and go into the InDefero installation folder. |
| 33 | * Run `php /path/to/pluf/src/migrate.php --conf=src/IDF/conf/idf.php -a -i -d -u` to test the installation of the tables. |
| 34 | * Run `php /path/to/pluf/src/migrate.php --conf=src/IDF/conf/idf.php -a -i -d` to really install the tables. |
| 35 | * Create a bootstrap file to create the first project and admin user for example `www/bootstrap.php`. Do not forget to update the second line with your path to Pluf: |
| 36 | |
| 37 | <?php |
| 38 | set_include_path(get_include_path().PATH_SEPARATOR.dirname(__FILE__).'/../src'); |
| 39 | set_include_path(get_include_path().PATH_SEPARATOR.'/path/to/pluf/src'); |
| 40 | require 'Pluf.php'; |
| 41 | Pluf::start(dirname(__FILE__).'/../src/IDF/conf/idf.php'); |
| 42 | Pluf_Dispatcher::loadControllers(Pluf::f('idf_views')); |
| 43 | |
| 44 | $project = new IDF_Project(); |
| 45 | $project->name = 'Your project'; |
| 46 | $project->shortname = 'yourproject'; //Only letters digits |
| 47 | $project->description = 'This is your project.'; |
| 48 | $project->create(); |
| 49 | $user = new Pluf_User(); |
| 50 | $user->first_name = 'John'; |
| 51 | $user->last_name = 'Doe'; |
| 52 | $user->login = 'doe'; |
| 53 | $user->email = 'doe@example.com'; |
| 54 | $user->password = 'yourpassword'; // the password is salted/hashed |
| 55 | // in the database, so do not worry :) |
| 56 | $user->administrator = true; |
| 57 | $user->active = true; |
| 58 | $user->create(); |
| 59 | print "Bootstrap ok\n"; |
| 60 | ?> |
| 61 | |
| 62 | * Run `php www/bootstrap.php`. |
| 63 | * Remove the `www/bootstrap.php` file. |
| 64 | |
| 65 | Now you can login with this user into the interface. |
| 66 | |
| 67 | ## For the Apache Webserver Users |
| 68 | |
| 69 | If you are using [Apache](http://httpd.apache.org/) for your webserver |
| 70 | and want to have nice URLs like `http://yourdomain.com/p/yourproject/` |
| 71 | and not `http://yourdomain.com/index.php/p/yourproject/` you can use |
| 72 | the following `.htaccess` file to be put in the same folder of the |
| 73 | `www/index.php` file. |
| 74 | |
| 75 | RewriteEngine On |
| 76 | RewriteCond %{REQUEST_FILENAME} !-f |
| 77 | RewriteCond %{REQUEST_FILENAME} !-d |
| 78 | RewriteRule ^(.*) /index.php/$1 |
| 79 | |
| 80 | |
| 81 | |
