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

Archive Download this file