Indefero

Indefero Git Source Tree

Root/INSTALL.mdtext

1# Quick installation instruction
2
3The installation of InDefero is composed of 2 parts, first the
4installation of the [Pluf framework](http://www.pluf.org) and second,
5the installation of InDefero by itself.
6
7## PHP modules for indefero
8
9Indefero need the GD module for PHP. It's named "php5-gd" in debian.
10
11 $ apt-get install php5-gd
12
13## Recommended Layout of the Files
14
15If your server document root is in `/var/www` a good thing is to keep
16the number of files under the `/var/www` folder to its minimum. So,
17you should create a `/home/www` folder in which we are going to
18install all but the files which need to be available under the
19document root.
20
21 /home/www/pluf/src/
22 /home/www/pluf/src/Pluf.php
23 /home/www/pluf/src/migrate.php
24 /home/www/indefero/src
25 /home/www/indefero/www
26 /home/www/indefero/www/index.php
27 /home/www/indefero/www/media
28
29The you need to link the `media` and `index.php` files into your
30docroot.
31
32 $ cd /var/www
33 $ ln -s /home/www/indefero/www/index.php
34 $ ln -s /home/www/indefero/www/media
35
36## Installation of Pluf
37
38* Checkout the trunk of [Pluf](http://www.pluf.org).
39* Install the `Mail` and `Mail_mime` classes from [PEAR](http://pear.php.net). You must use the `--alldeps` flag when installing these modules.
40
41**Pear install/upgrade:**
42
43 $ sudo pear upgrade-all
44 $ sudo pear install --alldeps Mail
45 $ sudo pear install --alldeps Mail_mime
46 $ sudo pear install --alldeps Console_Getopt
47
48If you already have some of the PEAR packages installed with your
49distribution, the `Mail` package is often not up-to-date,
50[read more here](http://projects.ceondo.com/p/indefero/issues/104/#ic347).
51
52The Pluf installation folder is the folder containing the file `Pluf.php`.
53
54## Installation of InDefero
55
56The installation is composed of the following steps:
57
58* Get the InDefero archive.
59* Configure it correctly.
60* Installation the database with the `migrate.php` script.
61* Bootstrap the application with a `bootstrap.php` script.
62
63Here is the step-by-step installation procedure:
64
65* Extract the InDefero archive somewhere.
66* The InDefero installation folder is the folder containing this file INSTALL.mdtext.
67* Make a copy of `src/IDF/conf/idf.php-dist` as `src/IDF/conf/idf.php`.
68* Update the idf.php file to match your system.
69* Make a copy of `src/IDF/conf/path.php-dist` as `src/IDF/conf/path.php`.
70* Update the path.php file to match your installation paths. It should work out of the box if you followed the recommended file layout.
71* Open a terminal/shell and go into the `src` folder in the InDefero installation folder.
72
73**Command:**
74
75 $ cd /home/www/indefero/src
76
77* Run `php /home/www/pluf/src/migrate.php --conf=IDF/conf/idf.php -a -i -d -u` to test the installation of the tables.
78* Run `php /home/www/pluf/src/migrate.php --conf=IDF/conf/idf.php -a -i -d` to really install the tables.
79* More details about the migration is available in the [migration documentation](http://pluf.org/doc/migrations.html) of the Pluf framework.
80* 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.
81
82**Bootstrap script:**
83
84 <?php
85 require '/home/www/indefero/src/IDF/conf/path.php';
86 require 'Pluf.php';
87 Pluf::start('/home/www/indefero/src/IDF/conf/idf.php');
88 Pluf_Dispatcher::loadControllers(Pluf::f('idf_views'));
89
90 $user = new Pluf_User();
91 $user->first_name = 'John';
92 $user->last_name = 'Doe'; // Required!
93 $user->login = 'doe'; // must be lowercase!
94 $user->email = 'doe@example.com';
95 $user->password = 'yourpassword'; // the password is salted/hashed
96 // in the database, so do not worry :)
97 $user->administrator = true;
98 $user->active = true;
99 $user->create();
100 print "Bootstrap ok\n";
101 ?>
102
103* Run `php www/bootstrap.php`.
104* Remove the `www/bootstrap.php` file.
105* Open the `www/index.php` file and ensure that the path to Pluf and
106 Indefero are correctly set for your configuration.
107* Now you can login with this user into the interface.
108* Click on the Forge Management link on top and create your first project.
109
110## Upgrade InDefero
111
112To upgrade:
113
114* Make a backup of your data, including the database.
115* Extract the new archive on top of the current one.
116* Update your version of Pluf.
117* Check that the path in the `index.php` are still good.
118* Remove all the `*.phps` files in your temp folder.
119* Upgrade the database with the upgrade commands:
120
121**Upgrade commands:**
122
123 $ cd /home/www/indefero/src
124 $ php /home/www/pluf/src/migrate.php --conf=IDF/conf/idf.php -a -d -u
125 $ php /home/www/pluf/src/migrate.php --conf=IDF/conf/idf.php -a -d
126
127
128## Repository Synchronization
129
130The documentation is available in the `doc` folder.
131
132* Subversion: `doc/syncsvn.mdtext`.
133* Mercurial: `doc/syncmercurial.mdtext`.
134* Git: `doc/syncgit.mdtext`.
135* Monotone: `doc/syncmonotone.mdtext`
136
137## For the Apache Webserver Users
138
139If you are using [Apache](http://httpd.apache.org/) for your webserver
140and want to have nice URLs like `http://yourdomain.com/p/yourproject/`
141and not `http://yourdomain.com/index.php/p/yourproject/` you can use
142the following `.htaccess` file to be put in the same folder of the
143`www/index.php` file.
144
145 Options +FollowSymLinks
146 RewriteEngine On
147 RewriteCond %{REQUEST_FILENAME} !-f
148 RewriteCond %{REQUEST_FILENAME} !-d
149 RewriteRule ^(.*) /index.php/$1
150
151`Options +FollowSymLinks` is only needed if you are using symlinks.
152
153## For the Gentoo users
154
155If you get the error:
156
157 T_CHARACTER Use of undefined constant T_CHARACTER - assumed 'T_CHARACTER'"
158
159you need to compile PHP with the "tokenizer" flag.
160
161## For People with open_basedir restriction error
162
163If you get an error like:
164
165 file_get_contents(): open_basedir restriction in effect.
166 File(/etc/mime.types) is not within the
167 allowed path(s): (/srv/http/:/home/:/tmp/:/usr/share/pear/)
168
169Just copy the file `/etc/mime.types` into the folder `/home` and put
170this in your configuration file:
171
172 $cfg['idf_mimetypes_db'] = '/home/mime.types';
173
174## FreeBSD Installation
175
176You need to install `/usr/ports/lang/php5-extensions` which contains
177the Standard PHP Library (SPL).
178
179## Using a SMTP server with authentication
180
181If your SMTP server requires authentication, for example,
182*smtp.gmail.com*, you can use the following email configuration:
183
184 $cfg['send_emails'] = true;
185 $cfg['mail_backend'] = 'smtp';
186 $cfg['mail_auth'] = true;
187 $cfg['mail_host'] = 'ssl://smtp.gmail.com';
188 $cfg['mail_port'] = 465;
189 $cfg['mail_username'] = 'YOURGMAILADDRESS';
190 $cfg['mail_password'] = 'YOURPASSWORD';
191
192Check with your provider to get the right settings.
193
194## Git Daemon on Ubuntu Karmic
195
196If you have problems getting it to run, you can follow this procedure
197proposed by Mathias in ticket 369.
198
1991. Install git-daemon-run in addition to git-core
2002. Edit /etc/sv/git-daemon/run to look as follows:
201
202 #!/bin/sh
203 exec 2>&1
204 echo 'git-daemon starting.'
205 exec chpst -ugit:git \
206 /usr/lib/git-core/git-daemon \
207 --reuseaddr \
208 --syslog \
209 --verbose \
210 --base-path=/home/git/repositories \
211 /home/git/repositories
212
2133. Restart git-daemon-run
214
215 sv restart git-daemon
216
217## If Subversion is not working
218
219If you access a Subversion server with a self-signed certificate, you
220may have problems as your certificate is not trusted, check the
221[procedure provided here][svnfix] to solve the problem.
222
223[svnfix]: http://projects.ceondo.com/p/indefero/issues/319/#ic1358
224
225## If the registration links are not working
226
227If You have standard instalaction of PHP ie in Debian, php.ini sets
228mbstring.func_overload to value "2" for overloading str*
229functions. You need to prevent the overload as it does not make sense
230anyway (magic in the background is bad!).
231See the [corresponding ticket][reglink].
232
233[reglink]: http://projects.ceondo.com/p/indefero/issues/481/
234

Archive Download this file