HowTo Install Redmine on Debian Squeeze with Postgresql Ruby-on-Rails and Apache2-Passenger » History » Version 6
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:
su apt-get install postgresql-8.4 apache2 subversion rake rubygems libopenssl-ruby libpgsql-ruby libapache2-mod-passenger gem install -v=2.3.5 rails
Before configuring redmine we need to create a user and a database in postresql. Be sure to replace <password> with your password.
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
Now, let's download redmine and configure it
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
First some database stuff. Replace <password> with your password.
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
Finally, we setup Apache. A symbolic link to the www dir and ownership given to www-data.
ln -s /var/lib/redmine/public /var/www/redmine chown -R www-data:www-data /var/www/redmine
We enable the site and restart apache.
echo "RailsBaseURI /redmine" > /etc/apache2/sites-available/redmine a2ensite redmine /etc/init.d/apache2 restart
That's it. You will find redmine at either:
Log in with user: admin, password: admin