CentOS6.2 安裝 Redmine相關教程

來源:互聯網
上載者:User

折騰了一天,終於把Redmine搭建到伺服器上了,本文記錄搭建的過程以及過程中遇到的各種問題。

首先需要安裝Ruby on rails,網上找了好多安裝的說明,這個最好:http://blog.sina.com.cn/s/blog_73d38dbc0100zj7n.html 感謝原作者。

使用該文中的方法成功安裝ruby。下面是ruby的安裝步驟。

1 刪除舊的ruby, yum erase ruby ruby-libs ruby-mode ruby-rdoc ruby-irb ruby-ri ruby-docs

2 wget http://nodejs.org/dist/v0.6.6/node-v0.6.6.tar.gz
wget http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz
wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p0.tar.gz
wget http://www.sqlite.org/sqlite-autoconf-3070900.tar.gz
3 安裝一些基本包
yum install openssl-devel zlib-devel gcc gcc-c++ make autoconf readline-devel curl-devel expat-devel gettext-devel
4 安裝Node
tar -zxf node-v0.6.6.tar.gz
cd node-v0.6.6
./configure
make
make install
5 安裝yaml
tar -zxf yaml-0.1.4.tar.gz
cd yaml-0.1.4
./configure –prefix=/usr/local
make
make install
6 安裝ruby
tar -zxf ruby-1.9.3-p0.tar.gz
cd ruby-1.9.3-p0
./configure –prefix=/usr/local –enable-shared –enable-pthread –disable-install-doc –with-opt-dir=/usr/local/lib
make
make install
7 安裝rails
gem install rails
8
yum install ruby-devel
yum install sqlite-devel
9 安裝sqlite3
tar -zxf sqlite-autoconf-3070900.tar.gz
cd sqlite-autoconf-3070900
./configure
make
make install

Ruby安裝完以後,就需要參照Redmine官網上的安裝步驟一步一步的進行下去,官網上的安裝文檔在這裡:

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

下面我精簡一下

1. 擷取源碼,從下面這個頁面可以下載到redmine的發布版,解壓縮以後CD到redmine源碼的根目錄

http://rubyforge.org/frs/?group_id=1850

2. 然後是mysql的配置(如果使用其他資料庫,可參照官網安裝說明)

如果沒有安裝mysql,可以使用

yum install mysql

yum install mysql-server

yum install mysql-devel

安裝,然後啟動mysql服務,然後設定root密碼

service mysqld start

mysql

SET PASSWORD FOR ‘root’@'localhost’ = PASSWORD(‘secret_password’);

mysql需要的配置如下(建立一個資料庫和使用者)

CREATE DATABASE redmine CHARACTER SET utf8;CREATE USER 'redmine'@'localhost' IDENTIFIED BY 'my_password';GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost';

3. 將config/database.yml.example拷貝為config/database.yml並編輯其中的production部分。ruby1.9+的話使用如下配置:

production:  adapter: mysql2  database: redmine  host: localhost  username: redmine  password: my_password

4. 在redmine根目錄下依次執行以下命令:

gem install bundlerbundle install --without development testrake generate_secret_tokenRAILS_ENV=production rake db:migrateRAILS_ENV=production REDMINE_LANG=zh rake redmine:load_default_data

需要注意的地方:

在執行第二條命令的時候會有一些錯誤,我安裝的時候碰見兩個

一個是mysql.h missing,這個是因為我沒有install mysql-devel這個包,直接yum install一下即可。

另一個是Can’t install RMagick 2.13.1.需要安裝一個庫:yum install ImageMagick-devel

最後一條命令中REDMINE_LANG=zh是設定語言,我這裡設定為中文。

5. 啟動

ruby script/rails server webrick -e production

使用該命令啟動以後,redmine的訪問地址為:http://localhost:30

如果需要其他機器訪問,需要將連接埠3000設為防火牆的例外連接埠,訪問地址是http://IP:3000

超級管理員的使用者名稱密碼為:admin/admin


聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.