一、 安装配置
1.安装ruby
tar zxf ruby-1.8.7.tar.gz
cd ruby-1.8.7
./configure --prefix=/usr/local/ruby
make && make install
check installation:
ruby -v
ln -s /usr/local/ruby/bin/ruby /usr/local/bin/ruby
ln -s /usr/local/ruby/bin/ruby /usr/bin/ruby
2.安装rubugems
tar zxf rubygems-1.3.6.tgz
cd rubygems-1.3.6
ruby setup.rb
check installation:
gem -v
3.安装rake、passenger (??)
geminstall rack -v=1.1.1
gem isntall passenger
4.安装mysql-server,mysql,myslq-devel,并创建redmine数据库
mysqladmin -uroot password "my_password"(更改初始密码)
mysql>
>create database redmine charater set utf8;
>create user 'redmine'@'localhost' identified by “redmine_password” ;
>grant all privileges on redmine.* to 'redmine'@'localhost';
>quit;
5.安装redmine
tar zxf redmine-1.4.4.tar.gz -C /usr/local/
cd redmine-1.4.4
cp config/database.yml.example config/database.yml
vi config/database.yml (配置redmine数据库信息)
host: 127.0.0.1
6.安装gems
cd redmine-1.4.4
bundle install
yum -y install zlib-devel curl-devel openssl-devel apr-devel httpd-devel apr-util-devel mysql-devel postgresql postgresql-devel
安装 rmagick
yum -y install ImageMagick ImageMagick-devel
find / -name pkgconfig
export PKG_CONFIG_PATH="/usr/lib64/pkgconfig"
yum -y install sqlite-devel
7.安装mongrel
gem install mongrel
运用mongrel:
cd redmine-1.4.4
vi Gemfile.local
添加如下内容:
gem "mongrel"
8.加载配置运行环境
vi remine-1.4.4/config/environment.rb
ENV['RAILS_ENV' ] ||= 'production' ##Uncomment this line
运行命令:
#RAILS_ENV=production bundle exec rake db:migrate
#RAILS_ENV=production bundle exec rake redmine:load_default_data
9.运行redmine
cd redmine-1.4.4
ruby script/server mongrel -e production -d -p "portnumber"
1.备份
数据库:
mysqldump -uredmine -p"redmine_password" redmine(redmine默认数据库) > redmine_bak.sql
附件:
tar zcf redmine_files.tar.gz redmine-1.4.4/files/
配置文件:
tar zcf redmine_config.tar.gz redmine-1.4.4/config/
2.恢复:
数据库:
mysqldump -uredmine -predmine redmine < redmine_bak.sql
附件,配置文件只需将相应文件copy到相应目录即可。