首页 > 代码库 > ububru下 redmine安装教程

ububru下 redmine安装教程

1.安装之前确认你已经安装好了mysql

2.连接mysql创建数据库

mysql -u root –p

CREATE DATABASE redmine CHARACTER SET utf8;CREATE USER ‘redmine‘@‘localhost‘ IDENTIFIED BY ‘my_password‘;GRANT ALL PRIVILEGES ON redmine.* TO ‘redmine‘@‘localhost‘;

 

3.下载(http://www.redmine.org/ )解压下载后的redmine文件

cd /opt

wget http://www.redmine.org/releases/redmine-2.5.3.tar.gz

tar -zxvf redmine-2.5.3.tar.gz

mv redmine-2.5.3 redmine

chmod -R 775 redmine

cd redmine/

4.修改数据库连接文件

cd config/

cp database.yml.example database.yml

vim database.yml

5.打开redmine主目录,并执行

rake generate_secret_token(此命令出现的问题见后面的会出现各种问题(主要是切换成ruby的淘宝源))

6.创建数据库结构

RAILS_ENV=production rake db:migrate
7.初始化数据
RAILS_ENV=production rake redmine:load_default_data
运行的过程中选择语言,我输入的是zh

8.测试安装是否成功

ruby script/rails server webrick -e production

测试通过

9.登录系统

使用管理员admin/admin登录系统

 

问题(主要是缺什么装什么 换国内源就可以了)

1.rake generate_secret_token
Could not find gem ‘rails (= 3.2.19) ruby‘ in the gems available on this machine.
Run `bundle install` to install missing gems.
解决:执行bundle install如还不行,则sudo apt-get install rails后解决 ,最终通过修改配置文件中的版本号解决

2.An error occurred while installing mysql2 (0.3.16), and Bundler cannot continue.
Make sure that `gem install mysql2 -v ‘0.3.16‘` succeeds before bundling.
解决:sudo gem install mysql2 -v ‘0.3.16‘,如果还不行,则

sudo apt-get install  libmysqlclient-dev,安装后再运行上边的命令

3.Could not find gem ‘selenium-webdriver (>= 0) ruby‘ in the gems available on this machine.
Run `bundle install` to install missing gems.
解决:sudo gem install selenium-webdriver

4.Could not find gem ‘rack-openid (>= 0) ruby‘ in the gems available on this machine.
Run `bundle install` to install missing gems.
解决:sudo gem install rack-openid

5.Could not find gem ‘fastercsv (~> 1.5.0) ruby‘ in the gems available on this machine.
Run `bundle install` to install missing gems.
解决:sudo gem install fastercsv

6.Could not find gem ‘shoulda (~> 3.3.2) ruby‘ in the gems available on this machine.
Run `bundle install` to install missing gems.

解决: sudo gem install shoulda
7.Could not find gem ‘net-ldap (~> 0.3.1) ruby‘ in the gems available on this machine.
Run `bundle install` to install missing gems.
解决:sudo gem install net-ldap

8.Could not find gem ‘ruby-openid (~> 2.3.0) ruby‘ in the gems available on this machine.
Run `bundle install` to install missing gems.
解决:sudo gem install ruby-openid
9.Could not find gem ‘mocha (~> 1.0.0) ruby‘ in the gems available on this machine.
Run `bundle install` to install missing gems.
解决:sudo gem install mocha

10.Could not find gem ‘rmagick (>= 2.0.0) ruby‘ in the gems available on this machine.
Run `bundle install` to install missing gems.
解决:sudo gem install rmagick 

出现Can‘t install RMagick 2.13.2. Can‘t find Magick-config in /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin时

解决:sudo apt-get install imagemagick libmagickwand-dev

11.Could not find gem ‘redcarpet (~> 2.3.0) ruby‘ in the gems available on this machine.
Run `bundle install` to install missing gems.

解决: sudo gem install redcarpet  -v 2.3.0

12.Could not find gem ‘capybara (~> 2.1.0) ruby‘ in the gems available on this machine.
Run `bundle install` to install missing gems.
解决:sudo gem install capybara -v 2.1.0

13.Could not find gem ‘yard (>= 0) ruby‘ in the gems available on this machine.
Run `bundle install` to install missing gems.
解决:sudo gem install yard 

ububru下 redmine安装教程