生きてます
死んでました。(仕事疲れ)
無事就職したはいいものの、家帰ってもなにかやる気力がないです。
コレはやばいと思いまして、ちょっとずつでもいいからなにかやることにしました。
初回はRedmine導入です。
参考サイト:
Redmine 2.6をCentOS 7.0にインストールする手順 | Redmine.JP Blog
今回はWebサーバ(apache)とMySQLとRubyは導入済みとします。
getenforce
でseLinuxが動いてないことを確認。
Redmineを適当に落としてくる
svn co https://svn.redmine.org/redmine/branches/3.1-stable redmine-3.1
適当な場所に置く
mv redmine-3.1 /var/www/redmine
データベースの設定をする(config/database.yml)
production: adapter: mysql2 database: {使うデータベース} host: {データベースのアドレス(localhost)} username: {データベースいじるユーザ} password: {ユーザパスワード(ダブルクォーテーションを忘れずに)} encoding: utf8
設定ファイルを書く(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
Redmineのルートディレクトリで実行
bundle install --without development test --path vendor/bundle bundle exec rake generate_secret_token RAILS_ENV=production bundle exec rake db:migrate
Passengerなるものをいれる
gem install passenger --no-rdoc --no-ri
apacheに適応する
passenger-install-apache2-module
適当に他に設定するものも指定してくるので指定する
コレ出てきたら
The Apache 2 module was successfully installed. Please edit your Apache configuration file, and add these lines: LoadModule passenger_module /usr/local/lib/ruby/gems/2.1.0/gems/passenger-4.0.53/buildout/apache2/mod_passenger.so <IfModule mod_passenger.c> PassengerRoot /usr/local/lib/ruby/gems/2.1.0/gems/passenger-4.0.53 PassengerDefaultRuby /usr/local/bin/ruby </IfModule> After you restart Apache, you are ready to deploy any number of Ruby on Rails applications on Apache, without any further Ruby on Rails-specific configuration! Press ENTER to continue.
LoadModuleからまでをhttpd.confにいれる(場所はうまいところに)
この時ENTERを押さないこと。(別ウィンドウでhttp.confに書き込む)
apache再起動
service httpd restart
あとはVirtualHostなりなんなりでpublicフォルダが開かれるように設定する
開いたら
ログイン
↓
User:admin
Pass:admin
でログイン
↓
ユーザをいろいろ設定して終わり