环境:CentOS 6.6

Ruby Version 1.9.3p448

rails Version 4.2.5

Mysql Version 5.5


前提:完成Ruby on Rails搭建

安装:

[[email protected] ~]# yum -y install mysql-devel
[[email protected] ~]# netstat -tunlp|grep 3306
tcp        0      0 0.0.0.0:3306                0.0.0.0:*                   LISTEN      1446/mysqld 
[[email protected] ~]#


安装Redmine所需要的环境:

[[email protected]CentOS ~]# 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 php php-mysql php-gd php-imap php-ldap php-mbstring php-odbc php-pear php-xml php-xmlrpc php-pecl-apc php-soap readline-devel libffi-devel
[[email protected] software]# tar -zxvf redmine-3.0.5.tar.gz -C /usr/local/
[[email protected] software]# cd /usr/local/redmine-3.0.5/
[[email protected] software]# chown redmine:redmine /usr/local/redmine-3.0.5/ -R
[[email protected] ~]# cd /usr/local/redmine-3.0.5/config
[[email protected] config]# cp database.yml.example database.yml
[[email protected] config]# head -n 11 database.yml|tail -n 7
production:
  adapter: mysql2
  database: redmine
  host: 172.24.17.120
  username: redmineuser
  password: "redminepass"
  encoding: utf8
[[email protected] config]# cp configuration.yml.example configuration.yml
[[email protected] config]# head -n 24 configuration.yml|tail
production:
  email_delivery:
  delivery_method: :async_smtp
  async_smtp_settings:
  address: 172.24.17.120
  port: 25
  domain: 172.24.17.120
  authentication: :login
  user_name: [email protected]
  password: redminepass
[[email protected] config]# cd ..
[[email protected] redmine-3.0.5]# head -1 Gemfile
source 'https://ruby.taobao.org/'
[[email protected] redmine-3.0.5]#
[[email protected] redmine-3.0.5]# yum -y install ImageMagick* rubygems* ruby-RMagick*
[[email protected] redmine-3.0.5]# gem install rmagick
[[email protected] redmine-3.0.5]# bundle install -V
[[email protected] redmine-3.0.5]# bundle exec rake generate_secret_token
[[email protected] redmine-3.0.5]# RAILS_ENV=production bundle exec rake db:migrate
[[email protected] redmine-3.0.5]# RAILS_ENV=production bundle exec rake redmine:load_default_data
Select language: ar, az, bg, bs, ca, cs, da, de, el, en, en-GB, es, es-PA, et, eu, fa, fi, fr, gl, he, hr, hu, id, it, ja, ko, lt, lv, mk, mn, nl, no, pl, pt, pt-BR, ro, ru, sk, sl, sq, sr, sr-YU, sv, th, tr, uk, vi, zh, zh-TW [en] zh
====================================
Default configuration data loaded.
[[email protected] redmine-3.0.5]#
[[email protected] redmine-3.0.5]# cd public/
[[email protected] public]# cd ..
[[email protected] redmine-3.0.5]# chown -R redmine:redmine *
[[email protected] redmine-3.0.5]# chmod -R 755 files log tmp public/plugin_asset
[[email protected] redmine-3.0.5]# bundle exec rails server -b 172.24.17.120 webrick -e production -d
=> Booting WEBrick
=> Rails 4.2.3 application starting in production on http://172.24.17.120:3000
=> Run `rails server -h` for more startup options
[[email protected] redmine-3.0.5]# netstat -tunlp|grep 3000
tcp        0      0 172.24.17.120:3000          0.0.0.0:*                   LISTEN      3935/ruby           
[[email protected] redmine-3.0.5]#
[[email protected] software]# tar -zxvf nginx-1.7.11.tar.gz
[[email protected] software]# useradd -s /sbin/nologin nginx
[[email protected] software]# gem install passenger -V
[[email protected] software]# passenger-install-nginx-module
[[email protected] ~]# chown nginx:nginx /usr/local/nginx/ -R
[[email protected] ~]# head -1 /usr/local/nginx/conf/nginx.conf
user  nginx nginx;
[[email protected] ~]#
[[email protected] ~]# /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
[[email protected] ~]# /etc/init.d/redmined start
=> Booting WEBrick
=> Rails 4.2.3 application starting in production on http://172.24.17.120:3000
=> Run `rails server -h` for more startup options
Starting redmine... [ OK ]
[[email protected] ~]#
[[email protected] ~]# netstat -tunlp|grep 3000
tcp        0      0 172.24.17.120:3000          0.0.0.0:*                   LISTEN      25679/ruby 
[[email protected] ~]#

全源码编译搭建Redmine

全源码编译搭建Redmine

[[email protected] ~]# chkconfig --add redmined
[[email protected] ~]# chkconfig redmined on