码迷,mamicode.com
首页 > 其他好文 > 详细

centos install redmine (项目管理工具)

时间:2015-06-12 17:04:40      阅读:194      评论:0      收藏:0      [点我收藏+]

标签:

  1. 安装环境:Centos、mysql、Ruby、Apache、Redmine

    yum update

    yum -y groupinstall "Development Tools"

    yum -y install ntp zlib zlib-devel sqlite-devel httpd mysql-server mysql-devel curl curl-devel httpd-devel apr-devel apr-util-devel mlocate manlibxml2-devel libxslt-devel libffi-devel readline-devel

    yum install -y ruby ruby-devel

    yum install -y rubygems

    yum install –y ImageMagick-devel

    关闭selinux

    setenforce 0

    sed -i "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config

    sed -i "s/SELINUXTYPE=targeted/#SELINUXTYPE=targeted/g" /etc/selinux/config

    安装RVM

    \curl -L https://get.rvm.io | bash
    source /etc/profile.d/rvm.sh

    开启防火墙的80、443端口,并重启防火墙
    vi /etc/sysconfig/iptables
    安装php、phpMyAdmin
    yum -y install php php-mysql php-gd php-imap php-ldap php-mbstring php-odbc php-pear php-xml php-xmlrpc php-pecl-apc php-soap
    rpm -ivh http://ftp.jaist.ac.jp/pub/Linux/Fedora/epel/6/i386/epel-release-6-8.noarch.rpm
    yum -y install phpmyadmin

    vi /etc/httpd/conf.d/phpmyadmin.conf
    将 "Allow from 127.0.0.1" 替换为 "Allow from all"
    vi /usr/share/phpmyadmin/config.inc.php
    将 $cfg[‘Servers‘][$i][‘auth_type‘] = ‘cookie‘ 替换为 $cfg[‘Servers‘][$i][‘auth_type‘] = ‘http‘;

  2. 建议参考的安装文档

    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

  3. 遇到过的问题,建议参考下面的几个解决方法

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

  4. 迁移方法

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

  5. 技巧

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

      ProxyPass / http://localhost:3000/

      ProxyPassReverse / http://localhost:3000/

    B、发送邮件

    http://blog.csdn.net/maktub_haixue/article/details/39394111

    C、开机启动及脚本

    http://www.vipzhicheng.com/blog/2014/04/09/install-redmine-on-centos/

  6. 技术分享
    #!/bin/bash
    # Modify it to your configuration
    DIR=/var/www/html/redmine/
     
    # Start Redmine in daemon mode.
    start(){
      cd $DIR
      ruby script/rails server -d -e production
    }
    # Stop Redmine daemon
    stop(){
      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 running
    status(){
      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 1
    esac
    View Code

centos install redmine (项目管理工具)

标签:

原文地址:http://www.cnblogs.com/Mrhuangrui/p/4571703.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!