//download Redmine from http://www.redmine.org
//tested ok with OpenSuse 13.2: Redmine 3.0.4
unzip in <redmine_root>, for example:
/srv/www/vhosts/redmine.<your_domain.name>/prod/
//install & configure mysql, then run from mysql:
mysql -u root -p
CREATE DATABASE redmine CHARACTER SET utf8;
CREATE USER ‘redmine’@‘localhost’ IDENTIFIED BY ‘redmine_password’;
GRANT ALL PRIVILEGES ON redmine.* TO ‘redmine’@‘localhost’ IDENTIFIED BY ‘redmine_password’;
quit;
zypper -n install ruby rubygem-bundler rubygem-json ruby-devel zlib-devel rubygem-mysql2 ImageMagick ImageMagick-devel
gem install -V bundler
//find Ruby bundle gemfile:
cd <redmine_root>;
bundle install -V --without development test
!!! here one line removed on behalf of the OP !!!
//copy config/database.yml.example to config/database.yml and edit this file in order to configure your database settings for “production” environment
//re-run ‘bundle install’ after adding or removing adapters in the config/database.yml
bundle install -V --without development test rmagick
bundle exec rake generate_secret_token
chmod -R ug+rw files/
chmod -R ug+rw log/
chmod -R ug+rw tmp/
chmod -R ug+rw public/plugin_assets/
mkdir -p tmp tmp/pdf public/plugin_assets
//create the database structure, by running the following command under the application root directory
RAILS_ENV=production bundle exec rake db:migrate
RAILS_ENV=production bundle exec rake redmine:load_default_data
//test config, run:
bundle exec rails server webrick -e production
//open http://localhost:3000 in links browser
///////////////////////////////////////////////////////////////////////
//works? Continue to make it work in combination with Apache2
///////////////////////////////////////////////////////////////////////
zypper -n install FastCGI FastCGI-devel rubygem-ruby-fcgi
gem install -V fcgi
//Create a file called ‘Gemfile.local’ in your Redmine installation with:
# Gemfile.local
gem "fcgi"
cd <redmine_root>/config
//add to top of environment.rb:
ENV'RAILS_ENV'] ||= 'production'
cd <redmine_root>/public
cp htaccess.fcgi.example .htaccess
//uncomment:
RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
cd <redmine_root>/public
cp dispatch.fcgi.example dispatch.fcgi
chmod 755 ./dispatch.fcgi
//if needed, edit dispatch.cgi to fix the shell script invocation to point to the ruby executable:
#!/usr/bin/ruby
//test config, run:
cd <redmine_root>/public
./dispatch.fcgi
///////////////////////////////////////////////////////////////////////
//works? Continue to make it work in combination with Apache2
///////////////////////////////////////////////////////////////////////
zypper -n install apache2-mod_fcgid
//run once:
a2enmod rewrite
a2enmod fcgid
//if needed, add to/etc/apache2/sysconfig.d/loadmodule.conf:
LoadModule rewrite_module /usr/lib64/apache2-prefork/mod_rewrite.so
LoadModule fcgi_module /usr/lib64/apache2/mod_fcgid.so
//add to/etc/apache2/vhosts.d/redmine.<your_domain.name>.conf:
//no need to add ‘Listen *:3000’
//if needed, uncomment LogLevel to see what is going on
<VirtualHost *:80>
#LogLevel debug rewrite:trace8
ServerName redmine.<your_domain.name>
ServerAdmin webmaster@<your_domain.name>
DocumentRoot /srv/www/vhosts/redmine.<your_domain.name>/prod/public/
# if not specified, the global error log is used
ErrorLog /var/log/apache2/redmine.<your_domain.name>-error_log
CustomLog /var/log/apache2/redmine.<your_domain.name>-access_log combined
#If you are using mod_fcgid and are going to upload files larger than
#131072 bytes you should consider adding the following line
#that allows to upload files up to 20 mb
MaxRequestLen 20971520
<Directory "/srv/www/vhosts/redmine.<your_domain.name>/prod/public/">
AddHandler fastcgi-script fcgi
Order allow,deny
Allow from all
Require all granted
AllowOverride all
Options +FollowSymLinks +ExecCGI
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ dispatch.fcgi
</Directory>
</VirtualHost>
service apache2 restart
//search for possible problems:
tail -f /var/log/messages
tail -f /var/log/apache2/*_log
//point redmine.<your_domain.name> at this server (at your hosting provider?)
//open http://redmine.<your_domain.name> in your browser
//if needed, comment line 53 of /etc/apache2/conf.d/mod_fcgid.conf (FcgidIPCDir cannot occur within <VirtualHost> section)
//if needed, comment line 58 of /etc/apache2/conf.d/mod_fcgid.conf (FcgidProcessTableFile cannot occur within <VirtualHost> section)