EC2でredmine
http://blog.redmine.jp/articles/2_5/installation_centos/
yum -y install ImageMagick ImageMagick-devel
yum -y install openssl-devel readline-devel zlib-devel curl-devel libyaml-devel
http://ipafont.ipa.go.jp/ipafont/download.html
wget http://dl.ipafont.ipa.go.jp/IPAfont/IPAfont00303.zip
unzip IPAfont00303.zip
mv IPAfont00303 /usr/share/fonts/
rm -f IPAfont00303.zip
wget http://cache.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p451.tar.gz
tar zxvf ruby-2.0.0-p451.tar.gz
cd ruby-2.0.0-p451
./configure --prefix=/usr/local/ruby-2.0.0-p451
make
make install
ln -s /usr/local/ruby-2.0.0-p451//usr/local/ruby
vi /etc/bashrc
export RUBY_HOME=/usr/local/ruby
export PATH=$RUBY_HOME/bin:$PATH
ruby -v
vi /usr/local/mysql/my.cnf
[mysqld]
character_set_server=utf8
default_storage_engine=InnoDB
[mysql]
default_character_set=utf8
serivce mysqld restart
mysql
create database redmine default character set utf8;
grant all on redmine.* to redmine identified by "redmine";
flush privileges;
cd ../
wget http://www.redmine.org/releases/redmine-2.5.1.tar.gz
tar xvzf redmine-2.5.1.tar.gz
mv redmine-2.5.1 /usr/local/redmine-2.5.1
cd /usr/local/redmine-2.5.1/
vi config/database.yml
production:
adapter: mysql2
database: redmine
host: localhost
username: redmine
password: redmine
encoding: utf8
vi config/configuration.yml
production:
email_delivery:
delivery_method: :smtp
smtp_settings:
address: "localhost"
port: 25
domain: 'XXXXXX'
rmagick_font_path: /usr/share/fonts/IPAfont00303/ipagp.ttf
gem install bundler --no-rdoc --no-ri
bundle install --without development test
bundle exec rake generate_secret_token
RAILS_ENV=production bundle exec rake db:migrate
ruby /usr/local/redmine-2.5.1/script/rails server webrick -e production
gem install passenger --no-rdoc --no-ri
export APXS2=/usr/local/apache-httpd/bin/apxs
which apxs
(/usr/local/postfix/bin:/usr/local/php/bin:/usr/local/mysql/bin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/aws/bin)
export PATH=$PATH:/usr/local/apache-httpd-2.4.7/bin
passenger-install-apache2-module
vi /usr/local/apache-httpd/conf/httpd.conf
LoadModule passenger_module /usr/local/ruby-2.0.0-p451/lib/ruby/gems/2.0.0/gems/passenger-4.0.41/buildout/apache2/mod_passenger.so
<IfModule mod_passenger.c>
Listen 1111
<VirtualHost *:1111>
DocumentRoot /usr/local/redmine-2.5.1/public
PassengerRoot /usr/local/ruby-2.0.0-p451/lib/ruby/gems/2.0.0/gems/passenger-4.0.41
PassengerDefaultRuby /usr/local/ruby-2.0.0-p451/bin/ruby
<Directory /usr/local/redmine-2.5.1/public>
AllowOverride all
Options -MultiViews
Require all granted
</Directory>
</VirtualHost>
</IfModule>
chown -R apache:apache /usr/local/redmine-2.5.1
service httpd restart
ruby script/rails server webrick -e production