1. 安装环境:Centos、mysql、Ruby、Apache、Redmine
    yum update
    yum -y groupinstall "Development Tools"
    yum -y install zip unzip libyaml-devel zlib zlib-devel curl-devel openssl-devel httpd-devel apr-devel apr-util-devel mysql-devel gcc ruby-devel gcc-c++ make postgresql-devel ImageMagick-devel sqlite-devel perl-LDAP mod_perl perl-Digest-SHA ImageMagick-devel ntp apr-devel apr-util-devel mlocate manlibxml2-devel libxslt-devel libffi-devel readline-devel
    yum -y install httpd mysql mysql-server
    service mysqld restart
    mysql_secure_installation
    关闭 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
    开启防火墙的 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 /etc/phpMyAdmin/config.inc.php 
    将 $cfg['Servers'][$i]['auth_type'] = 'cookie' 替换为 $cfg['Servers'][$i]['auth_type'] = 'http';
    安装 RVM
    \curl -L https://get.rvm.io | bash
    source /etc/profile.d/rvm.sh
    安装Ruby
    rvm list known
    rvm install 1.9.3
    rvm use 1.9.3 --default
    ruby -v
    yum -y install rubygems
    gem sources --remove https://rubygems.org/
    gem sources -a https://ruby.taobao.org/
    gem sources -l
    gem install rails
    gem install passenger
    passenger-install-apache2-module
    vi /etc/httpd/conf.d/passenger.conf

    LoadModule passenger_module /usr/local/rvm/gems/ruby-1.9.-p551/gems/passenger-5.0./buildout/apache2/mod_passenger.so
    <IfModule mod_passenger.c>
    PassengerRoot /usr/local/rvm/gems/ruby-1.9.-p551/gems/passenger-5.0.
    PassengerDefaultRuby /usr/local/rvm/gems/ruby-1.9.-p551/wrappers/ruby
    </IfModule>

    passenger.conf Code

    重启 apache 
    设置Mysql
    mysql -user=root -password=root_password_mysql
    create database redmine_db character set utf8;
    create user 'redmine_admin'@'localhost' identified by 'your_new_password';
    grant all privileges on redmine_db.* to 'redmine_admin'@'localhost';
    flush privileges;
    quit;
    给网站目录添加Redmine
    mkdir -p /home/redmine.com/public_html
    mkdir -p /home/redmine.com/logs
    cd /home/redmine.com/public_html
    wget http://www.redmine.org/releases/redmine-2.5.0.tar.gz
    tar xvfz redmine-2.5.0.tar.gz
    mv redmine-2.5.0 redmine
    rm -rf redmine-2.5.0.tar.gz
    cp -r redmine/. /home/redmine.com/public_html
    rm -rf redmine
    添加Redmine虚拟主机文件
    vi /etc/httpd/conf.d/vhost.conf

    <VirtualHost *:>
    ServerAdmin mycheryhr@gmail.com
    ServerName redmine.com
    ServerAlias www.redmine.com *.redmine.com
    DocumentRoot /home/redmine.com/public_html/public/
    ErrorLog /home/redmine.com/logs/error.log
    CustomLog /home/redmine.com/logs/access.log combined
    <Directory "/home/redmine.com/public_html/public/">
    Options Indexes ExecCGI FollowSymLinks
    Order allow,deny
    Allow from all
    AllowOverride all
    </Directory>
    </VirtualHost>

    redmine.conf Code

    修改Redmine数据库连接信息
    cd /home/redmine.com/public_html/config
    cp database.yml.example database.yml
    vi database.yml
    初始化 Rails
    cd /home/redmine.com/public_html
    gem install bundler
    bundle install
    rake generate_secret_token
    建立 Database schema objects,加入預設資料
    RAILS_ENV=production rake db:migrate
    RAILS_ENV=production rake redmine:load_default_data
    chmod -R 777 /home/redmine.com/public_html
    chown -R apache:apache /home/redmine.com/public_html
    激活Activate FCGI
    cd /home/redmine.com/public_html/public
    mkdir plugin_assets
    cp dispatch.fcgi.example dispatch.fcgi
    cp htaccess.fcgi.example .htaccess
    设置Apache and FastCGI
    cd /home/redmine.com/public_html/
    rpm --import https://fedoraproject.org/static/0608B895.txt
    wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
    rpm -ivh epel-release-6-8.noarch.rpm
    yum -y install mod_fcgid
    rm -rf epel-release-6-8.noarch.rpm
    创建文件目录
    mkdir -p /opt/redmine/files
    chown -R apache:apache /opt/redmine
    cd /home/redmine.com/public_html/config
    cp configuration.yml.example configuration.yml
    vi configuration.yml

    添加如下配置:
    attachments_storage_path : /opt/redmine/files

  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 - $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
    status
    ;;
    status)
    status
    ;;
    restart|force-reload)
    stop
    start
    ;;
    *)
    echo "Usage: $0 {start|stop|restart|force-reload|status}"
    exit
    esac

centos install redmine (项目管理工具)的更多相关文章

  1. Redmine 项目管理工具----完全攻略

    摘要: 此篇博客涉及 安装,插件修改,插件安装,代码显示,中文乱码,SVN配置等内容,几乎覆盖所有redmine基本功能. 本机环境: Redmine 版本: 3.2.0 本机环境: win7 64位 ...

  2. Linux下安装项目管理工具Redmine

    http://www.redmine.org.cn/download Linux下安装项目管理工具Redmine1.Ruby安装Ruby on Rails网站推荐使用1.8.7版. 点击(此处)折叠或 ...

  3. 项目管理工具 Redmine 安装试用手记

    原文:项目管理工具 Redmine 安装试用手记 项目管理工具 Redmine 安装试用手记 分类: Redmine2009-06-01 10:12 996人阅读 评论(1) 收藏 举报 项目管理工具 ...

  4. 在项目管理工具Redmine中使用SubVersion进行版本管理

    原文:在项目管理工具Redmine中使用SubVersion进行版本管理 在项目管理工具Redmine中使用SubVersion进行版本管理 分类: Redmine2009-06-01 10:11 5 ...

  5. [原创] debian 9.3 搭建Jira+Confluence+Bitbucket项目管理工具(四) -- 安装bitbucket 5.7.0

    [原创] debian 9.3 搭建Jira+Confluence+Bitbucket项目管理工具(四) -- 安装bitbucket 5.7.0 安装Bitbucket的教程, 网上能找见的不多, ...

  6. [原创] debian 9.3 搭建Jira+Confluence+Bitbucket项目管理工具(一) -- 安装jdk(含jre)及 MySql 5.6.39

    [原创] debian 9.3 搭建Jira+Confluence+Bitbucket项目管理工具(一)  --  安装jdk(含jre)及 MySql 5.6.39 回老家已经有一段时间了, 四五线 ...

  7. linux下一步一步安装禅道项目管理工具

    linux下一步一步安装禅道项目管理工具 因为禅道官网的安装教程实在是太简陋了,所以记录在此. 1.安装apache服务 archlinux下直接 sudo pacman -S apache ubun ...

  8. 15款提高工作效率的 Web 项目管理工具

    在今天的快节奏的商业世界里,能够通过计划.组织.和管理资源池以及评估开发资源的模式来管理一个项目,是一个很艰巨的任务. 有很多现成的项目管理软件来帮助减轻项目管理的负担,并且他们几乎覆盖了所有类型的业 ...

  9. IT项目管理工具总结(转载)

    以前用过一个cs版的忘记叫啥名了,还用个禅道,感觉一般“5. 测试管理: 项目软件缺陷Bug状态跟踪”在公司内部自己测试或者试用期上线后后期维护阶段用的多,有的公司单独做个系统让用户提问题来修改,也是 ...

随机推荐

  1. Python爬虫——用BeautifulSoup、python-docx爬取廖雪峰大大的教程为word文档

    版权声明:本文为博主原创文章,欢迎转载,并请注明出处.联系方式:460356155@qq.com 廖雪峰大大贡献的教程写的不错,写了个爬虫把教程保存为word文件,供大家方便下载学习:http://p ...

  2. Linux系统中常用的命令汇总

    日常开发,上线的服务器系统一般都是Linux系统,所以,熟练的掌握常用的命令操作就尤其的重要了 1) 查看某个服务的运行情况 (例如Redis) ps -ef | grep redis //e-显示程 ...

  3. oracle小记:dba_data_files

    今天给表空间扩展的时候,使用了dba_data_files进行查询.查阅了网上的资料. 该系统系统中含有以下字段 每个字段的含义如下:

  4. Java中的break,continue关于标签的用法(转载)

    Java的控制循环结构中是没有关键字goto的,这种做法有它的好处,它提高了程序流程控制的可读性,但是也有不好的地方,它降低了程序流程控制的灵活性,所以说,“上帝是公平的”.所以,Java为了弥补这方 ...

  5. oracle常用函数案例

    --INSTR函数 SELECT INSTR(' HELLO WORLD','H') FROM DUAL; --LTRIM RTRIM函数 SELECT LTRIM('*HELLO=','*') FR ...

  6. 动态SQL2

    set标签 存放修改方法,我们之前写的更新方法是全字段的更新,或者是指定字段的更新,现在我想实现一个新功能,传入的Employee包含什么字段,数据库就更新相对应的列值: 如果我们啥也不做直接上< ...

  7. java日志框架之logback(一)——logback工程简介

    Logback工程 致力于成为log4j工程的继承者 Logback的架构足够泛型化,故能够应用于许多不同的环境.当前,logback划分为三个组件: logback-core logback-cla ...

  8. csrf补充

    问csrftoken在Django里面是基于什么实现的?------>中间件. 如果是Django表示每次发请求过来的时候,要检验有没有带随机字符串.当在执行视图函数之前,前面还有一道屏障,这个 ...

  9. MVC最全jar包

    <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> & ...

  10. Java 8 函数式接口

    函数式接口(Functional Interface)就是一个有且仅有一个抽象方法,但是可以有多个非抽象方法的接口. 函数式接口可以被隐式转换为 lambda 表达式. Lambda 表达式和方法引用 ...