感谢支持
我们一直在努力

Redmine – 安装随记

不知道同事为什么执着于Redmine,倒是给了一台旧机器让我帮忙安装,记录一下遇到的一些坑,兴许能帮到需要的朋友。 

安装Ruby

windows的话可以直接通过RubyInstaller进行安装。
Linux可以从源码安装。

系统是RedHat,编译之前yum检查一下是否存在依赖项

yum -y install zlib-devel curl-devel openssl-devel httpd-devel apr-devel apr-util-devel mysql-devel

不知道怎么搞的,yum一直提示以下信息:

Error Message:
    Abuse of Service detected for server xxxx
Error Class Code: 49

排查太麻烦,重新装了一次yum。
删除原来的yum

rpm -aq|grep yum|xargs rpm -e --nodeps

相关rpm

wget http://mirrors.163.com/CentOS/6/os/x86_64/Packages/yum-3.2.29-60.el6.centos.noarch.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-30.el6.noarch.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm

安装

rpm -ivh python-iniparse-0.3.1-2.1.el6.noarch.rpm
rpm -ivh yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
rpm -ivh yum-3.2.29-60.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-30.el6.noarch.rpm

找了个可以用的yum源,放到/etc/yum.repos.d/下,执行

yum clean all
yum makecache

再次执行后发现换了个提示

RHN yum command: Unable to read consumer identity Warning and Solution

按以下步骤操作解决问题

修改

  • /etc/yum/pluginconf.d/product-id.conf
  • /etc/yum/pluginconf.d/subscription-manager.conf

把里面的enabled改成0

保存退出并执行

rm -rf /var/cache/yum/*
yum clean all

好了,安装ruby

tar zxvf ruby.tar.gz

cd ruby
./configure
make
make install
ruby -v

export PATH=/usr/local/ruby/bin:$PATH

安装Redmine

下载redmine-2.6.2.tar.gz

tar zxvf redmine-2.6.2.tar.gz
mkdir /var/www/redmine
cd redmine-2.6.2
cp -av redmine-2.6.2/* /var/www/redmine

话说需要配置个数据库,刚好机器上带MySQL,给redmine创建库和用户

create database redmine character set utf8;
create user 'redmine'@'localhost' identified by 'my_password';

grant all privileges on redmine.* to 'redmine'@'localhost' identified by 'my_password';

修改下redmine里的数据库配置,修改名称和配置

cd /var/www/redmine/config
cp database.yml.example database.yml

用bundler搞依赖管理

gem install bundler
cd /var/www/redmine
bundle install

出现以下提示

linking shared-object fiddle.so
/usr/bin/ld: ./libffi-3.2.1/.libs/libffi.a(rawapi.o): relocation RX866432 against `.text’ can not be used when making a shared object; recompile with -fPIC
./libffi-3.2.1/.libs/libffi.a: could not read symbols: Bad value

recompile with -fPIC?
安装libffi-dev可以解决这个问题,参考https://github.com/sstephenson/ruby-build/issues/690#issuecomment-68113987

创建表

rake db:migrate RAILS_ENV="production"

加载默认配置

rake redmine:load_default_data RAILS_ENV="production"

启动

ruby script/rails server webrick -e production -d

 

通过Nginx访问redmine,先不搞passenger什么的。
修改下conf/nginx.conf,保存重启:

upstream redmine {
        server 127.0.0.1:3000;
}

server {
        server_name redmine;
        root /var/www/redmine/public;

        location / {
                try_files $uri @redmine;
        }

        location @redmine {
                proxy_set_header  X-Forwarded-For $remote_addr;
                proxy_pass http://redmine;
        }
}

 

CentOS下安装Redmine并集成Git  http://www.linuxidc.com/Linux/2015-01/111848.htm

最简化的Ubuntu 10.04下Redmine部署方法 http://www.linuxidc.com/Linux/2010-07/27076.htm

Ubuntu 10.04默认安装Redmine注意事项 http://www.linuxidc.com/Linux/2010-07/27075.htm

CentOS 5 下Redmine的安装及配置 http://www.linuxidc.com/Linux/2009-12/23311.htm

Ubuntu 9.10下搭建基于PostgreSQL的Redmine http://www.linuxidc.com/Linux/2009-11/22697.htm

Ubuntu中安装开源项目管理软件Redmine http://www.linuxidc.com/Linux/2008-03/11819.htm

如何将Turnkey Redmine 虚拟机从Redmine 1.0.5 升级到1.2 http://www.linuxidc.com/Linux/2011-09/42882.htm

CentOS5下进行Redmine环境搭建,邮件服务配置,LDAP配置 http://www.linuxidc.com/Linux/2013-04/83619.htm

Redmine 的详细介绍:请点这里
Redmine 的下载地址:请点这里

本文永久更新链接地址:http://www.linuxidc.com/Linux/2015-06/119153.htm

赞(0) 打赏
转载请注明出处:服务器评测 » Redmine – 安装随记
分享到: 更多 (0)

听说打赏我的人,都进福布斯排行榜啦!

支付宝扫一扫打赏

微信扫一扫打赏