草庐IT

项目管理和缺陷跟踪系统 Redmine

程序员阿远 2023-03-28 原文

1. Redmine 概述

Redmine 是用 Ruby 开发的基于 web 的项目管理软件,是用 ROR 框架开发的一套跨平台项目管理系统,支持多种数据库,有不少自己独特的功能,例如提供 wiki、新闻台等。还可以集成其他版本管理系统和 BUG 跟踪系统;例如 SVN、CVS、TD 等。这种 Web 形式的项目管理系统通过项目(Project)的形式把成员、任务(问题)、文档、讨论以及各种形式的资源组织在一起,项目成员参与更新任务、文档等内容来推动项目。

安装 Redmine 一些有用的知识点

  • Redmine 集成环境(Redmine packaged by Bitnami )

<pre class="cm-s-default" style="font-family: Monaco, Menlo, Consolas, "Courier New", monospace !important; -webkit-font-smoothing: antialiased; margin: 0px; padding: 0px; font-size: 14px; overflow: auto; line-height: 1.45; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0); color: rgb(89, 89, 89);">https://bitnami.com/stack/redmine/installer</pre>

  • 集成环境(Install Ruby on Rails)

<pre class="cm-s-default" style="font-family: Monaco, Menlo, Consolas, "Courier New", monospace !important; -webkit-font-smoothing: antialiased; margin: 0px; padding: 0px; font-size: 14px; overflow: auto; line-height: 1.45; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0); color: rgb(89, 89, 89);">https://railsinstaller.org/</pre>

RailsInstaller 向 Windows 开发者提供了一种便捷的方式以轻松、快速创建 Ruby on Rails 3 应用。到目前为止,Windows 开发者需要搭建好 Ruby、RubyGems、Rails 以及 SQLite 才能开始创建 Rails 应用。

  • 集成环境(rubyinstaller)

<pre class="cm-s-default" style="font-family: Monaco, Menlo, Consolas, "Courier New", monospace !important; -webkit-font-smoothing: antialiased; margin: 0px; padding: 0px; font-size: 14px; overflow: auto; line-height: 1.45; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0); color: rgb(89, 89, 89);">https://rubyinstaller.org/downloads/</pre>

  • 开发者准备Ruby环境搭建的所有的软件,并且必须考虑依赖性,进行安装。

2. 安装 railsinstaller

  • 下载railsinstaller

<pre class="cm-s-default" style="font-family: Monaco, Menlo, Consolas, "Courier New", monospace !important; -webkit-font-smoothing: antialiased; margin: 0px; padding: 0px; font-size: 14px; overflow: auto; line-height: 1.45; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0); color: rgb(89, 89, 89);">https://github.com/railsinstaller/railsinstaller-windows
https://railsinstaller.org/</pre>

下载下来是一个exe安装文件,直接双击执行;同意安装协议后,点击Next>

image.png

可以自定义安装目录,无需安装 Git,把 Git 的勾选去掉。

安装完后的目录结构如下

image.png

同时会在 C: 盘,生成一个 Sites 文件夹;该文件夹的作用,就是用来存放项目的。Redmine 项目的部署目录就是该目录。

3. 安装 Redmine

安装的 Redmine 的版本一定要跟 railsinstaller 的 Ruby对应,具体对应关系参考:

<pre class="cm-s-default" style="font-family: Monaco, Menlo, Consolas, "Courier New", monospace !important; -webkit-font-smoothing: antialiased; margin: 0px; padding: 0px; font-size: 14px; overflow: auto; line-height: 1.45; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0); color: rgb(89, 89, 89);">https://www.redmine.org/projects/redmine/wiki/RedmineInstall</pre>

从第二步安装的 railsinstaller 得知 Ruby 的版本是 2.3.3;所以只能下载 Redmine 4.1版本,及比这个版本低的版本

image.png
  • 下载 Redmine

下载地址如下

<pre class="cm-s-default" style="font-family: Monaco, Menlo, Consolas, "Courier New", monospace !important; -webkit-font-smoothing: antialiased; margin: 0px; padding: 0px; font-size: 14px; overflow: auto; line-height: 1.45; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0); color: rgb(89, 89, 89);">https://www.redmine.org/projects/redmine/wiki/Download</pre>

将 redmine-4.1.6.zip解压到 Sites 目录,并且将文件夹名称修改为redmine,如下:

image.png

4. 配置 Redmine

Redmine 依赖数据库,这里使用 MySQL 数据库;请自行安装 MySQL 数据库服务。

  • 创建数据库

<pre class="cm-s-default" style="font-family: Monaco, Menlo, Consolas, "Courier New", monospace !important; -webkit-font-smoothing: antialiased; margin: 0px; padding: 0px; font-size: 14px; overflow: auto; line-height: 1.45; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0); color: rgb(89, 89, 89);">create database redmine character set utf8mb4;</pre>

  • 修改配置文件

打开 C:\Sites\redmine\config ,找到database.yml.example配置文件;复制一份,然后重命名为database.yml,修改 production 部分配置。修改如下

<pre class="cm-s-default" style="font-family: Monaco, Menlo, Consolas, "Courier New", monospace !important; -webkit-font-smoothing: antialiased; margin: 0px; padding: 0px; font-size: 14px; overflow: auto; line-height: 1.45; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0); color: rgb(89, 89, 89);">production:
adapter: mysql2
database: redmine
host: localhost
username: root
password: root
port: 3306

Use "utf8" instead of "utfmb4" for MySQL prior to 5.7.7

encoding: utf8mb4</pre>

  • 安装 Redmine 依赖

打开 RailsInstaller 的命令行窗口 Command Prompt with Ruby and Rails,进入 redmine 项目目录

<pre class="cm-s-default" style="font-family: Monaco, Menlo, Consolas, "Courier New", monospace !important; -webkit-font-smoothing: antialiased; margin: 0px; padding: 0px; font-size: 14px; overflow: auto; line-height: 1.45; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0); color: rgb(89, 89, 89);">cd redmine</pre>

image.png

如果Ruby 2.5 或者更低版本的 Ruby;先安装 bundler

<pre class="cm-s-default" style="font-family: Monaco, Menlo, Consolas, "Courier New", monospace !important; -webkit-font-smoothing: antialiased; margin: 0px; padding: 0px; font-size: 14px; overflow: auto; line-height: 1.45; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0); color: rgb(89, 89, 89);">gem install bundler</pre>

安装 bundler 可能遇到如下错误

<pre class="cm-s-default" style="font-family: Monaco, Menlo, Consolas, "Courier New", monospace !important; -webkit-font-smoothing: antialiased; margin: 0px; padding: 0px; font-size: 14px; overflow: auto; line-height: 1.45; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0); color: rgb(89, 89, 89);">C:\Sites>gem install bundler
ERROR: Could not find a valid gem 'bundler' (>= 0), here is why:
Unable to download data from https://rubygems.org/ - SSL_connect returned=1 errno=0 state=error: certificate verify failed (https://api.rubygems.org/specs.4.8.gz)</pre>

可以参考

<pre class="cm-s-default" style="font-family: Monaco, Menlo, Consolas, "Courier New", monospace !important; -webkit-font-smoothing: antialiased; margin: 0px; padding: 0px; font-size: 14px; overflow: auto; line-height: 1.45; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0); color: rgb(89, 89, 89);">https://www.cnblogs.com/smallbottle/p/4000825.html</pre>

执行下面的命令安装 Redmine 的所有依赖项

<pre class="cm-s-default" style="font-family: Monaco, Menlo, Consolas, "Courier New", monospace !important; -webkit-font-smoothing: antialiased; margin: 0px; padding: 0px; font-size: 14px; overflow: auto; line-height: 1.45; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0); color: rgb(89, 89, 89);">bundle install --without development test</pre>

  • 创建 Session 密钥

<pre class="cm-s-default" style="font-family: Monaco, Menlo, Consolas, "Courier New", monospace !important; -webkit-font-smoothing: antialiased; margin: 0px; padding: 0px; font-size: 14px; overflow: auto; line-height: 1.45; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0); color: rgb(89, 89, 89);">bundle exec rake generate_secret_token</pre>

生成一个随机密钥,Rails 使用该密钥对存储会话数据的 cookie 进行编码,从而防止它们被篡改。重新启动后,生成新的秘密令牌会使所有现有会话无效。

  • 创建数据库表结构

<pre class="cm-s-default" style="font-family: Monaco, Menlo, Consolas, "Courier New", monospace !important; -webkit-font-smoothing: antialiased; margin: 0px; padding: 0px; font-size: 14px; overflow: auto; line-height: 1.45; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0); color: rgb(89, 89, 89);">set RAILS_ENV=production
bundle exec rake db:migrate</pre>

将在 MySQL 数据库创建 Redmine 的相关表机构

image.png
  • 设置数据库默认数据集

默认情况下是汉语的;所以不需要进行语言切换;如果需切换

<pre class="cm-s-default" style="font-family: Monaco, Menlo, Consolas, "Courier New", monospace !important; -webkit-font-smoothing: antialiased; margin: 0px; padding: 0px; font-size: 14px; overflow: auto; line-height: 1.45; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0); color: rgb(89, 89, 89);">set RAILS_ENV=production
set REDMINE_LANG=zh
bundle exec rake redmine:load_default_data</pre>

  • 启动 Redmine

<pre class="cm-s-default" style="font-family: Monaco, Menlo, Consolas, "Courier New", monospace !important; -webkit-font-smoothing: antialiased; margin: 0px; padding: 0px; font-size: 14px; overflow: auto; line-height: 1.45; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0); color: rgb(89, 89, 89);">bundle exec rails server webrick -e production</pre>

image.png

5. 访问 Redmine

Redmine的默认端口是3000,默认用户是 admin / admin,所以访问地址是

<pre class="cm-s-default" style="font-family: Monaco, Menlo, Consolas, "Courier New", monospace !important; -webkit-font-smoothing: antialiased; margin: 0px; padding: 0px; font-size: 14px; overflow: auto; line-height: 1.45; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0); color: rgb(89, 89, 89);">http://127.0.0.1:3000</pre>


image.png

登录后进行先进行秘密修改,修改后进入主界面。至此完成 Redmine 的安装。

有关项目管理和缺陷跟踪系统 Redmine的更多相关文章

  1. ruby - i18n Assets 管理/翻译 UI - 2

    我正在使用i18n从头开始​​构建一个多语言网络应用程序,虽然我自己可以处理一大堆yml文件,但我说的语言(非常)有限,最终我想寻求外部帮助帮助。我想知道这里是否有人在使用UI插件/gem(与django上的django-rosetta不同)来处理多个翻译器,其中一些翻译器不愿意或无法处理存储库中的100多个文件,处理语言数据。谢谢&问候,安德拉斯(如果您已经在ruby​​onrails-talk上遇到了这个问题,我们深表歉意) 最佳答案 有一个rails3branchofthetolkgem在github上。您可以通过在Gemfi

  2. ruby - 如何在 buildr 项目中使用 Ruby 代码? - 2

    如何在buildr项目中使用Ruby?我在很多不同的项目中使用过Ruby、JRuby、Java和Clojure。我目前正在使用我的标准Ruby开发一个模拟应用程序,我想尝试使用Clojure后端(我确实喜欢功能代码)以及JRubygui和测试套件。我还可以看到在未来的不同项目中使用Scala作为后端。我想我要为我的项目尝试一下buildr(http://buildr.apache.org/),但我注意到buildr似乎没有设置为在项目中使用JRuby代码本身!这看起来有点傻,因为该工具旨在统一通用的JVM语言并且是在ruby中构建的。除了将输出的jar包含在一个独特的、仅限ruby​​

  3. ruby-on-rails - 项目升级后 Pow 不会更改 ruby​​ 版本 - 2

    我在我的Rails项目中使用Pow和powifygem。现在我尝试升级我的ruby​​版本(从1.9.3到2.0.0,我使用RVM)当我切换ruby​​版本、安装所有gem依赖项时,我通过运行railss并访问localhost:3000确保该应用程序正常运行以前,我通过使用pow访问http://my_app.dev来浏览我的应用程序。升级后,由于错误Bundler::RubyVersionMismatch:YourRubyversionis1.9.3,butyourGemfilespecified2.0.0,此url不起作用我尝试过的:重新创建pow应用程序重启pow服务器更新战俘

  4. ruby-on-rails - 新 Rails 项目 : 'bundle install' can't install rails in gemfile - 2

    我已经像这样安装了一个新的Rails项目:$railsnewsite它执行并到达:bundleinstall但是当它似乎尝试安装依赖项时我得到了这个错误Gem::Ext::BuildError:ERROR:Failedtobuildgemnativeextension./System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/rubyextconf.rbcheckingforlibkern/OSAtomic.h...yescreatingMakefilemake"DESTDIR="cleanmake"DESTDIR="

  5. ruby-on-rails - 获取 inf-ruby 以使用 ruby​​ 版本管理器 (rvm) - 2

    我安装了ruby​​版本管理器,并将RVM安装的ruby​​实现设置为默认值,这样'哪个ruby'显示'~/.rvm/ruby-1.8.6-p383/bin/ruby'但是当我在emacs中打开inf-ruby缓冲区时,它使用安装在/usr/bin中的ruby​​。有没有办法让emacs像shell一样尊重ruby​​的路径?谢谢! 最佳答案 我创建了一个emacs扩展来将rvm集成到emacs中。如果您有兴趣,可以在这里获取:http://github.com/senny/rvm.el

  6. Ruby 从大范围中获取第 n 个项目 - 2

    假设我有这个范围:("aaaaa".."zzzzz")如何在不事先/每次生成整个项目的情况下从范围中获取第N个项目? 最佳答案 一种快速简便的方法:("aaaaa".."zzzzz").first(42).last#==>"aaabp"如果出于某种原因你不得不一遍又一遍地这样做,或者如果你需要避免为前N个元素构建中间数组,你可以这样写:moduleEnumerabledefskip(n)returnto_enum:skip,nunlessblock_given?each_with_indexdo|item,index|yieldit

  7. ruby-on-rails - 事件管理员日期过滤器日期格式自定义 - 2

    是否有简单的方法来更改默认ISO格式(yyyy-mm-dd)的ActiveAdmin日期过滤器显示格式? 最佳答案 您可以像这样为日期选择器提供额外的选项,而不是覆盖js:=f.input:my_date,as::datepicker,datepicker_options:{dateFormat:"mm/dd/yy"} 关于ruby-on-rails-事件管理员日期过滤器日期格式自定义,我们在StackOverflow上找到一个类似的问题: https://s

  8. 电脑0x0000001A蓝屏错误怎么U盘重装系统教学 - 2

      电脑0x0000001A蓝屏错误怎么U盘重装系统教学分享。有用户电脑开机之后遇到了系统蓝屏的情况。系统蓝屏问题很多时候都是系统bug,只有通过重装系统来进行解决。那么蓝屏问题如何通过U盘重装新系统来解决呢?来看看以下的详细操作方法教学吧。  准备工作:  1、U盘一个(尽量使用8G以上的U盘)。  2、一台正常联网可使用的电脑。  3、ghost或ISO系统镜像文件(Win10系统下载_Win10专业版_windows10正式版下载-系统之家)。  4、在本页面下载U盘启动盘制作工具:系统之家U盘启动工具。  U盘启动盘制作步骤:  注意:制作期间,U盘会被格式化,因此U盘中的重要文件请注

  9. 【鸿蒙应用开发系列】- 获取系统设备信息以及版本API兼容调用方式 - 2

    在应用开发中,有时候我们需要获取系统的设备信息,用于数据上报和行为分析。那在鸿蒙系统中,我们应该怎么去获取设备的系统信息呢,比如说获取手机的系统版本号、手机的制造商、手机型号等数据。1、获取方式这里分为两种情况,一种是设备信息的获取,一种是系统信息的获取。1.1、获取设备信息获取设备信息,鸿蒙的SDK包为我们提供了DeviceInfo类,通过该类的一些静态方法,可以获取设备信息,DeviceInfo类的包路径为:ohos.system.DeviceInfo.具体的方法如下:ModifierandTypeMethodDescriptionstatic StringgetAbiList​()Obt

  10. kvm虚拟机安装centos7基于ubuntu20.04系统 - 2

    需求:要创建虚拟机,就需要给他提供一个虚拟的磁盘,我们就在/opt目录下创建一个10G大小的raw格式的虚拟磁盘CentOS-7-x86_64.raw命令格式:qemu-imgcreate-f磁盘格式磁盘名称磁盘大小qemu-imgcreate-f磁盘格式-o?1.创建磁盘qemu-imgcreate-fraw/opt/CentOS-7-x86_64.raw10G执行效果#ls/opt/CentOS-7-x86_64.raw2.安装虚拟机使用virt-install命令,基于我们提供的系统镜像和虚拟磁盘来创建一个虚拟机,另外在创建虚拟机之前,提前打开vnc客户端,在创建虚拟机的时候,通过vnc

随机推荐