A good tracker redmine

by bouleetbil 3. décembre 2009 11:26

Redmine is a flexible project management web application written using Ruby on Rails framework.

# pacman-g2 -S redmine

Create an empty database and accompanying user named redmine for example.

For Mysql:
create database redmine character set utf8;
create user 'redmine'@'localhost' identified by 'my_password';
grant all privileges on redmine.* to 'redmine'@'localhost';

For PostegreSQL:
create database redmine character set utf8;
create user 'redmine'@'localhost' identified by 'my_password';
grant all privileges on redmine.* to 'redmine'@'localhost';

Edit config/database.yml

Generate a session store secret:
cd /var/www/html/redmine/
rake config/initializers/session_store.rb

Create the database structure, by running the following command under the application root directory:
RAILS_ENV=production rake db:migrate
It will create tables and an administrator account.

Insert default configuration data in database, by running the following command:
RAILS_ENV=production rake redmine:load_default_data

Fix permissions
mkdir tmp public/plugin_assets
chown -R redmine:redmine files log tmp public/plugin_assets
chmod -R 755 files log tmp public/plugin_assets

Test the installation by running WEBrick web server:
ruby script/server webrick -e production
see the result : http://localhost:3000/

* login: admin
* password: admin

SMTP Configuration :
Copy config/email.yml.example to config/email.yml and edit this file to adjust your SMTP settings.

Use Redmine with apache
# pacman-g2 -S mod_fastcgi

Copy public/dispatch.fcgi to public/dispatch.fcgi has execute permissions via:
# chmod 755 public/dispatch.fcgi

update the config/environment.rb file to force the rails environment to production, simply uncomment this line at the start of the file:

ENV['RAILS_ENV'] ||= 'production'

Edit public/.htaccess for force
RewriteRule :
#<IfModule mod_fastcgi.c>
# RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
#</IfModule>
#<IfModule mod_fcgid.c>
# RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
#</IfModule>
#<IfModule mod_cgi.c>
# RewriteRule ^(.*)$ dispatch.cgi [QSA,L]
#</IfModule>
RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]

Configure apache :
SetEnv RAILS_ENV production
<Directory "/var/www/html/redmine/public/">
Options Indexes ExecCGI FollowSymLinks
Order allow,deny
Allow from all
AllowOverride all
</Directory>

If you use alias as me. My root dir is not /var/www/html
Alias /redmine/ "/var/www/html/redmine/public/"

and modify public/.htaccess :
RewriteBase /redmine

Make sure your files, log, tmp, and vendor directories are all accessible (read/write) by user apache, group apache.
# chown -R nobody:nobody files log tmp vendor

Result : http://dors.frugalware.org/redmine

Tags:

Frugalware | Linux

Commentaires