Indefero

Indefero Git Source Tree


Root/INSTALL.mdtext

# Quick installation instruction
 
The installation of InDefero is composed of 2 parts, first the
installation of the [Pluf framework](http://www.pluf.org) and second,
the installation of InDefero by itself.
 
## Recommended Layout of the Files
 
If your server document root is in `/var/www` a good thing is to keep
the number of files under the `/var/www` folder to its minimum. So,
you should create a `/home/www` folder in which we are going to
install all but the files which need to be available under the
document root.
 
    /home/www/pluf/src/
    /home/www/pluf/src/Pluf.php
    /home/www/pluf/src/migrate.php
    /home/www/indefero/src
    /home/www/indefero/www
    /home/www/indefero/www/index.php
    /home/www/indefero/www/media
 
The you need to link the `media` and `index.php` files into your
docroot.
 
    $ cd /var/www
    $ ln -s /home/www/indefero/www/index.php
    $ ln -s /home/www/indefero/www/media
 
## Installation of Pluf
 
* Checkout the trunk of [Pluf](http://www.pluf.org).
* Install the `Mail` and `Mail_mime` classes from [PEAR](http://pear.php.net). You must use the `--alldeps` flag when installing these modules:
 
    $ sudo pear install --alldeps Mail
    $ sudo pear install --alldeps Mail_mime
 
The Pluf installation folder is the folder containing the file `Pluf.php`.
 
## Installation of InDefero
 
The installation is composed of the following steps:
 
* Get the InDefero archive.
* Configure it correctly.
* Installation the database with the `migrate.php` script.
* Bootstrap the application with a `bootstrap.php` script.
 
Here is the step-by-step installation procedure:
 
* Extract the InDefero archive somewhere.
* The InDefero installation folder is the folder containing this file INSTALL.mdtext.
* Make a copy of `src/IDF/conf/idf.php-dist` as `src/IDF/conf/idf.php`.
* Update the idf.php file to match your system.
* Open a terminal/shell and go into the `src` folder in the InDefero installation folder.
 
    $ cd /home/www/indefero/src
 
* Run `php /home/www/pluf/src/migrate.php --conf=IDF/conf/idf.php -a -i -d -u` to test the installation of the tables.
* Run `php /home/www/pluf/src/migrate.php --conf=IDF/conf/idf.php -a -i -d` to really install the tables.
* Create a bootstrap file to create the admin user for example `www/bootstrap.php`. Do not forget to update the second line with your path to Pluf:
 
    <?php
    set_include_path(get_include_path().PATH_SEPARATOR.dirname(__FILE__).'/home/www/indefero/src');
    set_include_path(get_include_path().PATH_SEPARATOR.'/home/www/pluf/src');
    require 'Pluf.php';
    Pluf::start(dirname(__FILE__).'/home/www/indefero/src/IDF/conf/idf.php');
    Pluf_Dispatcher::loadControllers(Pluf::f('idf_views'));
     
    $user = new Pluf_User();
    $user->first_name = 'John';
    $user->last_name = 'Doe'; // Required!
    $user->login = 'doe';
    $user->email = 'doe@example.com';
    $user->password = 'yourpassword'; // the password is salted/hashed
                                      // in the database, so do not worry :)
    $user->administrator = true;
    $user->active = true;
    $user->create();
    print "Bootstrap ok\n";
    ?>
 
* Run `php www/bootstrap.php`.
* Remove the `www/bootstrap.php` file.
* Open the `www/index.php` file and ensure that the path to Pluf and
  Indefero are correctly set for your configuration.
* Now you can login with this user into the interface.
* Click on the Administer link on top and create your first project.
 
## Upgrade InDefero
 
To upgrade:
 
* Make a backup of your data, including the database.
* Extract the new archive on top of the current one.
* Update your version of Pluf.
* Check that the path in the `index.php` are still good.
* Upgrade the database with:
 
    $ php /home/www/pluf/src/migrate.php --conf=IDF/conf/idf.php -a -d -u
    $ php /home/www/pluf/src/migrate.php --conf=IDF/conf/idf.php -a -d
 
## For the Apache Webserver Users
 
If you are using [Apache](http://httpd.apache.org/) for your webserver
and want to have nice URLs like `http://yourdomain.com/p/yourproject/`
the following `.htaccess` file to be put in the same folder of the
`www/index.php` file.
 
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*) /index.php/$1
 
 
## For the Gentoo users
 
If you get the error:
 
    T_CHARACTER Use of undefined constant T_CHARACTER - assumed 'T_CHARACTER'"
 
you need to compile PHP with the "tokenizer" flag.
 
## For People with open_basedir restriction error
 
If you get an error like:
 
    file_get_contents(): open_basedir restriction in effect.
    File(/etc/mime.types) is not within the
    allowed path(s): (/srv/http/:/home/:/tmp/:/usr/share/pear/)
 
Just copy the file `/etc/mime.types` into the folder `/home` and put
this in your configuration file:
 
    $cfg['idf_mimetypes_db'] = '/home/mime.types';

Archive Download this file

Page rendered in 0.11197s using 11 queries.