Home   >>   Redmine   >>   How To Install Redmine On Centos 5.5
How To Install Redmine On Centos 5.5 PDF Print E-mail
( 14 Votes )
How To - Redmine
Written by Christian Foronda   
Friday, 18 March 2011 12:57

Install requirements:

# yum install openssl-devel zlib-devel gcc gcc-c++ automake autoconf readline-devel curl-devel expat-devel gettext-devel patch mysql mysql-server mysql-devel httpd httpd-devel apr-devel apr-util-devel libtool apr

 

Install Ruby on Rails:
Download the latest version of Ruby on Rails from http://rubyonrails.org/download.

# wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p180.tar.gz
# tar xzvf ruby-1.9.2-p180.tar.gz
# cd ruby-1.9.2-p180
# ./configure --enable-shared
# make
# make install
# ruby -v
ruby 1.9.2p180 (2011-02-18 revision 30909) [i686-linux]

 

Install RubyGems:
Download the latest version of RubyGems from http://rubyforge.org/frs/?group_id=126&release_id=45715

# wget http://rubyforge.org/frs/download.php/74445/rubygems-1.6.2.tgz
# tar xvzf rubygems-1.6.2.tgz
# cd rubygems-1.6.2
# ruby setup.rb
# gem -v
1.6.2
# gem install rubygems-update
# update_rubygems

 

Install Rake:

# gem install rake

 

Install Rails:

# gem install rails

 

Install Passenger:

# gem install passenger
# passenger-install-apache2-module

--------------------------------------------
The Apache 2 module was successfully installed.

Please edit your Apache configuration file, and add these lines:

   LoadModule passenger_module /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.5/ext/apache2/mod_passenger.so
   PassengerRoot /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.5
   PassengerRuby /usr/local/bin/ruby

 

Restart Apache:

# service httpd restart

 

Install Redmine:

Download the latest version of Redmine from http://www.redmine.org/projects/redmine/wiki/Download

# cd /usr/local/share
# wget http://rubyforge.org/frs/download.php/74419/redmine-1.1.2.tar.gz
# tar xzvf redmine-1.1.2.tar.gz

 

Create a system link of the folder to Apache document root directory:

# ln -s /usr/local/share/redmine-1.1.2/public /var/www/html/redmine

 

Create the Redmine MySQL database:

# mysql -u root -p
mysql> create database redmine character set utf8;
mysql> create user 'redmine'@'localhost' identified by 'my_password';
mysql> grant all privileges on redmine.* to 'redmine'@'localhost';

 

Configure database.yml:

# cd /usr/local/share/redmine-1.1.2
# vi config/database.yml

production:
  adapter: mysql
  database: redmine
  host: localhost
  username: redmine
  password: my_password

 

Generate a session store secret:

# gem install -v=0.4.2 i18n
# gem install -v=0.8.3 rake
# gem install -v=1.0.1 rack
# rake generate_session_store

 

Create the database structure (still in /usr/local/share/redmine-1.1.2):
Edit /usr/local/share/redmine-1.1.2/config/environment.rb:

# vi /usr/local/share/redmine-1.1.2/config/environment.rb

 

Uncomment the following on line 5:

ENV['RAILS_ENV'] ||= 'production'

 

and insert the following code on line 55:

if Gem::VERSION >= "1.6.2" 
    module Rails
        class GemDependency
            def requirement
                r = super
                (r == Gem::Requirement.default) ? nil : r
            end
        end
    end
end

 

Save and exit.

Then run:

# RAILS_ENV=production rake db:migrate

 

Insert default configuration data in database:

# RAILS_ENV=production rake redmine:load_default_data

 

Copy dispatch CGI files (still in /usr/local/share/redmine-1.1.2):

# cp public/dispatch.rb.example public/dispatch.rb

 

Setup permission:

# chown -R apache:apache /usr/local/share/redmine-1.1.2
# find /usr/local/share/redmine-1.1.2 -type d -exec chmod 755 {} \;
# find /usr/local/share/redmine-1.1.2 -type f -exec chmod 644 {} \;

 

Configure Apache:

# vi /etc/httpd/conf.d/redmine.conf

 

Insert:

RailsBaseURI /redmine
<Directory /var/www/html/redmine>
    Options -MultiViews
</Directory>

 

Restart Apache:

# /etc/init.d/httpd restart

 

Go to URL:

http://127.0.0.1/redmine

 

Login:

Username: admin
Password: admin

 




blog comments powered by Disqus
Last Updated on Thursday, 30 June 2011 09:51