项目管理软件 Redmine 安装

来源:互联网 发布:知行论坛pt 编辑:程序博客网 时间:2024/04/27 14:27

1、配置安装环境,安装所依赖的软件。

必备软件:Centos、mysql、Ruby、Apache、Redmine。

yuyum updateyum -y groupinstall "Development Tools"yum -y install ntp zlib zlib-devel sqlite-devel httpd mysql-server mysql-devel curl-devel httpd-devel apr-devel apr-util-devel mlocate manlibxml2-devel libxslt-devel libffi-devel readline-develyum install -y ruby ruby-develyum install -y rubygemsyum install –y ImageMagick-devel
禁用selinux

setenforce 0sed -i "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/configsed -i "s/SELINUXTYPE=targeted/#SELINUXTYPE=targeted/g" /etc/selinux/config

2、安装RVM

安装方法:https://rvm.io/rvm/install

3、参考安装教程

http://www.redmine.org/projects/redmine/wiki/Install_Redmine_25x_on_Centos_65_complete

http://blog.csdn.net/win_lin/article/details/8514333

http://blog.tonycube.com/2013/11/redmine-centos-apache-ruby-on-rails.html

4、遇到的问题及解决方法

http://stackoverflow.com/questions/5201689/rmagick-gem-install-cant-find-magick-config

http://zorro.blog.51cto.com/2139862/893944 

http://stackoverflow.com/questions/22571206/netbeans-and-rails-error-bin-ruby-no-such-file-or-directory-script-rails-l

5、RedMine 迁移方法

https://ruby-china.org/topics/8340

6、技巧

A、默认需要加上端口3000才可以访问,解决方法在vhost.conf中添加:

 ProxyPass / http://localhost:3000/

 ProxyPassReverse / http://localhost:3000/

参考文档:

http://xuplus.com/article/2011/01/a221.html

B、发送邮件技巧
只要配置configuration.yml就行了

default:

   # Outgoing emails configuration (see examples above)

      email_delivery:

      delivery_method: :smtp

      smtp_settings:

      address: smtp.qq.com

      port: 25

      domain: qq.com

      authentication: :login

      user_name: "邮箱帐号"

      password: "邮箱密码"

你的username是xx@163.com,那么password是你的163邮箱密码,address是smtp.163.com,domain 是163.com,

如果是xx@qq.com,那么password是你的qq邮箱密码,address是smtp.163.com,domain是163.com

C、修改主机名

若在第三步收到了邮件,则会发现邮件中会有这样的内容:

Redmine URL:http://localhost:3000/redmine/

这个显然是不对的...我们要的是正确的域名或是IP。

修改方法:管理->配置->一般->主机名称

D、开机启动及脚本

此处参考:http://www.vipzhicheng.com/blog/2014/04/09/install-redmine-on-centos/
#!/bin/bash# Modify it to your configurationDIR=/var/www/html/redmine/# Start Redmine in daemon mode.start(){  cd $DIR  ruby script/rails server -d -e production}# Stop Redmine daemonstop(){  RUBYPID=`ps aux | grep "ruby script/rails" | grep -v grep | awk '{print $2}'`  if [ "x$RUBYPID" != "x" ]; then    kill -2 $RUBYPID  fi}# Check if Redmine is runningstatus(){  RUBYPID=`ps aux | grep "ruby script/rails" | grep -v grep | awk '{print $2}'`  if [ "x$RUBYPID" = "x" ]; then    echo "* Redmine is not running"  else    echo "* Redmine is running"  fi} case "$1" in  start)    start    status    ;;  stop)    stop    sleep 2    status    ;;  status)    status    ;;  restart|force-reload)    stop    start    ;;  *)    echo "Usage: $0 {start|stop|restart|force-reload|status}"    exit 1esac



0 0
原创粉丝点击