Hello World from OSS Silicon Valley


HowToUse/Redmine/2.5


_ Prerequisite

  • Cent OS installation (You can refer HowToUse/CentOS/6.5)
  • MySQL instllation (You can refer HowToUse/MySQL)
  • Apache instllation (You can refer HowToUse/Apache)
  • Subversion instllation (You can refer HowToUse/Subversion)
  • RVM instllation
  • Ruby instllation

_ Install&Setup

Step.1
Install the necessary packages
# yum groupinstall "Development Tools"
# yum install openssl-devel readline-devel zlib-devel curl-devel libyaml-devel
# yum install mysql-server mysql-devel
# yum install httpd httpd-devel
# yum install ImageMagick ImageMagick-devel ipa-pgothic-fonts
Step.2
Install Ruby
# rvm install 2.1.3
Step.3
Install Bundler
# gem install bundler --no-rdoc --no-ri
Step.4
Configure mySQL
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0

character-set-server=utf8

# 任意設定
innodb_file_per_table
query-cache-size=16M

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

[mysql]
default-character-set=utf8
Step.5
Launch mySQL
# /etc/rc.d/init.d/mysqld start

]Step.6|Create DB and DB user for Redmine

# mysql -uroot -p
mysql> create database db_redmine default character set utf8;
mysql> grant all on db_redmine.* to user_redmine@localhost identified by '********';
mysql> flush privileges;
mysql> exit;
Step.7
Download installer.
# curl -O http://www.redmine.org/releases/redmine-2.5.0.tar.gz
# tar xzvf redmine-2.5.0.tar.gz
# mv redmine-2.5.0 /var/lib/redmine
Step.8
Configure DB connection.
# vi config/database.yml
production:
  adapter: mysql2
  database: db_redmine
  host: localhost
  username: user_redmine
  password: ********
  encoding: utf8
Step.9
Configure Mail Server connection.
# vi config/configuration.yml 
production:
  email_delivery:
    delivery_method: :smtp
    smtp_settings:
      address: "localhost"
      port: 25
      domain: 'example.com' 

  rmagick_font_path: /usr/share/fonts/ipa-pgothic/ipagp.ttf
Step.10
Install bundle
# bundle install 
Step.11
Initial DB migration.
# bundle exec rake generate_secret_token
# RAILS_ENV=production bundle exec rake db:migrate
Step.11
Install passenger
# gem install passenger --no-rdoc --no-ri
# passenger-install-apache2-module
Step.12
Configure Apache server.
# vi /etc/httpd/conf.d/passenger.conf 
LoadModule passenger_module /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.17/ext/apache2/mod_passenger.so
PassengerRoot /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.17
PassengerRuby /usr/local/bin/ruby
Step.13
Restart apache server.
# /etc/rc.d/init.d/httpd restart
Step.14
# chown -R apache:apache /var/lib/redmine
Step.15

(Pattern.1)

DocumentRoot "/var/lib/redmine/public"
# /etc/rc.d/init.d/httpd restart

(Pattern.2)

ln -s /var/lib/redmine/public /var/www/html/redmine
RackBaseURI /redmine
# /etc/rc.d/init.d/httpd restart

(Pattern.3)

_ HowToUse

Step.1
xxx

_ Author

S.Yatsuzuka