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学习第十八篇——低耦合函数设计思想

    import json 2 def greet_user(filename): 3 try: 4 with open(filename) as f_obj: 5 username = json.loa ...

  2. WinRAR从入门到高级的操作技巧集合

    一.基础技巧 1.批量建立文件夹 如果在工作中,经常要建立很多相同文件夹结构(如在备份数据时).那可以把这个繁琐的工作让WinRAR完成:先在“资源管理器”中把多个文件夹结构建好(包括其下的子文件夹) ...

  3. iOS蓝牙开发之iBeacon技术

    iBeacon组成信息: 1 .UUID(universally unique identifier):一个128位的唯一标识一个或多个Beacon基站为特定类型或特定的组织. 2. Major:一个 ...

  4. 几个jdbc小技巧

    版本:jdk:1.6mysql-connector-5.0.8 1.如何用jdbc判断某个基本表是否存在 一种比较“笨”的方法:    try{         stmt.executeQuery( ...

  5. CI框架在控制器中切换读写库和读写库

    CodeIgniter框架版本:3.1.7 ,php版本:5.6.* ,mysql版本:5.6 在Ci框架中,可以在application/config/database.php中配置多个group, ...

  6. 简要了解 MySql 5.5/5.6/5.7/8 出现的新特性

    MySQL的开发周期 在比较之前,首先提一下MySQL的开发周期. MySQL一个大版本的开发,大致经历如下几个阶段: Feature Development Feature Testing Perf ...

  7. MySQL的SQL语句优化-group by语句的优化

    原文:http://bbs.landingbj.com/t-0-243202-1.html 默认情况下,MySQL排序所有GROUP BY col1, col2, ....,查询的方法如同在查询中指定 ...

  8. MySQL 查询语句中自己定义的中文内容在Java Web 中显示为问号

    Java Web 端做查询时,性别字段存的是数字,1代表男,2代表女,取数据时将性别转为汉字显示在页面,sql语句如下,结果发生了问题  select a.emp_id,a.emp_name ,cas ...

  9. java学习之—链表(3)

    /** * 使用链表实现队列 * Create by Administrator * 2018/6/19 0019 * 下午 4:37 **/ public class Link { public l ...

  10. redis 中主从、哨兵和集群分片模式这三个有什么区别 ?

    集群分片 比如 5主5从,也就是说 数据过来之后会均匀的分配到5台服务器上面,5台服务器上面的数据是不同的,但是每个服务器都有一个从服务器,上面的数据跟这一台主服务器的数据是一样的: 也就是说,对于这 ...