比来在找一个bug跟踪对象,找了很多文章,找到了一些斗劲好的对象比如:Trac、Bugzilla、Redmine、JIRA等。
只是斗劲绝望的是没有一个是asp.net开辟的,要不然就可以省去很多折腾了;因安排难度以及免费等身分,终极选择了Redmine。
Redmine官方主页:-script: false; light: false; ruler: false; smart-tabs: true; tab-size: 4; toolbar: true;">ruby setup.rb
今后可以用gem –system来更新RubyGems
在安装好所有gem包之后,还可以用gem 来更新所有gem包
更新了gem包之后,可以用gem cleanup来清除所有包的旧版本(只保存最新版本)
经由过程gem list可以查看安装的所有包
1.3.安装bundler:
gem install bundler
1.4.解压DevKit,再应用Ruby号令行对象切换到DevKit目次安装:
ruby dk.rb init
ruby dk.rb install
若是感觉以上步调麻烦的,也可以直接安装RailsInstaller了事,我为了安装最新的Ruby版本所以采取以上步调。
RailsInstaller下载地址:-script: false; light: false; ruler: false; smart-tabs: true; tab-size: 4; toolbar: true;"> gem install rake
gem install rails
在安装的过程中应当会显示安装i18n,即说话包,若是没有提示的话也可以经由过程以下号令安装:
gem install i18n
3.安装RMagick
起首,到-script: false; light: false; ruler: false; smart-tabs: true; tab-size: 4; toolbar: true;"> gem install rmagick
若是提示失败则用:
gem install rmagick --platform=ruby -- "--with-opt-include=D:/ImageMagick/include" "--with-opt-lib=D:/ImageMagick/lib"
若是还是失败就用:
gem install rmagick --platform=ruby -- "--with-opt-dir=D:/ImageMagick"
如许就安装上了rmagick 2.1.3(最新版本的Redmine如2.1.5、2.2.0都依微信小程序开发附rmagick 2.1.3而不是2.1.2)
4.安装Redmine
经由过程-script: false; light: false; ruler: false; smart-tabs: true; tab-size: 4; toolbar: true;"> bundle install --without development test
如许会搜检到未安装的包,主动下载安装;without参数就是用于忽视一些gem包,假如rmagick安装不成功,那也可以如许:
bundle install --without development test rmagick
跳过rmagick的安装;我这里只应用SQLite数据库,所以把别的2个数据库也跳过了:
bundle install --without development test postgresql mysql2
5.设备Redmine
打开Redmine的config目次,把database.yml.example复制一份并重定名为database.yml,找到此中的production节点设备数据库:
production:
adapter: sqlite3
database: db/redmine_production.sqlite3
这是我应用的SQLite数据库设备。
接下来设备邮件发送,把configuration.yml.example复制一份并重定名沈阳网站建设为configuration.yml,找到default下的email_delivery:
default:
# Outgoing emails configuration (see examples above)
email_delivery:
delivery_method: :smtp
smtp_settings:
address: smtp.sina.com
port: 25
domain: sina.com
authentication: :login
user_name: "lwme的用户名@sina.com"
password: "lwme的暗码"
以上应用新浪的邮箱作为例子,这个设备好今后,之掉队入体系设置可能还要设置一下发送邮件的邮件地址。
6.生成Session Key
打开Ruby号令行对象,切换到Redmine站点根目次运行:
rake generate_secret_token
7.生成数据库布局
打开Ruby号令行对象,切换到Redmine站点根目次运行:
set RAILS_ENV=production
rake db:migrate
8.载入默认数据
打开Ruby号令行对象,切换到Redmine站点根目次运行:
set RAILS_ENV=production
set REDMINE_LANG=zh
rake redmine:load_default_data
运行Redmine
直接运行(WEBrick)
打开Ruby号令行对象,切换到Redmine站点根目次运行:
ruby script/rails server webrick -e production -p 3000
以上号令应用webrick把Redmine运行在-script: false; light: false; ruler: false; smart-tabs: true; tab-size: 4; toolbar: true;"> gem install thin
然后,打开Ruby号令行对象,切换到Redmine站点根目次运行:
thin start -p 3000 -e production
同样的也是在3000端口运行
作为体系办事运行
我这里应用的是Windows Server 2003,须要用到对象Windows NT Resource Kit:-script: false; light: false; ruler: false; smart-tabs: true; tab-size: 4; toolbar: true;"> "C:\Program Files\Windows Resource Kits\Tools\INSTSRV.EXE" Redmine "C:\Program Files\Windows Resource Kits\Tools\SRVANY.EXE"
接着打开注册表,定位到HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Redmine,然后在Redmine下新建一个项,名为“Parameters”
打开Parameters节点,在右边的视图分别添加3个字符串值:
Application: D:\ruby\Ruby193\bin\Ruby.exe
AppParameters: D:\ruby\Ruby193\bin\thin start -p 3000 -e production
AppDirectory: D:/ruby/redmine-2.2.0/
若是不是用Thin,而是用webrick,那就添加2个字符串值:
Application: D:\ruby\Ruby193\bin\Ruby.exe
AppParameters: D:/ruby/redmine-2.2.0/script/rails server webrick -e production -p 3000
然后在体系办事里把它设置为主动并启动它。
对于不是windows server 2003体系的,可以尝尝thin_service:
gem install thin_service
应用办法经由过程下面号令来懂得:
thin_service install --help
thin_service remove --help
应用办法估计与mongrel_service差不久不多,mongrel_service是如许:
mongrel_rails service::install -N D:\ruby\redmine-2.2.0 -p 3000 -e production
thin_service安装办事的办法可能会是(未验证):
thin_service install -N D:\ruby\redmine-2.2.0 -p 3000 -e production
进级
备份老的站点数据:
备份config目次下设备文件configuration.yml,database.yml
备份db目次下数据库redmine_production.sqlite3,schema.rb
备份files目次下的上传的文件
下载新的版本,然后在新的站点根目次下运行号令从头搜检一下依附包:
bundle install --without development test postgresql mysql2
把以上备份的文件放到新的站点目次
生成session key:
rake generate_secret_token
进级数据库:
set RAILS_ENV=production
rake db:migrate
清理缓存和会话:
rake tmp:cache:clear
rake tmp:sessions:clear
参考
官方安装指南:-script: false; light: false; ruler: false; smart-tabs: true; tab-size: 4; toolbar: true;"> gem install git
然后git库和redmine是同一台机械的话,就可以在项目设置里把git目次设置为git库地址如:d:\repo\myproj…
------EOF------