相关的安装手册
http://www.redmine.org/projects/redmine/wiki/RedmineInstall
http://www.redmine.org/projects/redmine/wiki/HowTo_install_Redmine_on_CentOS_5#Create-the-Gemfile-and-register-these-gems-in-it
http://bitnami.org/stack/redmine \\一键安装包
install Redmine on CentOS 5
Assumptions
yum -y --enablerepo=remi install http httpd-devel.x86_64 mysql.x86_64 mysql-server.x86_64 mysql-devel.x86_64 mysql-libs mysqlclient15.x86_64 service mysqld restart service httpd restart <<<<<<创建相关数据库>>>>>>>> mysql> create database redmine character set utf8; mysql> grant all privileges on redmine.* to 'redmine'@'localhost' identified by 'my_password'; mysql> flush privileges; |
Steps to take
Get Ruby
yum -y erase ruby ftp ftp.ruby-lang.org cd /pub/ruby get ruby-1.8.7-p330.tar.bz2 <<<<<<<<<解压后,进入目录>>>>>>>> ./configure make make install |
Get Gems 1.4 (does not work with Gems 1.5)
<<<<<下载地址>>>>>>>>>>>> |
Install Passenger
gem install passenger passenger-install-apache2-module |
执行"passenger-install-apache2-module" 后,记录如下内容
Restart Apache
Download Redmine && Copy the folder to its HTTP document root folder
wget http://rubyforge.org/frs/download.php/73692/redmine-1.x.tar.gz # GET LATEST VERSION ON RUBYFORGE tar zxvf redmine-1.x.tar.gz redmine-1.x cp -a redmine-1.1/ /var/www/redmine |
Configure Apache to host the documents
添加文件,内容如下
cat /etc/httpd/conf.d/redmine_vir.conf
- LoadModule passenger_module /usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.2/ext/apache2/mod_passenger.so
- PassengerRoot /usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.2
- PassengerRuby /usr/local/bin/ruby
- NameVirtualHost *:80
- <VirtualHost *:80>
- ServerName 192.168.1.2
- DocumentRoot /var/www/redmine/public
- <Directory /var/www/redmine/public>
- AllowOverride all
- Options -MultiViews
- </Directory>
- </VirtualHost>
Install Bundler
gem install bundler |
http://gembundler.com/ \\参考研究
Create the Gemfile and register these gems in it
bundle init |
vim Gemfile
- # A sample Gemfile
- source "http://rubygems.org"
- # gem "rails"
- gem "rails","2.3.5"
- gem "rake", "0.8.3"
- gem "rack", "1.0.1"
- gem "i18n", "0.4.2"
- gem "rubytree", "0.5.2", :require => "tree"
- gem "RedCloth", "~>4.2.3", :require => "redcloth"
- gem "mysql"
- gem "coderay", "~>0.9.7"
bundle install |
Configure database.yml (rename database.yml.example)
Set the production environment (optional)
Uncomment the following line:
- #cd /var/www/redmine
- #vim config/environment.rb
- ENV['RAILS_ENV'] ||= 'production'
Generate the session store
RAILS_ENV=production bundle exec rake generate_session_store |
Migrate the database models
RAILS_ENV=production bundle exec rake db:migrate |
Load default data (optional)
RAILS_ENV=production bundle exec rake redmine:load_default_data |
Rename dispatch CGI files
mv dispatch.cgi.example dispatch.cgi mv dispatch.fcgi.example dispatch.fcgi mv dispatch.rb.example dispatch.rb |
Edit .htaccess file for CGI dispatch configuration
mv htaccess.fcgi.example .htaccess |
Chown and Chmod files for read/write access for the Apache user
chown -R apache:apache /var/www/redmine chmod -R 755 /var/www/redmine |
Enjoy!