2.
gem sources --remove http://rubygems.org/
gem sources -a http://ruby.taobao.org/
gem install rails -v=4.1.1 -V (这个是选择的4.1.1版本的在线安装 同时verbose
便于查看进度)
4.rack 和 i18n-0.4.2.gem
还有mysql
http://rubygems.org/ 在这个网站下载了rack-1.5.2.gem 和
i18n-0.6.9.gem 、mysql-2.9.1.gem 拷贝到服务器
gem install rack-1.5.2.gem
gem install i18n-0.6.9.gem
gem install mysql-2.9.1.gem
5.redmine
http://www.redmine.org/projects/redmine/wiki/Download
下载redmine-2.5.1.tar.gz
1)创建数据库
mysql>
create database redmine character set utf8;
mysql>create user
‘redmine‘@‘%‘ identified by ‘redmine‘;
mysql>grant all
privileges on redmine.* to ‘redmine‘@‘%‘;
2)解压redmine并配置redmine连接数据库所需的参数。
tar
zxvf redmine-1.2.1.tar.gz
cd redmine-1.2.1
cp
config/database.yml.example config/database.yml
vim
config/database.yml
production:
adapter: mysql
database: redminedb
host: 服务器地址
username: redmine
password: redmine
encoding: utf8
3)创建一个session安装密钥
cd redmine-2.5.1
rake generate_secret_token
4)执行数据的处理
cd redmine-2.5.1
RAILS_ENV=production rake db:migrate
RAILS_ENV=production rake redmine:load_default_data
建个组
mkdir -p tmp tmp/pdf public/plugin_assets
sudo chown -R redmine:redmine files log tmp public/plugin_assets
sudo chmod -R 755 files log tmp public/plugin_assets
5)启动服务
ruby script/rails server webrick -e production
5)服务器的自启动服务(写个脚本)
#!/bin/sh
echo "start redmine:"
redmine的绝对路径/script/server webrick -e production -d
监听端口默认为3000
访问方式:http://ip地址:3000