• Ubuntu v14 安装及配置Redmine3.0
  • 由于Redmine是基于Ruby On Rails安装的,所以第一步是安装Ruby On Rails。

    可以百度《Ubuntu Ruby On Rails安装和配置》,下一步是安装数据库。

    Redmine支持的数据库有MySQL、PostgreSQL、Microsoft SQL Server、SQLite3,这里以MySQL为例。

    执行以下命令:

    sudo apt-get install mysql-server mysql-client
    mysql -u root -p
    
    CREATE DATABASE redmine CHARACTER SET utf8;
    CREATE USER 'redmine'@'localhost' IDENTIFIED BY 'my_password';
    GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost';

    其中redmine是用户名,my_password是密码。创建完之后需要下载Redmine的源码:

    hg clone --updaterev 3.0-stable https://bitbucket.org/redmine/redmine-all redmine-3.0
    cp  config/database.yml.example config/database.yml
    production:
      adapter: mysql2
      database: redmine
      host: localhost
      username: redmine
      password: my_password
    gem install bundler
    bundle install
    $ gem sources --remove https://rubygems.org/
    $ gem sources -a https://ruby.taobao.org/
    $ gem sources -l
    *** CURRENT SOURCES ***
    
    https://ruby.taobao.org
    # 请确保只有 ruby.taobao.org
    $ gem install rails


    rake generate_secret_token RAILS_ENV=production rake db:migrate RAILS_ENV=production rake redmine:load_default_data

    下一步需要修改文件权限:

    mkdir -p tmp tmp/pdf public/plugin_assets
    sudo chown -R redmine:redmine files log tmp public/plugin_assets
    sudo chmod -R 755 files log tmp public/plugin_assets
    ruby bin/rails server webrick -e production

    此时如果安装的是Ubuntu桌面版就可以通过浏览器打开http://127.0.0.1:3000来查看Redmine的页面了,如果是服务器版本,可以通过命令w3m来查看:

    w3m http://127.0.0.1:3000

    如果需要在其他机器上查看的话,仅仅是ip+端口号是无法查看的,因为外部访问没有端口权限。

    解决方法可以通过Apache或者nginx服务器配置一个反向代理。

    下面给出一些错误对应的解决方法:

    1. There was an error while trying to write to Gemfile.lock. It is likely that you need to allow write permissions for the file at path: /home/thiago/model/Gemfile.lock

    sudo chown -R $(whoami):$(whoami) myappfolder

    2. No package 'MagickCore' found<br >package="" magickcore="" was="" not="" found="" in="" the="" pkg-config="" search="" path.<br="" >perhaps="" you="" should="" add="" directory="" containing="" `magickcore.pc'

    sudo apt-get install libmagickwand-dev

    3. Installing mysql2 (0.3.11) with native extensions

    sudo apt-get install mysql-client libmysqlclient-dev
     
     


    上一篇Debian8 安装Mysql5.6及简单配置

    下一篇CentOS7安装配置LEMP(Nginx/PHP-FPM 5.6/MySQL 5.5)

    2016 迅捷格言:事在人为 莫道万般皆无奈;境由心造 后退一步万事宽! 有事您说话,小捷很乐意帮助您!