This is a guide to install Redmine (svn trunk) on Ubuntu 9.10.
The assumed location of Redmine is /srv/redmine
Phase 1: Setup Redmine
Step 1
Install required packages.
Step 2
Check out Redmine trunk.
$ sudo svn co http://redmine.rubyforge.org/svn/trunk redmine
Step 3
Install required ruby gems:
Note 1: We may need to update Rails RAILS_GEM_VERSION in file [redmine]/config/environment.rb to reflect actual version of Rails gems installed.
Note 2: We may need to create soft link for rails & mongrel executables for convenient
$ sudo ln -s /var/lib/gems/1.8/bin/rails /usr/local/bin/
$ sudo ln -s /var/lib/gems/1.8/bin/mongrel_cluster_ctl /usr/local/bin/
Step 4
Create mysql database
# Enter mysql root password when prompted
Run the following code in mysql, substitute your own database name, password, …
CREATE user 'redmine'@'localhost' IDENTIFIED BY 'my_password';
GRANT ALL privileges ON redmine.* TO 'redmine'@'localhost';
Step 5
Create/Update database parameters in [redmine]/config/database.yml accordingly to prior step info.
adapter: mysql
database: redmine
host: localhost
username: redmine
password: my_password
encoding: utf8
Step 6
Initialize the database
$ sudo rake config/initializers/session_store.rb
# Load db schema
$ sudo rake db:migrate RAILS_ENV=”production”
$ sudo rake redmine:load_default_data RAILS_ENV=”production”
Step 7
Create redmine user & setting up directory permission
$ sudo useradd redmine
$ sudo mkdir tmp public/plugin_assets
$ sudo chown -R redmine:redmine files log tmp
$ sudo chmod -R 755 files log tmp public
Step 8
Testing the application server
The server is listening on [http://localhost:3000].
Phase 2: Setup Apache & Mongrel Cluster
Step 1
Create mongrel cluster configuration files for Redmine.
# Test mongrel_installation
$ sudo mongrel_rails cluster::start
Step 2
Create apache virtual host file at /etc/apache/sites-available/
DocumentRoot /srv/redmine
AllowOverride FileInfo Indexes
RewriteEngine On
# Redirect all non-static requests to Mongrel
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
RewriteRule ^/(.*)$ balancer://redmine_cluster%{REQUEST_URI} [P,QSA,L]
ProxyPassReverse / balancer://redmine_cluster
ProxyPreserveHost on
BalancerMember http://localhost:3000
BalancerMember http://localhost:3001
BalancerMember http://localhost:3002
Order deny,allow
Allow from all
# Block access to .svn directories
ErrorDocument 403 /404.html
Order allow,deny
Deny from all
Satisfy All
Step 3
Turn on the virtual host and required modules
$ sudo a2enmod proxy_http
$ sudo a2enmod proxy_balancer
$ sudo a2ensite
# Restart web server
$ sudo /etc/init.d/apache2 restart
Phase 3: Surviving the reboot & G!Mail SMTP
Step 1
Create global mongrel_cluster configuration
$ sudo mkdir /etc/mongrel_cluster
$ cd /etc/mongrel_cluster
$ sudo ln -s /srv/redmine/config/mongrel_cluster.yml /etc/mongrel_cluster/redmine.yml
$ cd /etc/mongrel_cluster
$ sudo ln -s /srv/redmine/config/mongrel_cluster.yml /etc/mongrel_cluster/redmine.yml
Step 2
Update the services
$ sudo cp /var/lib/gems/1.8/gems/mongrel_cluster-1.0.5/resources/mongrel_cluster /etc/init.d/
$ sudo chmod +x /etc/init.d/mongrel_cluster
$ sudo /usr/sbin/update-rc.d -f mongrel_cluster defaults
Step 3
Configure G!Mail
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"
References
- http://www.redmine.org/wiki/redmine/RedmineInstall
- http://ubuntuforums.org/showthread.php?t=674598
- http://azureusonrails.rubyforge.org/wiki/wiki.pl?Install/Mongrel_Cluster_With_Apache_2.2
- http://redmineblog.com/articles/setup-redmine-to-send-email-using-gmail/



Hehe! I bet you don’t have a redmine @ your desktop.
I have it somewhere else
I bet u have it online, DreamHost i guess???
You sure have a good nose. I don’t have one so I can’t smell who you are. Can you tell me?
There is only one dude in this world can come here AND make comments sounds like that
Is that you? The “tục”est dude in the universe?