redmine安装手记

1. 升级ruby:

ruby在CentOS 5上的默认版本是1.8.5. 需要先升级。 首先删除已经安装的Ruby:

sudo yum erase ruby ruby-libs ruby-mode ruby-rdoc ruby-irb ruby-ri ruby-docs

安装编译需要的相关工具和包:

sudo yum install openssl-devel zlib-devel gcc gcc-c++ make autoconf readline-devel curl-devel expat-devel gettext-devel  

下载Ruby1.9.2安装:

wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p180.tar.gz  
tar xvf ruby-1.9.2-p180.tar.gz 
./configure --enable-shared --enable-pthread  
make && make install  

注:ruby升级过程http://ritto.blog.51cto.com/427838/737824

2. 安装RubyGems:

1.9.2 已经包含RubyGems,所以不需要安装。但是若是1.8.7等等,则需要安装。

wget http://rubyforge.org/frs/download.php/74445/rubygems-1.6.2.tgz  
tar zxvf rubygems-1.6.2.tgz   
cd rubygems-1.6.2   
ruby setup.rb  

注:gem更新 gem update --system

3. 下载:

wget http://rubyforge.org/frs/download.php/76134/redmine-2.0.0.tar.gz

4. 安装Mysql相关:

(推荐使用http://lnmp.org/ 一键安装包,懒人专用)

yum install mysql mysql-devel mysql-server  
chkconfig --levels 235 mysqld on  
/etc/init.d/mysqld start  

5. 安装相关包:

gem install bundler
bundle install --without development test

6. config database.yml

Copy config/database.yml.example to config/database.yml and edit this file in order to configure your database settings for "production" environment.

7. Generate a session store secret.

rake generatesecrettoken

8. Create the database structure, by running the following command under the application root directory:

RAILS_ENV=production rake db:migrate

9. Insert default configuration data in database, by running the following command:

RAILSENV=production rake redmine:loaddefault_data

10.Test the installation by running WEBrick web server:

ruby script/rails server webrick -e production

11. Use default administrator account to log in:

login: admin
password: admin

参考:

1.http://blog.csdn.net/wangxujun163163/article/details/6417894
2.http://www.cnblogs.com/wuchang/archive/2011/10/04/2199018.html
3.http://www.redmine.org/projects/redmine/wiki/RedmineInstall

大虾米 /
Published under (CC) BY-NC-SA in categories learn  tagged with Ruby  Web  Linux  bug