Redmine是一個開源的、基於Web的項目管理和缺陷跟蹤工具。它用日曆和甘特圖輔助項目及進度可視化顯示。同時它又支持多項目管理。Redmine是一個自由開放源碼軟件解決方案,它提供集成的項目管理功能,問題跟蹤,併爲多個版本控制選項的支持。雖然說像IBM Rational Team Concert的商業項目調查工具已經很強大了,但想堅持一個自由和開放源碼的解決方案,可能會發現Redmine是一個有用的Scrum和敏捷的選擇。 因爲Redmine的設計受到Rrac的較大影響,因此它們的軟件包有不少類似的特徵。Redmine創建在Ruby on Rails的框架之上,它能夠誇平臺和數據庫。html
Redmine version | Supported Ruby versions | Rails version used |
---|---|---|
3.3, current trunk | ruby 1.9.3, 2.0.0, 2.1, 2.2, 2.3 | Rails 4.2 |
3.2, 3.1 | ruby 1.9.3, 2.0.0, 2.1, 2.2 | Rails 4.2 |
yum install zlib-devel openssl-devel ImageMagick-devel wget curl-devel rubygems mod_fcgid
# gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 gpg: requesting key D39DC0E3 from hkp server keys.gnupg.net gpg: /root/.gnupg/trustdb.gpg: trustdb created gpg: key D39DC0E3: public key "Michal Papis (RVM signing) <mpapis@gmail.com>" imported gpg: no ultimately trusted keys found gpg: Total number processed: 1 gpg: imported: 1 (RSA: 1) # curl -sSL https://get.rvm.io | bash -s stable ... # Administrator, # # Thank you for using RVM! # We sincerely hope that RVM helps to make your life easier and more enjoyable!!! # # ~Wayne, Michal & team. In case of problems: https://rvm.io/help and https://twitter.com/rvm_io
# source /etc/profile.d/rvm.sh # rvm requirements
# sed -i -E 's!https?://cache.ruby-lang.org/pub/ruby!https://ruby.taobao.org/mirrors/ruby!' /usr/local/rvm/config/db # rvm gemset create # rvm install 2.2.3 # rvm use 2.2.3 --default
安裝時有可能會遇到下面的錯誤:mysql
[root@db-02 ~]# rvm install 2.2.3 Already installed ruby-2.2.3. To reinstall use: rvm reinstall ruby-2.2.3 Gemset '' does not exist, 'rvm ruby-2.2.3 do rvm gemset create ' first, or append '--create'.
按照提示咱們能夠從新安裝或者使用:web
# rvm install 2.2.3 --create
因爲國內網絡緣由(你懂的),致使rubygems.org存放 Amazon S3上面的資源文件間歇性鏈接失敗。因此你會與遇到gem install rack或bundle install的時候半天沒有響應,具體能夠用gem install rails -V來查看執行過程。下面替換成淘寶的GEM鏡像站:sql
# gem sources -l *** CURRENT SOURCES *** https://rubygems.org/ # gem sources --remove https://rubygems.org/ https://rubygems.org/ removed from sources # gem sources -a https://ruby.taobao.org/ https://ruby.taobao.org/ added to sources # gem sources -l *** CURRENT SOURCES *** https://ruby.taobao.org/
安裝rails 4.2數據庫
# gem install rails -v=4.2
# yum install httpd httpd-devel -y # yum install -y mysql*
mysql> create database redmine character set utf8; mysql> create user 'redmine'@'localhost' identified by 'redmine'; mysql> grant all privileges on redmine.* to 'redmine'@'localhost';
# gem install passenger # passenger-install-apache2-module # vim /etc/httpd/conf.d/passenger.conf LoadModule passenger_module /usr/local/rvm/gems/ruby-2.2.3/gems/passenger-5.0.30/buildout/apache2/mod_passenger.so <IfModule mod_passenger.c> PassengerRoot /usr/local/rvm/gems/ruby-2.2.3/gems/passenger-5.0.30 PassengerDefaultRuby /usr/local/rvm/gems/ruby-2.2.3/wrappers/ruby </IfModule> # vim /etc/httpd/conf.d/redmine.conf <VirtualHost *:80> ServerName www.a.com # !!! Be sure to point DocumentRoot to 'public'! DocumentRoot /var/www/html/redmine/public ErrorLog logs/redmine_error_log <Directory /var/www/html/redmine/public> Options Indexes ExecCGI FollowSymLinks Order allow,deny Allow from all # This relaxes Apache security settings. AllowOverride all # MultiViews must be turned off. Options -MultiViews # Uncomment this if you're on Apache >= 2.4: #Require all granted </Directory> </VirtualHost>
# cd /var/www/html # wget http://www.redmine.org/releases/redmine-3.1.1.tar.gz # tar -zxvf redmine-3.1.1.tar.gz # mv redmine-3.1.1 redmine # cd /var/www/html/redmine/ # vim Gemfile #source 'https://rubygems.org' source'https://ruby.taobao.org' # cp config/configuration.yml.example config/configuration.yml # cp config/database.yml.example config/database.yml production: adapter: mysql2 database: redmine host: localhost username: redmine password: "redmine" encoding: utf8
下面安裝很容易報錯,若是報錯請嘗試從新安裝。vim
# gem install bundler #注意是在網站根目錄下執行 # bundle install
# rake generate_secret_token
# RAILS_ENV=production rake db:migrate # RAILS_ENV=production rake redmine:load_default_data
# cd /var/www/html/redmine/public/ # cp dispatch.fcgi.example dispatch.fcgi # cp htaccess.fcgi.example .htaccess
以上操做之後就能夠在瀏覽器中輸入www.a.com進行範圍redmine,可是請提早作好域名的解析,若是不想作域名解析可使用IP進行配置訪問,具體IP訪問配置這裏就不作介紹了,
若是安裝錯誤能夠測試看redmine的問題仍是httpd的問題。
# bundle exec rails server webrick -e production -b 0.0.0.0
地址:http://IP:3000 (注意:打開iptables 3000端口號) 缺省管理員用戶: login: admin password: admin