#删除旧的ruby
yum erase ruby ruby-libs ruby-mode ruby-rdoc ruby-irb ruby-ri ruby-docs
wget
wget
wget
wget
#基础包安装
yum install openssl-devel zlib-devel gcc gcc-c++ make autoconf readline-devel curl-devel expat-devel gettext-devel
#node安装
tar -zxf node-v0.6.6.tar.gz
cd node-v0.6.6
./configure
make
make install
#安装yaml
tar -zxf yaml-0.1.4.tar.gz
cd yaml-0.1.4
./configure --prefix=/usr/local
make
make install
#安装ruby
tar -zxf ruby-2.1.1.tar.gz
cd ruby-2.1.1
./configure --prefix=/usr/local --enable-shared --enable-pthread --disable-install-doc --with-opt-dir=/usr/local/lib
make
make install
#安装magick
yum install ImageMagick-devel
#安装gem
tar -zxf rubygems-2.4.1.tgz
cd rubygems-2.4.1
ruby setup.rb
cd /usr/local/bin/gem
./gem install rails
#Mysql数据库
CREATE DATABASE redmine CHARACTER SET utf8;
CREATE USER 'redmine'@'localhost' IDENTIFIED BY 'my_password';
GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost';
#配置redmine
redmine根目录 config/database.yml.example 修改文件名为database.yml
production:
adapter: mysql2
database: redmine
host: localhost
username: redmine
password: my_password
#在redmine根目录下依次执行以下命令
gem install bundler
bundle install --without development test
rake generate_secret_token
RAILS_ENV=production rake db:migrate
RAILS_ENV=production REDMINE_LANG=zh rake redmine:load_default_data
#启动ruby script/rails server webrick -e production -d
#访问地址是
#超级管理员的用户名密码为:admin/admin
#查看帮助:ruby script/rails server webrick -h
###### 备份与恢复 ########
备份redmine/config/database.yml 中的数据库
mysqldump -uroot -p database > back.sql
备份附件 redmine/files
#恢复:mysqldump -uroot -p database < back.sql
#附件直接替换redmine/files
阅读(2044) | 评论(0) | 转发(0) |