HowTo Install Redmine on Debian with Ruby-on-Rails and Apache2-Passenger » History » Revision 2
Revision 1 (Stefan Brinkmann, 2010-06-25 10:34) → Revision 2/4 (Stefan Brinkmann, 2010-06-25 10:50)
h1. Install Redmine on Debian with with Ruby-on-Rails and Apache2 Passenger h2. .h2 A .bash_history based Doc. aptitude install ruby libzlib-ruby rdoc irb *_NOTE: The rubygems from repository is not working. We download gems from sourceforge_* cd /tmp wget http://rubyforge.org/frs/download.php/70697/rubygems-1.3.7.zip unzip rubygems-1.3.7.zip cd rubygems-1.3.7 ruby setup.rb all cd .. rm -r rubygems-1.3.7 rubygems-1.3.7.zip ln /usr/bin/gem1.8 /usr/bin/gem gem install rails --include-dependencies gem install rack -v 1.0.1 mysql -uroot -pyourpasswd <pre> create database redmine character set utf8; create user 'redmine'@'localhost' identified by 'my_password'; grant all privileges on redmine.* to 'redmine'@'localhost'; exit; </pre> *_NOTE: For MySQL prior 5.2.0 use this_* <pre> create database redmine character set utf8; create user 'redmine'@'localhost' identified by 'my_password'; grant all privileges on redmine.* to 'redmine'@'localhost' identified by 'my_password'; exit; </pre> cd /srv/www/htdocs wget http://rubyforge.org/frs/download.php/70488/redmine-0.9.4.zip unzip redmine-0.9.4.zip rm redmine-0.9.4.zip mv redmine-0.9.4 redmine cd /srv/www/htdocs/redmine cp config/database.yml.example config/database.yml vi config/database.yml <pre> production: adapter: mysql database: redmine host: localhost username: redmine password: passwd encoding: utf8 </pre> cp config/email.yml.example config/email.yml vi config/email.yml *_NOTE: For more Help look here:_* http://redmineblog.com/articles/setup-redmine-to-send-email-using-gmail/ <pre> production: delivery_method: :smtp smtp_settings: tls: true address: "smtp.gmail.com" port: '587' domain: "smtp.gmail.com" authentication: :plain user_name: "your_email@gmail.com" password: "your_password" </pre> aptitude install libapache2-mod-fastcgi libfcgi-ruby1.8 aptitude install libmysql-ruby libopenssl-ruby1.8 RAILS_ENV=production rake config/initializers/session_store.rb rake generate_session_store RAILS_ENV=production rake db:migrate RAILS_ENV=production rake redmine:load_default_data aptitude install ruby-dev gem install passenger /usr/lib/ruby/gems/1.8/gems/passenger-2.2.14/bin/passenger-install-apache2-module *_NOTE: following file contents info comes from ".../passenger-install-apache2-module"_* vi /etc/apache2/mods-available/passenger.load <pre> LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-2.2.14/ext/apache2/mod_passenger.so</pre> vi /etc/apache2/mods-available/passenger.conf <pre> PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-2.2.14 PassengerRuby /usr/bin/ruby1.8 </pre> a2enmod passenger vi /etc/apache2/sites-available/default <pre> <VirtualHost *:80> ServerName www.yourhost.com DocumentRoot /srv/www/htdocs/redmine/public # <-- be sure to point to 'public'! <Directory /srv/www/htdocs/redmine/public> AllowOverride all # <-- relax Apache security settings Options -MultiViews # <-- MultiViews must be turned off </Directory> </VirtualHost> </pre> cd /srv/www/htdocs/redmine chmod -R 775 ./* chown -R root:root ./* mkdir tmp public/plugin_assets chown -R nobody:nogroup files log tmp public/plugin_assets chmod -R 775 files log tmp public/plugin_assets /etc/init.d/apache2 restart h2. Put Redmine in a Folder mkdir /srv/www/apps mv /srv/www/htdocs/redmine /srv/www/apps/redmine ln -s /srv/www/apps/redmine /srv/www/htdocs/redmine vi /etc/apache2/sites-available/default <pre> <VirtualHost *:80> ServerName www.yourhost.com DocumentRoot /srv/www/htdocs <Directory /srv/www/htdocs> AllowOverride all Options -MultiViews </Directory> RailsBaseURI /redmine <Directory /srv/www/htdocs/redmine> Options -MultiViews </Directory> </VirtualHost> </pre> /etc/init.d/apache2 restart h2. Repositories I used following Repos: Replace lenny with etch if you are using Debian etch(stable) You find more Repos here: http://wiki.unixboard.de/index.php/Repositories_fuer_Debian_und_Derivate vi /etc/apt/sources.list <pre> deb http://ftp.de.debian.org/debian/ lenny main contrib non-free deb-src http://ftp.de.debian.org/debian/ lenny main contrib non-free deb http://security.debian.org/ lenny/updates main contrib non-free deb-src http://security.debian.org/ lenny/updates main contrib non-free deb http://security.debian.org/ lenny/updates main contrib non-free deb-src http://security.debian.org/ lenny/updates main contrib non-free deb http://volatile.debian.org/debian-volatile lenny/volatile main contrib non-free </pre>