Project

General

Profile

Installation issues.

Added by Bill Davidson about 13 years ago

First let me preface this by saying that I know very little about Ruby. That may well be part of my problem.

I got things going, but I had a few difficulties here. I think most of them could have been avoided with better documentation.

System: RedHat 5.4.0.3, 64-bit.
Redmine: 1.1.2

RedHat comes with Ruby 1.8.5, so I'm off to a bad start.

I had difficulty finding the source for Ruby 1.8.7.

If there's a link that leads to the 1.8.7 source here, I didn't see it:
http://www.ruby-lang.org/en/downloads/

A bit of googling and I found this:
http://www.ruby-lang.org/en/news/2008/05/31/ruby-1-8-7-has-been-released/

OK. Got Ruby 1.8.7 built and installed. So far so good.

The INSTALL doc says that RubyGems 1.3.1 is needed. It turns out that I18n 0.4.2 requires RubyGems 1.3.5, so there's a dependency issue in the INSTALL document.

Sigh. None of the following worked:

gem install rails -v 2.3.5
gem install rack -v 1.0.1
gem install i18n -v 0.4.2

-bash-3.2$ gem environment
RubyGems Environment:
  - RUBYGEMS VERSION: 1.3.5
  - RUBY VERSION: 1.8.7 (2008-05-31 patchlevel 0) [x86_64-linux]
...
  - REMOTE SOURCES:
     - http://gems.rubyforge.org/

I had to go to http://gems.rubyforge.org/ with a web browser, search for those packages, find the older versions in the lower part of the page, download them and run gem install with them in the current directory. This was very annoying.

I figured out the rest of the procedure from the INSTALL doc OK. I got redmine running on localhost:3000

In order to get SSL, I wanted to hide it behind Apache. I looked at the "Run it from Apache" thing in the Wiki but it seemed like it would be easier to just proxy the thing. I didn't see this in the Wiki. This is basically what I did. I wanted to force HTTP. I wanted to have it on its own hostname so that I could move it around more easily, so I set up NameVirtualHost's. I also wanted to force SSL always. As I'm writing this, it occurs to me that I might not need a DocumentRoot in these at all, since everything is either forwarded or proxy'd. I'll have to try that later.

NameVirtualHost redmine.mydomain.com:80

<VirtualHost redmine.mydomain.com:80>
    ServerName redmine.mydomain.com

    DocumentRoot /path/to/redmine/public
    CustomLog /path/to/redmine/log/access_log combined
    ErrorLog /path/to/redmine/log/error_log

    # Force the use of the SSL virtualhost.
    RewriteEngine On
    RewriteCond %{SERVER_PORT} 80 
    RewriteRule ^(.*)$ https://redmine.mydomain.com/$1 [R,L]
</VirtualHost>

NameVirtualHost redmine.mydomain.com:443

<VirtualHost redmine.mydomain.com:443>
    ServerName redmine.mydomain.com

    SSLEngine on
    SSLCipherSuite ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:-LOW:-SSLv2:-EXP
    SSLCertificateFile "/path/to/SSL/host.mydomain.com.cer" 
    SSLCertificateKeyFile "/path/to/SSL/host.mydomain.com.key" 

    DocumentRoot /path/to/redmine/public
    CustomLog /path/to/redmine/log/access_log combined
    ErrorLog /path/to/redmine/log/error_log

    # Route everything through the proxy.
    ProxyPass / http://localhost:3000/
    ProxyPassReverse / http://localhost:3000/

    # May want to limit who can access Redmine
    <Proxy *>
        Order deny,allow
        Deny from all
        Allow from all
    </Proxy>
</VirtualHost>

It seems to work. Does anybody see any obvious flaws with this approach?