首页 > 其他分享 >redmine

redmine

时间:2023-09-06 12:36:20浏览次数:29  
标签:gems thsj sudo redmine ubuntu ruby

1.redmine网站下载Redmine4.2.0的安装包;

 

2.拷贝Redmine4.2.0的安装包到ubuntu工作目录,并解压缩

 

3.移植redmine解压目录到/opt目录

 

4.配置Redmine数据库,拷贝redmine解压目录下的config目录下的database.yml.example,为database.yml文件,并进行第1节的配置,具体如下所述:

cp database.yml.example database.yml

Question1: thsj@thsj-pc:/opt/redmine-4.2.0$ sudo gem install bundler
Fetching: bundler-2.4.19.gem (100%)
ERROR:  Error installing bundler:
    The last version of bundler (>= 0) to support your Ruby & RubyGems was 2.3.26. Try installing it with `gem install bundler -v 2.3.26`
    bundler requires Ruby version >= 2.6.0. The current ruby version is 2.5.0.

5.进入redmine目录,安装Ruby依赖项,如下图所示:

  安装Ruby

  1>sudo apt-get install curl

  thsj@thsj-pc:~$ sudo apt-get install curl
  Reading package lists... Done
  Building dependency tree       
  Reading state information... Done
  The following packages were automatically installed and are no longer required:
    fonts-lato libgmp-dev libgmpxx4ldbl ruby-did-you-mean ruby-minitest
    ruby-net-telnet ruby-power-assert ruby2.5-doc rubygems-integration
  Use 'sudo apt autoremove' to remove them.
  The following additional packages will be installed:
    libcurl4
  The following NEW packages will be installed:
    curl libcurl4
  2>sudo apt-get update

thsj@thsj-pc:~$ sudo apt-get update
Hit:1 http://security.ubuntu.com/ubuntu bionic-security InRelease              
Hit:2 http://cn.archive.ubuntu.com/ubuntu bionic InRelease                     
Hit:3 http://cn.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:4 http://cn.archive.ubuntu.com/ubuntu bionic-backports InRelease
Reading package lists... Done
  3>sudo apt update

thsj@thsj-pc:~$ sudo apt update
Hit:1 http://security.ubuntu.com/ubuntu bionic-security InRelease           
Hit:2 http://cn.archive.ubuntu.com/ubuntu bionic InRelease
Hit:3 http://cn.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:4 http://cn.archive.ubuntu.com/ubuntu bionic-backports InRelease
Reading package lists... Done
Building dependency tree       
Reading state information... Done
277 packages can be upgraded. Run 'apt list --upgradable' to see them.

  4>sudo apt -y install software-properties-common

thsj@thsj-pc:~$ sudo apt -y install software-properties-common
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  fonts-lato gir1.2-goa-1.0 gir1.2-snapd-1 libgmp-dev libgmpxx4ldbl
  ruby-did-you-mean ruby-minitest ruby-net-telnet ruby-power-assert
  ruby2.5-doc rubygems-integration
  5>sudo apt-add-repository ppa:brightbox/ruby-ng

thsj@thsj-pc:~$ sudo apt-add-repository ppa:brightbox/ruby-ng
 Ubuntu packages for Ruby 2.7, 2.6, 2.5, 2.4, 2.3, 2.2, 2.1, 2.0 1.9.3 and 1.8.

See https://www.brightbox.com/docs/ruby/ubuntu/ for more details.

Discussion list here:

https://groups.google.com/forum/#!forum/brightbox-ruby-ubuntu-packaging

https://www.brightbox.com
 More info: https://launchpad.net/~brightbox/+archive/ubuntu/ruby-ng
Press [ENTER] to continue or Ctrl-c to cancel adding it.
  6>sudo apt update

thsj@thsj-pc:~$ sudo apt update
Hit:1 http://ppa.launchpad.net/brightbox/ruby-ng/ubuntu bionic InRelease       
Hit:2 http://security.ubuntu.com/ubuntu bionic-security InRelease              
Hit:3 http://cn.archive.ubuntu.com/ubuntu bionic InRelease
Hit:4 http://cn.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:5 http://cn.archive.ubuntu.com/ubuntu bionic-backports InRelease
Reading package lists... Done
Building dependency tree       
Reading state information... Done
274 packages can be upgraded. Run 'apt list --upgradable' to see them.
  7>sudo apt install ruby2.7

thsj@thsj-pc:~$ sudo apt install ruby2.7
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  gir1.2-goa-1.0 gir1.2-snapd-1 libgmp-dev libgmpxx4ldbl ruby-did-you-mean
  ruby2.5-doc
Use 'sudo apt autoremove' to remove them.

sudo apt-get install ruby2.7-dev rubygems libmysqlclient-dev imagemagick libmagickwand-dev

6.更改默认gem源,默认gem源地址为:https://rubygems.org/,修改为国内gem源地址:https://gems.ruby-china.com。提高安装Ruby依赖项的速度,缩短安装时间。修改后,查看当前gem源。如下图所示:

gem sources --remove https://rubygems.org/

gem source -a https://gems.ruby-china.com

gem source -l

7.进入redmine目录,安装Ruby依赖项,(注意:切换到https://gems.ruby-china.com

thsj@thsj-pc:/opt/redmine-4.2.0$ vim Gemfile .更改默认Gemfile源

sudo gem install bundler -v  2.3.20

sudo bundle config set --local without 'development test postgresql sqlite'

sudo bundle install

(该处命令执行时间较长,可能达到十几分钟)

Qusetion2:

........

Fetching globalid 1.1.0
Installing globalid 1.1.0
Fetching activemodel 5.2.5
Installing activemodel 5.2.5
Installing css_parser 1.12.0
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /var/lib/gems/2.5.0/gems/racc-1.7.1/ext/racc/cparse
/usr/bin/ruby2.5 -r ./siteconf20230905-16971-xrzo31.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h

extconf failed, exit code 1

Gem files will remain installed in /var/lib/gems/2.5.0/gems/racc-1.7.1 for
inspection.
Results logged to
/var/lib/gems/2.5.0/extensions/x86_64-linux/2.5.0/racc-1.7.1/gem_make.out
Answer:

sudo apt install ruby2.7-dev

 

8.运行以下命令以生成密钥并迁移数据库:

sudo bundle exec rake generate_secret_token

Question3:

thsj@thsj-pc:/opt/redmine-4.2.0$ sudo bundle exec rake generate_secret_token
Your RubyGems version (2.7.6) has a bug that prevents `required_ruby_version` from working for Bundler. Any scripts that use `gem install bundler` will break as soon as Bundler drops support for your Ruby version. Please upgrade RubyGems to avoid future breakage and silence this warning by running `gem update --system 3.2.3`
rake aborted!
NameError: uninitialized constant Nokogiri::HTML4
Did you mean?  Nokogiri::HTML
/var/lib/gems/2.5.0/gems/loofah-2.21.1/lib/loofah/html4/document.rb:10:in `<module:HTML4>'
/var/lib/gems/2.5.0/gems/loofah-2.21.1/lib/loofah/html4/document.rb:4:in `<module:Loofah>'
/var/lib/gems/2.5.0/gems/loofah-2.21.1/lib/loofah/html4/document.rb:3:in `<top (required)>'
Answer:

thsj@thsj-pc:/opt/redmine-4.2.0$ sudo gem uninstall nokogiri

You have requested to uninstall the gem:
    nokogiri-1.11.7-x86_64-linux

loofah-2.21.1 depends on nokogiri (>= 1.5.9)
marcel-1.0.2 depends on nokogiri (>= 1.9.1, development)
rails-dom-testing-2.2.0 depends on nokogiri (>= 1.6)
roadie-4.0.0 depends on nokogiri (~> 1.8)
sprockets-4.2.0 depends on nokogiri (~> 1.3, development)
If you remove this gem, these dependencies will not be met.
Continue with Uninstall? [yN]  y
Remove executables:
    nokogiri

in addition to the gem? [Yn]  Y
Removing nokogiri
Successfully uninstalled nokogiri-1.11.7-x86_64-linux

vim Gemfile  #cahnge version of nokogiri to 1.15.4     >=1.9.1

Question4:

thsj@thsj-pc:/opt/redmine-4.2.0$ sudo bundle exec rake generate_secret_token
Could not find nokogiri-1.11.7-x86_64-linux, redcarpet-3.5.1, mysql2-0.5.5, racc-1.7.1, nio4r-2.5.9, websocket-driver-0.7.6 in locally installed gems
Run `bundle install` to install missing gems.
Answer:

sudo rm Gemfile.lock

sudo RAILS_ENV=production bundle exec rake db:migrate

Question5:

thsj@thsj-pc:/opt/redmine-4.2.0$ sudo RAILS_ENV=production bundle exec rake db:migrate
rake aborted!
Mysql2::Error::ConnectionError: Access denied for user 'redmine'@'localhost' (using password: YES)
/var/lib/gems/2.7.0/gems/mysql2-0.5.5/lib/mysql2/client.rb:97:in `connect'
/var/lib/gems/2.7.0/gems/mysql2-0.5.5/lib/mysql2/client.rb:97:in `initialize'
/var/lib/gems/2.7.0/gems/activerecord-5.2.5/lib/active_record/connection_adapters/mysql2_adapter.rb:22:in `new'
/var/lib/gems/2.7.0/gems/activerecord-5.2.5/lib/active_record/connection_adapters/mysql2_adapter.rb:22:in `mysql2_connection'

Answer:

sudo apt-get install mysql-server mysql-client

sudo mysql -u root -p

mysql>create database redmine;

mysql>alter database redmine character set utf8;

添加用户redmine并刷行权限:

mysql>grant all privileges on redmine.* to redmine@"localhost" identified by 'l' with grant option;

mysql>flush privileges;

 

 

 

9.初始化数据表配置,配置中文zh:

bundle exec rake redmine:load_default_data RAILS_ENV=production REDMINE_LANG=zh

10.设置本地ip地址(192.168.0.13),如果设置了固定IP地址,可以跳过该节.

sudo ifconfig enp0s3 192.168.0.13

11.使用指令启动redmine服务,指定监听端口30010

bundle exec rails server webrick -e production -b 0.0.0.0 -p 30010

 

12.在浏览器中输入192.168.0.13:30010,即可进入redmine登录界面,如下图所示:

 

13.redmine默认用户为:admin,密码:admin,输入用户密码即可登录进入,首次登录redmine需要进行密码修改。

标签:gems,thsj,sudo,redmine,ubuntu,ruby
From: https://www.cnblogs.com/boring-luobo/p/17681716.html

相关文章

  • redmine相关链接
    群英汇·项目管理系统:http://www.ossxp.com/HelpCenter/00040_Redmine其中包含中文说明及管理手册 一键安装下载:http://bitnami.org/stack/redmine#nativeInstaller 在线演示:http://demo.redmine.org/ 中文版Demo:http://redmine.ossxp.com/redmine......
  • Adding a gitolite-controlled repository to Redmine
    Currently,weuse gitolite toaccesscontrolourGitrepositories.Inaddition,weuse Redmine tomanageourprojects.ThestandardinstallationofRedminecanonlyaccessalocalGitrepositoryviadirectaccesstothefilesystem.Unfortunately,Redmine......
  • 1.startRedmineMySQL
    #!/bin/bashdockerstopredmineMySQLdockerrm-fredmineMySQLdockerrun--privileged=true\ -idt\ -p3307:3306\ --nameredmineMySQL\ --restart=always\ -v/home/mysql/data:/var/lib/mysql\ -v/home/mysql/conf/my.cnf:/etc/mysql/......
  • 2.startRedmine.sh
    #!/bin/bashdockerstopredminedockerrmredminedockerrun-idt\ --restart=always\ --name=redmine\ --link=redmineMySQL:mysql\ --env='MYSQL_DATABASE=redmine_production'\ --env='MYSQL_USER=redmin'\ --env='MYSQL_PASS=QWER......
  • Redmine 中,如何新增一个字段名,比如"模块名称":
    why:用于编写测试报告时能够直接根据模块名称进行统计,不对excel表格进行自定义拆分-----规范性登录到Redmine平台,并进入你的项目页面。在项目页面上方的导航栏中,点击"设置"或类似的选项。在设置页面中,找到并点击"问题"或"问题跟踪"相关的设置选项。在问题设置页面中......
  • redmine 迁移后邮箱配置
    https://blog.csdn.net/love8753/article/details/126380927步骤一修改配置文件步骤二redmine页面配置信息步骤一修改配置文件打开C:\Bitnami\redmine-3.3.0-1\apps\redmine\htdocs\config\configuration.yml,找到如下内容:address:一般为smtp+邮箱后缀名port:端口号,......
  • redmine 127访问成功,其他机器不能访问
    添加防火墙入站规则......
  • Redmine之报表应用研究
    近来将RedMine的源代码下下来进行研究,主要目的是研究它的Report功能是如何实现的目前研究结果总结为几点:1)Remine界面上支持PDF,CSV,HTML输出,但没有单独的报表运行中心,只有在Issue及Gant界面有报表输出功能2)新建两个用户a和b,a用户在创建时默认语言选择“English”,b用户选择"Chinese(Si......
  • Jira和Redmine哪个更好
    如果你是一个软件开发团队的成员或者负责人,你可能会遇到这样的问题:该选择哪种项目管理和协作工具来提高工作效率和质量?市面上有很多这样的工具,比如Redmine和Jira,它们都有各自的优缺点,适合不同的场景和需求。本文将从以下几个方面对比Redmine和Jira的区别,帮助你做出更好的......
  • Redmine
    Redmine是用Ruby开发的基于web的项目管理软件,是用ROR框架开发的一套跨平台项目管理系统,据说是源于Basecamp的ror版而来,支持多种数据库,有不少自己独特的功能,例如提供wiki、新闻台等,还可以集成其他版本管理系统和BUG跟踪系统,例如SVN、CVS、TD等等。这种Web形式的项目管理系统通过......