2019独角兽企业重金招聘Python工程师标准>>>

1.说明

redmine和ruby以及rails的版本号关系如下: 
Redmine版本         支持Ruby版本                         使用Rails版本
4.0 (即将到来的)     ruby 2.2,2.3,2.4                    Rails 5.1
3.4                 ruby 1.9.3,2.0.0,2.1,2.2,2.3,2.4    Rails 4.2
3.3                 ruby 1.9.3,2.0.0,2.1,2.2,2.3        Rails 4.2
3.2                 ruby 1.9.3.2.0.0,2.1,2.2            Rails 4.2

支持Ruby 1.9.3,2.0和2.1通过Ruby社区已经结束。 
Redmine 3.2或更低的不支持Ruby 2.3 。 Redmine 3.3支持Ruby 2.3。
Redmine不支持JRuby 因为一些gems不支持Rails 4.2。

官方安装文档:http://www.redmine.org/projects/redmine/wiki/RedmineInstall
2.安装mysql
参考二进制安装步骤
https://my.oschina.net/ch66880/blog/1523023

关闭访火墙
参考:https://my.oschina.net/ch66880/blog/1522782
然后重启电脑

3.设置mysql的账号和密码,并创建redmine数据库[root@localhost ~]# mysql  -uroot -p
Enter password:
#创建数据库
mysql> create database redmine character set utf8;
Query OK, 1 row affected (0.00 sec)
#
mysql> create user 'redmine'@'localhost' IDENTIFIED BY 'you01@';
Query OK, 0 rows affected (0.00 sec)mysql> grant all privileges on redmine.* to 'redmine'@'localhost';
Query OK, 0 rows affected (0.00 sec)mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)mysql> exit
Bye4.安装rvm
[root@localhost ~]# curl -L get.rvm.io | bash -s stable% Total    % Received % Xferd  Average Speed   Time    Time     Time  CurrentDload  Upload   Total   Spent    Left  Speed0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     00     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100   194  100   194    0     0    189      0  0:00:01  0:00:01 --:--:--   1900     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
100 24361  100 24361    0     0   9567      0  0:00:02  0:00:02 --:--:-- 28693
Downloading https://github.com/rvm/rvm/archive/1.29.4.tar.gz
Downloading https://github.com/rvm/rvm/releases/download/1.29.4/1.29.4.tar.gz.asc
gpg: directory `/root/.gnupg' created
gpg: new configuration file `/root/.gnupg/gpg.conf' created
gpg: WARNING: options in `/root/.gnupg/gpg.conf' are not yet active during this run
gpg: keyring `/root/.gnupg/pubring.gpg' created
gpg: Signature made Mon 02 Jul 2018 03:41:26 AM CST using RSA key ID BF04FF17
gpg: Can't check signature: No public key
Warning, RVM 1.26.0 introduces signed releases and automated check of signatures when GPG software found. Assuming you trust Michal Papis import the mpapis public key (downloading the signatures).GPG signature verification failed for '/usr/local/rvm/archives/rvm-1.29.4.tgz' - 'https://github.com/rvm/rvm/releases/download/1.29.4/1.29.4.tar.gz.asc'! Try to install GPG v2 and then fetch the public key:gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3or if it fails:command curl -sSL https://rvm.io/mpapis.asc | gpg2 --import -the key can be compared with:https://rvm.io/mpapis.aschttps://keybase.io/mpapisNOTE: GPG version 2.1.17 have a bug which cause failures during fetching keys from remote server. Please downgrade or upgrade to newer version (if available) or use the second method described above.
#如果遇到以下报错,则执行报错中的gpg2 --recv-keys的命令。
[root@localhost ~]# gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
gpg: keyring `/root/.gnupg/secring.gpg' created
gpg: requesting key D39DC0E3 from hkp server keys.gnupg.net
gpg: /root/.gnupg/trustdb.gpg: trustdb created
gpg: key D39DC0E3: public key "Michal Papis (RVM signing) <mpapis@gmail.com>" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
#再次执行命令curl -L get.rvm.io | bash -s stable
[root@localhost ~]# curl -L get.rvm.io | bash -s stable% Total    % Received % Xferd  Average Speed   Time    Time     Time  CurrentDload  Upload   Total   Spent    Left  Speed0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100   194  100   194    0     0    193      0  0:00:01  0:00:01 --:--:--   193
100   194  100   194    0     0    193      0  0:00:01  0:00:01 --:--:--   1930     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
100 24361  100 24361    0     0   9589      0  0:00:02  0:00:02 --:--:-- 39870
Downloading https://github.com/rvm/rvm/archive/1.29.4.tar.gz
Downloading https://github.com/rvm/rvm/releases/download/1.29.4/1.29.4.tar.gz.asc
gpg: Signature made Mon 02 Jul 2018 03:41:26 AM CST using RSA key ID BF04FF17
gpg: Good signature from "Michal Papis (RVM signing) <mpapis@gmail.com>"
gpg:                 aka "Michal Papis <michal.papis@toptal.com>"
gpg:                 aka "[jpeg image of size 5015]"
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: 409B 6B17 96C2 7546 2A17  0311 3804 BB82 D39D C0E3Subkey fingerprint: 62C9 E5F4 DA30 0D94 AC36  166B E206 C29F BF04 FF17
GPG verified '/usr/local/rvm/archives/rvm-1.29.4.tgz'
Creating group 'rvm'
Installing RVM to /usr/local/rvm/
Installation of RVM in /usr/local/rvm/ is almost complete:* First you need to add all users that will be using rvm to 'rvm' group,and logout - login again, anyone using rvm will be operating with `umask u=rwx,g=rwx,o=rx`.* To start using RVM you need to run `source /etc/profile.d/rvm.sh`in all your open shell windows, in rare cases you need to reopen all shell windows.* Please do NOT forget to add your users to the rvm group.The installer no longer auto-adds root or users to the rvm group. Admins must do this.Also, please note that group memberships are ONLY evaluated at login time.This means that users must log out then back in before group membership takes effect!#以上表示执行成功,然后加载一下rvm命令。
[root@localhost ~]# source /usr/local/rvm/scripts/rvm
#查看rvm库中已知的ruby版本
[root@localhost ~]# rvm list known
# MRI Rubies
[ruby-]1.8.6[-p420]
[ruby-]1.8.7[-head] # security released on head
[ruby-]1.9.1[-p431]
[ruby-]1.9.2[-p330]
[ruby-]1.9.3[-p551]
[ruby-]2.0.0[-p648]
[ruby-]2.1[.10]
[ruby-]2.2[.10]
[ruby-]2.3[.7]
[ruby-]2.4[.4]
[ruby-]2.5[.1]
[ruby-]2.6[.0-preview2]
ruby-head# for forks use: rvm install ruby-head-<name> --url https://github.com/github/ruby.git --branch 2.2# JRuby
jruby-1.6[.8]
jruby-1.7[.27]
jruby-9.1[.17.0]
jruby[-9.2.0.0]
jruby-head# Rubinius
rbx-1[.4.3]
rbx-2.3[.0]
rbx-2.4[.1]
rbx-2[.5.8]
rbx-3[.100]
rbx-head# TruffleRuby
truffleruby[-1.0.0-rc2]# Opal
opal# Minimalistic ruby implementation - ISO 30170:2012
mruby-1.0.0
mruby-1.1.0
mruby-1.2.0
mruby-1.3.0
mruby-1[.4.0]
mruby[-head]# Ruby Enterprise Edition
ree-1.8.6
ree[-1.8.7][-2012.02]# Topaz
topaz# MagLev
maglev-1.0.0
maglev-1.1[RC1]
maglev[-1.2Alpha4]
maglev-head# Mac OS X Snow Leopard Or Newer
macruby-0.10
macruby-0.11
macruby[-0.12]
macruby-nightly
macruby-head# IronRuby
ironruby[-1.1.3]
ironruby-head
#5.安装Ruby
[root@localhost ~]# rvm install  2.4.1#使用新版本[root@localhost ~]# rvm use  2.4.1
Using /usr/local/rvm/gems/ruby-2.4.1
#查看当前版本
[root@localhost ~]# ruby --version
ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux]
6.如果gem的源所在的网络不好,可以更改源
#[root@localhost ~]# gem update --system
Latest version already installed. Done.
[root@localhost ~]# gem -v
2.7.7
## 查看当前镜像源
[root@localhost ~]# gem sources -l
*** CURRENT SOURCES ***https://rubygems.org/
#更新为国内源
#如果你使用 Gemfile 和 Bundler (例如:Rails 项目)
#你可以用 Bundler 的 Gem 源代码镜像命令。
[root@localhost ~]# gem sources --add https://gems.ruby-china.org/ --remove https://rubygems.org/
https://gems.ruby-china.org/ added to sources
https://rubygems.org/ removed from sources
#再次查看源地址
[root@localhost ~]# gem sources -l
*** CURRENT SOURCES ***https://gems.ruby-china.org/
#这样你不用改你的 Gemfile 的 source。
[root@localhost ~]# bundle config mirror.https://rubygems.org https://gems.ruby-china.org
7.安装rails 和 相关依赖包
[root@localhost ~]# gem install rails[root@localhost ~]# gem install rake
#需要安装yum install mysql-devel
[root@localhost  ~]# yum install mysql-devel
[root@localhost  ~]# yum install libmysql-ruby libmysqlclient-dev
[root@localhost ~]# gem install mysql28.下载redmine并安装依赖
[root@localhost ~]# yum install ImageMagick-devel[root@localhost ~]# useradd -s /sbin/nologin redmine
[root@localhost ~]# cd /usr/local/
[root@localhost local]# wget https://www.redmine.org/releases/redmine-3.4.6.tar.gz[root@localhost local]# tar -zxvf redmine-3.4.6.tar.gz
[root@localhost local]# mv redmine-3.4.6 redmine && cd redmine
[root@localhost local]# chown -R root:root /usr/local/redmine
[root@localhost local]# cd redmine/
[root@localhost redmine]# bundle install----------------------------------------------------------------------------------------------------------------------------------------------------------------
9.配置redmine并初始化 Redmine设置在config/configuration.yml的文件中定义。
[root@localhost redmine]# cd /usr/local/redmine/config/[root@localhost config]# cp configuration.yml{.example,}
[root@localhost config]# cp database.yml{.example,}
##选择production部分修改数据库密码
[root@localhost config]# vim database.yml
Line indentation must be 2 spaces (no tabs).production:adapter: mysql2database: redminehost: localhostusername: rootpassword: ""encoding: utf8development:adapter: mysql2database: redmine_developmenthost: localhostusername: rootpassword: ""encoding: utf8# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:adapter: mysql21,1Top
"database.yml" 51L, 1137C      2,1Top34,0-15,1  678910,123456789101234-- INSERT --10,14TopF"5o"6r"7y"8o"9u"200"11"2@"3411,1Topsocket=/tmp/mysql.sock23210198765432109 87654567/tmp/mysql.sock7:/tmp/mysql.sock87654321        socket:/tmp/mysql.socksocket:/tmp/mysql.socksocket:/tmp/mysql.socksocket:/tmp/mysql.socksocket:/tmp/mysql.socksocket:/tmp/mysql.socksocket:/tmp/mysql.sock34567891010socket: /tmp/mysql.sock111,10Top:wq
"database.yml" 52L, 1172C written#生成表结构
[root@localhost redmine]# RAILS_ENV=production bundle exec rake db:migrate# 初始化数据选择zh
[root@localhost redmine]# RAILS_ENV=production bundle exec rake redmine:load_default_dataSelect language: ar, az, bg, bs, ca, cs, da, de, el, en, en-GB, es, es-PA, et, eu, fa, fi, fr, gl, he, hr, hu, id, it, ja, ko, lt, lv, mk, mn, nl, no, pl, pt, pt-BR, ro, ru, sk, sl, sq, sr, sr-YU, sv, th, tr, uk, vi, zh, zh-TW [en]
====================================
Default configuration data loaded.
#权限设置:
[root@localhost redmine]# pwd
/usr/local/redmine
[root@localhost redmine]# mkdir -pv  tmp tmp/pdf public/plugin_assets
[root@localhost redmine]# chown -R redmine:redmine files log tmp public/plugin_assets
[root@localhost redmine]# chmod -R 755 files log tmp public/plugin_assets
[root@localhost redmine]# rvm use  2.4.1
Using /usr/local/rvm/gems/ruby-2.4.1
[root@localhost redmine]# ruby --version
ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux]
##10.启动redmine
[root@localhost redmine]# nohup /usr/local/rvm/rubies/ruby-2.4.1/bin/ruby /usr/local/redmine/bin/rails server -e production -b 0.0.0.0 >/dev/null 2>&1 &[root@localhost redmine]# reboot

转载于:https://my.oschina.net/ch66880/blog/1863861

redmine 的安装步骤相关推荐

  1. Windows下Redmine 的安装步骤

    本文介绍 Windows下Redmine 的安装步骤.  1.给 DOS添加ruby 运行环境(下载并安装 rubyinstaller-1.8.7-p249-rc2.exe)       下载地址:  ...

  2. REDMINE/SVN安装、配置、集成和应用(二)

    REDMINE/SVN 应用 (2) 前面我们介绍了REDMINE/SVN安装.配置.集成,后面将介绍如何更好地使用Redmine/SVN系统,将研发项目的管理提高一个层次.REDMINE/SVN应用 ...

  3. windows下Bitnami Redmine的安装

    项目管理工具是团队开发过程中必不可少的工具,比较流行的包括JIRA.trac.redmine.xplanner等.redmine系统以其轻量.易上手等特点吸引了越来越多人的注意,作为其特色的甘特图,也 ...

  4. Windows10下python-pcl的安装步骤说明,亲测ok

    Windows10下python-pcl的安装步骤说明 1. 环境依赖 2. 安装步骤 2.1 安装visual studio 2017 2.2 安装pcl并配置环境变量 2.3 编译python-p ...

  5. x9此计算机上没有hasp_mastercam x9安装步骤

    大家好,我是时间财富网智能客服时间君,上述问题将由我为大家进行解答. mastercam x9安装步骤是: 1.首先,先下载好mastercam软件,下载安装包的大小为3.01G,双击打开setup. ...

  6. 1-flutter 安装步骤

    flutter 安装步骤 1 下载SDK SDK 下载地址 2 解压压缩包 将sdk 文件夹丢进系统的应用程序(Application)的目录 3 配置环境变量 命令行 open ~/.bash_pr ...

  7. macos big sur安装php扩展_用PHP构建基于swoole扩展的socket服务(附PHP扩展安装步骤)...

    最近公司的一项目中,需要用PHP搭建一个socket服务. 本来PHP是不适合做服务的,因为和第三方合作,需要采用高效而稳定的TCP协议进行数据通信.经过多次尝试,最终选择了开源的PHP扩展:swoo ...

  8. Atom介绍和安装步骤

    Atom是全然基于web技术开发而成的一款编辑器,其底层架构依赖于chromium,google chrome浏览器也是基于此.编辑器的每一个窗体都是本地渲染的web页面,而且其风格与时下流行的sub ...

  9. MAC YII 安装步骤

    MAC YII 安装步骤 1.下载XAMPP for MAC http://www.apachefriends.org/en/xampp-macosx.html 虽然单独安装apache ,mysq, ...

最新文章

  1. java 二分搜索获得大于目标数的第一位_程序员常用查找算法(顺序、二分、插值、分块、斐波那契)...
  2. [2015-11-10]iis远程发布配置
  3. ALV OO的栏位属性
  4. 初中计算机word教案ppt,初中信息技术课件 用Word处理文字.ppt
  5. Raider对F#支持的技术细节
  6. 预期的异常规则和模拟静态方法– JUnit
  7. python3输入输出_Python3 输入和输出
  8. 替换Mac的home brew源
  9. STM32的ADC精度提高方法
  10. 【 2019中国大学生程序设计竞赛(CCPC) - 网络选拔赛】1002.array【主席树】
  11. 影响中国软件开发20人
  12. cad2020打印样式放在哪个文件夹_CAD批量打印、DPF合成(建议收藏)
  13. 软件测试的艺术读书笔记<转>
  14. 使用prewitt算子分割白纸黑字图像(Matlab)
  15. 如何通过服务号开通并认证小程序
  16. vue+element表格 苹果自带浏览器兼容问题
  17. 解决IDEA SSM项目sql文件打开提示No data sources are configured to run this SQL and provide advanced code ass的问题
  18. [渝粤教育] 西南科技大学 公共人力资源管理 在线考试复习资料
  19. 设置WinSCP实时更新目录
  20. 深入Redis数据结构和底层原理

热门文章

  1. VMware 12 Exception 0xc0000005
  2. html表格按照编号排序,JS实现简单表格排序操作示例
  3. Lululemon 的品牌创始故事和消费者洞察
  4. cie规定的标准光源_标准光源概述_相关术语_所需条件-维库电子通
  5. java汉字转拼音pinyin4j-2.5.0.jar用法
  6. 如何使用github
  7. 美团2021校招笔试题 最优二叉树II
  8. mac安装svn的两种方式(使用brew安装svn 和 可视化工具SnailsvnLite)
  9. (一)Anaconda的安装和使用
  10. Java 集合转数组的toArray()和toArray(T[] a)方法通俗易懂