2008-08-02 13:13:21 +00:00
|
|
|
# Quick installation instruction
|
|
|
|
|
2008-11-13 07:52:56 +00:00
|
|
|
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.
|
|
|
|
|
2008-11-26 20:34:47 +00:00
|
|
|
## 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
|
|
|
|
|
2008-11-13 07:52:56 +00:00
|
|
|
## Installation of Pluf
|
|
|
|
|
2008-08-02 13:13:21 +00:00
|
|
|
* Checkout the trunk of [Pluf](http://www.pluf.org).
|
2009-01-31 22:04:59 +00:00
|
|
|
* Install the `Mail` and `Mail_mime` classes from [PEAR](http://pear.php.net). You must use the `--alldeps` flag when installing these modules.
|
|
|
|
|
|
|
|
**Pear install/upgrade:**
|
2008-11-13 07:52:56 +00:00
|
|
|
|
2009-01-11 15:30:47 +00:00
|
|
|
$ sudo pear upgrade-all
|
2008-11-13 07:52:56 +00:00
|
|
|
$ sudo pear install --alldeps Mail
|
|
|
|
$ sudo pear install --alldeps Mail_mime
|
|
|
|
|
2009-01-21 18:27:16 +00:00
|
|
|
If you already have some of the PEAR packages installed with your
|
|
|
|
distribution, the `Mail` package is often not up-to-date,
|
|
|
|
[read more here](http://projects.ceondo.com/p/indefero/issues/104/#ic347).
|
|
|
|
|
2008-11-26 20:34:47 +00:00
|
|
|
The Pluf installation folder is the folder containing the file `Pluf.php`.
|
2008-11-13 07:52:56 +00:00
|
|
|
|
|
|
|
## 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.
|
2008-08-02 13:13:21 +00:00
|
|
|
* 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.
|
2009-10-09 08:16:00 +00:00
|
|
|
* Make a copy of `src/IDF/conf/path.php-dist` as `src/IDF/conf/path.php`.
|
|
|
|
* Update the path.php file to match your installation paths. It should work out of the box if you followed the recommended file layout.
|
2008-11-24 09:50:37 +00:00
|
|
|
* Open a terminal/shell and go into the `src` folder in the InDefero installation folder.
|
2008-11-26 20:34:47 +00:00
|
|
|
|
2009-01-31 22:04:59 +00:00
|
|
|
**Command:**
|
|
|
|
|
2008-11-26 20:34:47 +00:00
|
|
|
$ 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.
|
2008-12-02 11:53:23 +00:00
|
|
|
* More details about the migration is available in the [migration documentation](http://pluf.org/doc/migrations.html) of the Pluf framework.
|
2009-01-31 22:04:59 +00:00
|
|
|
* 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.
|
|
|
|
|
|
|
|
**Bootstrap script:**
|
2008-08-02 13:13:21 +00:00
|
|
|
|
|
|
|
<?php
|
2009-10-09 08:16:00 +00:00
|
|
|
require '/home/www/indefero/src/IDF/conf/path.php';
|
2008-08-02 13:13:21 +00:00
|
|
|
require 'Pluf.php';
|
2009-01-12 20:36:05 +00:00
|
|
|
Pluf::start('/home/www/indefero/src/IDF/conf/idf.php');
|
2008-08-02 13:13:21 +00:00
|
|
|
Pluf_Dispatcher::loadControllers(Pluf::f('idf_views'));
|
|
|
|
|
|
|
|
$user = new Pluf_User();
|
|
|
|
$user->first_name = 'John';
|
2008-11-26 20:34:47 +00:00
|
|
|
$user->last_name = 'Doe'; // Required!
|
2009-01-25 20:00:21 +00:00
|
|
|
$user->login = 'doe'; // must be lowercase!
|
2008-08-02 13:13:21 +00:00
|
|
|
$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";
|
|
|
|
?>
|
|
|
|
|
2008-11-13 07:52:56 +00:00
|
|
|
* Run `php www/bootstrap.php`.
|
|
|
|
* Remove the `www/bootstrap.php` file.
|
2008-11-26 20:34:47 +00:00
|
|
|
* Open the `www/index.php` file and ensure that the path to Pluf and
|
|
|
|
Indefero are correctly set for your configuration.
|
2008-12-01 12:48:39 +00:00
|
|
|
* Now you can login with this user into the interface.
|
2009-10-01 12:44:39 +00:00
|
|
|
* Click on the Forge Management link on top and create your first project.
|
2008-08-02 13:13:21 +00:00
|
|
|
|
2008-11-27 10:23:38 +00:00
|
|
|
## 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.
|
2009-01-13 09:05:01 +00:00
|
|
|
* Remove all the `*.phps` files in your temp folder.
|
|
|
|
* Upgrade the database with the upgrade commands:
|
|
|
|
|
|
|
|
**Upgrade commands:**
|
2008-11-27 10:23:38 +00:00
|
|
|
|
2009-10-09 08:16:00 +00:00
|
|
|
$ cd /home/www/indefero/src
|
2008-11-27 10:23:38 +00:00
|
|
|
$ 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
|
|
|
|
|
2009-01-13 09:05:01 +00:00
|
|
|
|
2008-12-08 08:56:31 +00:00
|
|
|
## Repository Synchronization
|
2008-12-07 19:44:26 +00:00
|
|
|
|
2008-12-08 08:56:31 +00:00
|
|
|
The documentation is available in the `doc` folder.
|
|
|
|
|
|
|
|
* Subversion: `doc/syncsvn.mdtext`.
|
|
|
|
* Mercurial: `doc/syncmercurial.mdtext`.
|
2009-01-31 22:07:55 +00:00
|
|
|
* Git: `doc/syncgit.mdtext`.
|
2008-12-07 19:44:26 +00:00
|
|
|
|
2008-11-11 10:40:29 +00:00
|
|
|
## 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/`
|
|
|
|
and not `http://yourdomain.com/index.php/p/yourproject/` you can use
|
|
|
|
the following `.htaccess` file to be put in the same folder of the
|
|
|
|
`www/index.php` file.
|
|
|
|
|
2009-01-13 09:05:01 +00:00
|
|
|
Options +FollowSymLinks
|
2008-11-11 10:40:29 +00:00
|
|
|
RewriteEngine On
|
|
|
|
RewriteCond %{REQUEST_FILENAME} !-f
|
|
|
|
RewriteCond %{REQUEST_FILENAME} !-d
|
|
|
|
RewriteRule ^(.*) /index.php/$1
|
|
|
|
|
2009-01-13 09:05:01 +00:00
|
|
|
`Options +FollowSymLinks` is only needed if you are using symlinks.
|
2008-11-11 10:40:29 +00:00
|
|
|
|
2008-11-26 20:34:47 +00:00
|
|
|
## 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.
|
|
|
|
|
2008-11-26 21:08:12 +00:00
|
|
|
## 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';
|
|
|
|
|
2009-08-07 18:03:52 +00:00
|
|
|
## FreeBSD Installation
|
|
|
|
|
|
|
|
You need to install `/usr/ports/lang/php5-extensions` which contains
|
|
|
|
the Standard PHP Library (SPL).
|
|
|
|
|
2009-01-14 20:52:59 +00:00
|
|
|
## Using a SMTP server with authentication
|
|
|
|
|
|
|
|
If your SMTP server requires authentication, for example,
|
|
|
|
*smtp.gmail.com*, you can use the following email configuration:
|
|
|
|
|
|
|
|
$cfg['send_emails'] = true;
|
|
|
|
$cfg['mail_backend'] = 'smtp';
|
|
|
|
$cfg['mail_auth'] = true;
|
|
|
|
$cfg['mail_host'] = 'ssl://smtp.gmail.com';
|
|
|
|
$cfg['mail_port'] = 465;
|
|
|
|
$cfg['mail_username'] = 'YOURGMAILADDRESS';
|
|
|
|
$cfg['mail_password'] = 'YOURPASSWORD';
|
|
|
|
|
|
|
|
Check with your provider to get the right settings.
|
|
|
|
|
2010-01-15 09:42:07 +00:00
|
|
|
## Git Daemon on Ubuntu Karmic
|
|
|
|
|
|
|
|
If you have problems getting it to run, you can follow this procedure
|
|
|
|
proposed by Mathias in ticket 369.
|
|
|
|
|
|
|
|
1. Install git-daemon-run in addition to git-core
|
|
|
|
2. Edit /etc/sv/git-daemon/run to look as follows:
|
|
|
|
|
|
|
|
#!/bin/sh
|
|
|
|
exec 2>&1
|
|
|
|
echo 'git-daemon starting.'
|
|
|
|
exec chpst -ugit:git \
|
|
|
|
/usr/lib/git-core/git-daemon \
|
|
|
|
--reuseaddr \
|
|
|
|
--syslog \
|
|
|
|
--verbose \
|
|
|
|
--base-path=/home/git/repositories \
|
|
|
|
/home/git/repositories
|
|
|
|
|
|
|
|
3. Restart git-daemon-run
|
|
|
|
|
|
|
|
sv restart git-daemon
|