标签:项目管理 redmine linux centos 5.8
原来工程师搭建的Redmine,由于机器坏掉,需要转移。
Redmine 是一个开源的、基于Web的项目管理和缺陷跟踪工具。它用日历和甘特图辅助项目及进度可视化显示。同时它又支持多项目管理。Redmine是一个自由开放 源码软件解决方案,它提供集成的项目管理功能,问题跟踪,并为多个版本控制选项的支持。
安装环境CentOS 5.8 64位。
安装最新稳定版本Redmine-2.4.5[由于不知道原来的版本所以选择版本高一些]。
安装:
1:Redmine建立在Ruby on Rails的框架之上,支持跨平台和多种数据库。
所以需要提前ruby等一些依赖包。
yum -y install curl curl -L get.rvm.io | bash -s stable source /etc/profile.d/rvm.sh rvm install 1.9.3 gem install rdoc gem install rails rvm requirements gem install bundler
2:下载Redmine链接:
http://www.redmine.org/projects/redmine/wiki/Download
放到需要安装的路径:
tar -zxvf redmine-2.4.5.gz ln -s /usr/local/services/redmine-2.4.5 /usr/local/services/redmine 设置软连接为了记录redmine的版本号
3:设置mysql数据库账号和密码:
mysql> create database redmine character set utf8; mysql> grant all privileges on redmine.* to ‘redmine‘@‘localhost‘ identified by ‘123456‘; mysql> grant all privileges on redmine.* to ‘redmine‘@‘127.0.0.1‘ identified by ‘123456‘; mysql> flush privileges;
4:修改redmine的配置:
cd /usr/local/services/redmine/config cp database.yml.example database.yml vi database.yml production: adapter: mysql2 database: redmine host: localhost username: redmine password: "123456" encoding: utf8 development: adapter: mysql2 database: redmine_development host: localhost username: redmine password: "123456" encoding: utf8 test: adapter: mysql2 database: redmine_test host: localhost username: redmine password: "123456" encoding: utf8 cp configuration.yml.example configuration.yml vi configuration.yml # default configuration options for all environments default: # Outgoing emails configuration (see examples above) email_delivery: delivery_method: :smtp smtp_settings: address: 127.0.0.1 port: 25 domain: localhost authentication: :login user_name: "redmine@example.net" password: "redmine" # # production: email_delivery: delivery_method: :smtp smtp_settings: address: 127.0.0.1 port: 25 domain: localhost
5:进行下一步的安装:
cd /usr/local/services/redmine/ bundle install --without development test postgresql sqlite rmagick gem install mysql2 -v ‘0.3.15‘ -- --with-mysql-config=[数据库mysql_config的路径] rake generate_secret_token 如果报错需要执行:bundle update 当然可能还会有报错,但是在报错的最后一行会有提示安装什么软件。
6:建立数据库结构:
RAILS_ENV=production rake db:migrate RAILS_ENV=production rake redmine:load_default_data Select language: ar, az, bg, bs, ca, cs, da, de, el, en, en-GB, es, 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] zh ==================================== mkdir -p tmp tmp/pdf public/plugin_assets chown -R apache:apache files log tmp public/plugin_assets chmod -R 755 files log tmp public/plugin_assets gem install passenger passenger-install-apache2-module
7:可以尝试重启redmine
nohup ruby /usr/local/services/redmine/script/rails server webrick -e production 2&>redmine.log &
8:一些报错:
0):出现下面报错时需要执行 bundle update
[root@user redmine]# rake generate_secret_token Could not find gem ‘rails (= 3.2.17) ruby‘ in the gems available on this machine. Run `bundle install` to install missing gems.
1):bundle update时,根据提示安装软件包即可解决问题。
提示下面显示时为好。
Fetching gem metadata from https://rubygems.org/......... Fetching additional metadata from https://rubygems.org/.. Resolving dependencies... Using rake 10.1.1 Using i18n 0.6.9 Using multi_json 1.10.0 Using activesupport 3.2.17 Using builder 3.0.0 Using activemodel 3.2.17 Using erubis 2.7.0 Using journey 1.0.4 Using rack 1.4.5 Using rack-cache 1.2 Using rack-test 0.6.2 Using hike 1.2.3 Using tilt 1.4.1 Using sprockets 2.2.2 Using actionpack 3.2.17 Using mime-types 1.25.1 Using polyglot 0.3.4 Using treetop 1.4.15 Using mail 2.5.4 Using actionmailer 3.2.17 Using arel 3.0.3 Using tzinfo 0.3.39 Using activerecord 3.2.17 Using activeresource 3.2.17 Using bundler 1.6.2 Using coderay 1.1.0 Using rack-ssl 1.3.4 Using json 1.8.1 Using rdoc 3.12.2 Using thor 0.19.1 Using railties 3.2.17 Using jquery-rails 2.0.3 Using mysql2 0.3.15 Using net-ldap 0.3.1 Using ruby-openid 2.3.0 Using rack-openid 1.4.2 Using rails 3.2.17 Your bundle is updated! Gems in the groups development, test, postgresql, sqlite and rmagick were not installed.
2):redmine启动时报错。
报错原因是3000端口占用,查询方法:
netstat -ntlp | grep 3000
附:
linux环境方面需要补充的是:
1.需要安装httpd;
2.需要安装mysql;
3.需要添加ruby的执行路径;
vim /root/.bash_profile PATH=$PATH:$HOME/bin:/usr/local/ruby/bin source /root/.bash_profile
9:最后可以打开链接访问了,坏的机器还没有运回公司等待迁移中。
本文出自 “在路上” 博客,请务必保留此出处http://jweiang.blog.51cto.com/8059417/1409027
cents 5.8下安装redmine-2.4.5,布布扣,bubuko.com
标签:项目管理 redmine linux centos 5.8
原文地址:http://jweiang.blog.51cto.com/8059417/1409027