LoginSignup
16
14

More than 5 years have passed since last update.

EC2にAlminumを入れる。

Last updated at Posted at 2014-05-02

ALMiniumで超簡単ってきいてたけどめんどくさかったのでメモ

構築手順

初期設定

  • ec2でインスタンス作るところは端折る。
    「Amazon Linux AMI」で作成しています。
    インスタンスタイプとかストレージはお好きに。
  • ec2-userでログインしてrootに
    
    # sudo su -
    
  • yumを最新に
    
    # yum update -y
    # yum upgrade -y
    
  • 時刻設定 LANGを"ja_JP.UTF-8に変更
    
    # cp /usr/share/zoneinfo/Japan /etc/localtime
    # vi /etc/sysconfig/i18n
    
  • sshdの設定修正 「PermitRootLogin no」 に編集してreload。
    
    # vi /etc/ssh/sshd_config
    # /etc/init.d/sshd reload
    
  • git/redisのインストール
    
    # yum install -y git
    # yum install -y \ gcc-c++ \ git-core \ libffi-devel \ libicu-devel \ libxml2-devel \ libxslt-devel libyaml-devel \ make \ mysql \ mysql-devel \ patch \ perl-Time-HiRes \ postfix \ readlineevel \ zlib-devel 
    # yum install -y libxml2 libxml2-devel libxslt libxslt-devel libicu libicu-devel
    # yum install -y redis --enablerepo=epel
    
  • ruby2.0をインストール(2でないと失敗する)
    
    # yum remove -y ruby
    # bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
    # rvm install ruby 2.0.0
    
  • これでruby-2.0.0-p247がインストールされた。 # 一応下記も入れておく。
    
    # gem install bundler --no-ri --no-rdoc
    # gem install charlock_holmes --version '0.6.9.4'
    

ALMiniumのインストール

  • ダウンロード
    
    # cd /usr/local/src
    # git clone https://github.com/alminium/alminium.git
    
  • インストール実行
    
    # cd alminium
    # source ./smelt
    
    いろいろ聞かれるけどお好みで。
    HostName入れるところはGIPをとりあえず入れとく事を推奨。 Jenkinsは別で立てた方が良いし、あとでモメるぽいのでスルー推奨。
  • サーバーリブート
    
    # reboot
    

Redmine設定

  • 設定を編集(上3行のみ)
    
    # vi /etc/httpd/conf.d/redmine.conf
    【細かいversionとか変わる可能性大】
    LoadModule passenger_module /usr/local/rvm/gems/ruby-2.0.0-p451/gems/passenger-4.0.40/buildout/apache2/mod_passenger.so
    PassengerRoot /usr/local/rvm/gems/ruby-2.0.0-p451/gems/passenger-4.0.40
    PassengerRuby /usr/bin/ruby
    
  • Ruby設定
    /usr/bin/ruby がいないので
    
    # ln -s  /usr/local/rvm/rubies/ruby-2.0.0-p451/bin/ruby /usr/bin/ruby
    
  • httpd再起動
    
    # service httpd restart
    
  • リブート時の自動起動
    
    # chkconfig httpd on
    

MySQL設定

  • /etc/my.cnf の[mysqld]に以下をついか
    
    max_allowed_packet=10M
    
  • MySQL再起動
    
    # service mysqld restart
    

確認

  • urlにアクセス
    
    http://[IPADDRESS]/
    

おわり

※ 参考: http://www.dosancole.com/environment/2013/10/27/alminium-ec2/

16
14
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
16
14