HowTo Install Redmine on Debian Squeeze with Postgresql Ruby-on-Rails and Apache2-Passenger » History » Revision 3
Revision 2 (Kaj Ailomaa, 2010-11-27 15:41) → Revision 3/11 (Kaj Ailomaa, 2010-11-27 15:43)
h1. HowTo Install Redmine on Debian Squeeze with Postgresql Ruby-on-Rails and Apache2-Passenger This howto is similar to the [[HowTo Install Redmine on Debian with Ruby-on-Rails and Apache2-Passenger]], but a little shorter and uses postgresql instead of mysql as the database server. It should be noted that redmine and all it's dependencies are available as packages in debians repo's, so there is no need to download redmine from svn as we will do in this howto. First we become root and install some needed packages: <pre> su apt-get install postgresql-8.4 apache2 subversion rake rubygems libopenssl-ruby libpgsql-ruby libapache2-mod-passenger sudo gem install -v=2.3.5 rails sudo gem install -v=1.0.1 rack </pre> Before configuring redmine we need to create a user and a database in postresql. Be sure to replace <password> with your password. <pre> su postgres psql postgres=# CREATE ROLE redmine LOGIN ENCRYPTED PASSWORD '<password>' NOINHERIT VALID UNTIL 'infinity'; postgres=# CREATE DATABASE redmine WITH ENCODING='UTF8' OWNER=redmine; postgres=# \q exit </pre> Now, let's download redmine and configure it <pre> cd tmp svn co http://redmine.rubyforge.org/svn/branches/1.0-stable redmine-1.0 mv redmine-1.0/ /var/lib/redmine cd /var/lib/redmine </pre> First some database stuff. Replace <password> with your password. <pre> echo "production: adapter: postgresql database: redmine host: localhost username: redmine password: <password> encoding: utf8 schema_search_path: public" > config/database.yml 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 </pre> Finally, we setup Apache. A symbolic link to the www dir and ownership given to www-data. <pre> ln -s /var/lib/redmine/public /var/www/redmine chown -R www-data:www-data /var/www/redmine </pre> We enable the site and restart apache. <pre> echo "RailsBaseURI /redmine" > /etc/apache2/sites-available/redmine a2ensite redmine /etc/init.d/apache2 restart </pre> That's it.