ubuntu上安装redmine2.4版本以上

首先安装MySQL:apt-get install mysql

创建Redmin数据库和用户

mysql -u root -p 

[plain]  view plain copy print ? 在CODE上查看代码片 派生到我的代码片
  1. CREATE DATABASE redmine CHARACTER SET utf8;  
  2. CREATE USER 'redmine'@'localhost' IDENTIFIED BY 'my_password';  
  3. GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost';  

现在下载Redmine 2.4.2代码:

[plain]  view plain copy print ? 在CODE上查看代码片 派生到我的代码片
  1. wget http://www.redmine.org/releases/redmine-2.4.2.tar.gz  
  2. tar zxvf redmine-2.4.2.tar.gz  

安装ruby1.9.3

[plain]  view plain copy print ? 在CODE上查看代码片 派生到我的代码片
  1. apt-get install ruby1.9.3   

配置数据库, 

[plain]  view plain copy print ?
  1. cd config  
  2. cp database.yml.example database.yml  


编辑database.yml

[plain]  view plain copy print ? 在CODE上查看代码片 派生到我的代码片
  1. production:  
  2.   adapter: mysql2  
  3.   database: redmine  
  4.   host: localhost  
  5.   username: redmine  
  6.   password: "your_pwd"  
  7.   encoding: utf8  


下面在redmine-2.4.2目录下执行命令安装gem的依赖项:

[plain]  view plain copy print ? 在CODE上查看代码片 派生到我的代码片
  1. root@test:/usr/src/redmine-2.4.2# gem install bundler  
  2. Fetching: bundler-1.5.2.gem (100%)  
  3. Successfully installed bundler-1.5.2  
  4. 1 gem installed  
  5. Installing ri documentation for bundler-1.5.2...  
  6. Installing RDoc documentation for bundler-1.5.2...  

现在安装redmine依赖项

[plain]  view plain copy print ?
  1. bundle install --without development test  



遇到一个错误:

[plain]  view plain copy print ? 在CODE上查看代码片 派生到我的代码片
  1. An error occurred while installing mysql2 (0.3.14), and Bundler cannot continue.                                                                                                                                       
  2. Make sure that `gem install mysql2 -v '0.3.14'` succeeds before bundling.  

用下面的命令修复:

[plain]  view plain copy print ? 在CODE上查看代码片 派生到我的代码片
  1. apt-get install mysql-client  
  2. apt-get install libmysqlclient-dev  


[plain]  view plain copy print ? 在CODE上查看代码片 派生到我的代码片
  1. gem install mysql2 -v '0.3.14'  

再次运行redmine安装命令:

[plain]  view plain copy print ? 在CODE上查看代码片 派生到我的代码片
  1. bundle install --without development test  
得到新的错误信息:

[plain]  view plain copy print ? 在CODE上查看代码片 派生到我的代码片
  1. An error occurred while installing rmagick (2.13.2), and Bundler cannot continue.                                                                                                                                      
  2. Make sure that `gem install rmagick -v '2.13.2'` succeeds before bundling.  

用下面的命令修复:

[plain]  view plain copy print ? 在CODE上查看代码片 派生到我的代码片
  1. apt-get install libmagickcore-dev libmagickwand-dev  

执行下面的命令完成安装:

[plain]  view plain copy print ? 在CODE上查看代码片 派生到我的代码片
  1. rake generate_secret_token  
  2. RAILS_ENV=production rake db:migrate  
  3. RAILS_ENV=production rake redmine:load_default_data  
  4. mkdir -p tmp tmp/pdf public/plugin_assets  
  5. chown -R 777 files log tmp public/plugin_assets  
  6. chmod -R 755 files log tmp public/plugin_assets  

启动服务用于测试:

[plain]  view plain copy print ? 在CODE上查看代码片 派生到我的代码片
  1. root@test:/usr/src/redmine-2.4.2# ruby script/rails server webrick -e production  
  2. => Booting WEBrick  
  3. => Rails 3.2.16 application starting in production on http://0.0.0.0:3000  
  4. => Call with -d to detach  
  5. => Ctrl-C to shutdown server  
  6. [2014-01-11 18:49:18] INFO  WEBrick 1.3.1  
  7. [2014-01-11 18:49:18] INFO  ruby 1.9.3 (2011-10-30) [x86_64-linux]  
  8. [2014-01-11 18:49:18] INFO  WEBrick::HTTPServer#start: pid=10173 port=3000  
  9. Started GET "/" for 119.80.97.56 at 2014-01-11 18:49:35 +0800  
  10. Processing by WelcomeController#index as HTML  
  11.   Current user: anonymous  
  12.   Rendered welcome/index.html.erb within layouts/base (36.7ms)  
  13. Completed 200 OK in 437.0ms (Views: 145.0ms | ActiveRecord: 16.7ms)  

用浏览器访问一下,可以看到redmine的站点了

http://localhost:3000

默认管理员帐号是

admin

admin


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值