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

Archive Download this file