さくらVPSにRedmine3.0をインストールしました
こんにちは!くまかけです。
Redmine3.0をインストールしました。。
Redmine用にVirtualホストを定義したんでソコにインストールします。
DocumentRoot -> /opt/www/www.example.com/public_html/redmine/public
■bundleをインストールします
# gem install bundle
# gem list bundle
*** LOCAL GEMS ***
bundle (0.0.1)
bundler (1.8.5)
■Redmain3.0をインストールします。
/opt/www/www.example.com/public_html配下にインストールします。
# cd /opt/www/www.example.com/public_html
# wget http://www.redmine.org/releases/redmine-3.0.1.tar.gz
# tar xvzf redmine-3.0.1.tar.gz
※ディレクトリ名称をredmine-3.0.1⇒redmineに変更しました。
■設定ファイルを編集します
config/database.yml
1 2 3 4 5 6 7 |
production: adapter: mysql2 database: redmine host: localhost username: admin password: passwd encoding: utf8 |
config/configuration.yml
1 2 3 4 5 6 7 8 |
production: email_delivery: delivery_method: :smtp smtp_settings: address: "localhost" port: 25 domain: 'example.com' rmagick_font_path: /usr/share/fonts/ipa-mincho/ipam.ttf |
■各種ツールをインストールします
# bundle install –without development test
1 2 3 4 5 6 7 8 |
Gem::Ext::BuildError: ERROR: Failed to build gem native extension. ----- Using mysql_config at /usr/bin/mysql_config ----- checking for mysql.h... no checking for mysql/mysql.h... no ----- mysql.h is missing. please check your installation of mysql and try again. |
mysql.hが無いんで、ダメってメッセージ。。
# yum install mysql-community-devel.x86_64
1 2 3 4 5 6 7 8 9 |
============================================================================================================================ Package Arch Version Repository Size ============================================================================================================================ Installing: mysql-community-devel x86_64 5.6.23-2.el6 mysql56-community 3.3 M Transaction Summary ============================================================================================================================ Install 1 Package(s) |
# bundle install –without development test
1 2 3 4 5 6 7 8 9 10 11 12 |
checking for Magick-config... no checking for pkg-config... yes checking for ImageMagick version >= 6.4.9... *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. — Gem files will remain installed in /opt/rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rmagick-2.13.4 for inspection. Results logged to /opt/rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/extensions/x86_64-linux/2.2.0-static/rmagick-2.13.4/gem_make.out An error occurred while installing rmagick (2.13.4), and Bundler cannot continue. Make sure that `gem install rmagick -v '2.13.4'` succeeds before bundling. |
ImageMagicがいるんですね。。(^^;
#yum install ImageMagick ImageMagick-devel
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
============================================================================================================================ Package Arch Version Repository Size ============================================================================================================================ Installing: ImageMagick x86_64 6.5.4.7-7.el6_5 base 1.7 M ImageMagick-devel x86_64 6.5.4.7-7.el6_5 base 86 k Updating: gtk2 x86_64 2.24.23-6.el6 base 3.2 M Installing for dependencies: GConf2 x86_64 2.28.0-6.el6 base 964 k ORBit2 x86_64 2.14.17-5.el6 base 168 k OpenEXR-libs x86_64 1.6.1-8.1.el6 base 197 k bzip2-devel x86_64 1.0.5-7.el6_0 base 250 k freetype-devel x86_64 2.3.11-14.el6_3.1 base 364 k gdk-pixbuf2 x86_64 2.24.1-5.el6 base 501 k ghostscript x86_64 8.70-19.el6 base 4.4 M ghostscript-devel x86_64 8.70-19.el6 base 42 k ghostscript-fonts noarch 5.50-23.2.el6 base 590 k ilmbase x86_64 1.0.1-6.1.el6 base 72 k jasper-devel x86_64 1.900.1-16.el6_6.3 updates 374 k lcms-devel x86_64 1.19-1.el6 base 49 k lcms-libs x86_64 1.19-1.el6 base 100 k libICE-devel x86_64 1.0.6-1.el6 base 15 k libIDL x86_64 0.8.13-2.1.el6 base 83 k libSM-devel x86_64 1.2.1-2.el6 base 12 k libX11-devel x86_64 1.6.0-2.2.el6 base 982 k libXau-devel x86_64 1.0.6-4.el6 base 14 k libXext-devel x86_64 1.3.2-2.1.el6 base 74 k libXfont x86_64 1.4.5-4.el6_6 updates 137 k libXt x86_64 1.1.4-6.1.el6 base 165 k libXt-devel x86_64 1.1.4-6.1.el6 base 454 k libcroco x86_64 0.6.2-5.el6 base 100 k libfontenc x86_64 1.0.5-2.el6 base 24 k libgsf x86_64 1.14.15-5.el6 base 116 k libjpeg-turbo-devel x86_64 1.2.1-3.el6_5 base 96 k librsvg2 x86_64 2.26.0-14.el6 base 140 k libtiff-devel x86_64 3.9.4-10.el6_5 base 468 k libtool-ltdl x86_64 2.2.6-15.5.el6 base 44 k libwmf-lite x86_64 0.2.8.4-23.el6 base 51 k libxcb-devel x86_64 1.9.1-2.el6 base 1.0 M sgml-common noarch 0.6.3-33.el6 base 43 k shared-mime-info x86_64 0.70-6.el6 base 209 k urw-fonts noarch 2.4-10.el6 base 3.1 M xorg-x11-font-utils x86_64 1:7.2-11.el6 base 75 k xorg-x11-proto-devel noarch 7.7-9.el6 base 286 k Updating for dependencies: atk x86_64 1.30.0-1.el6 base 195 k glib2 x86_64 2.28.8-4.el6 base 1.7 M jasper-libs x86_64 1.900.1-16.el6_6.3 updates 137 k libX11 x86_64 1.6.0-2.2.el6 base 586 k libX11-common noarch 1.6.0-2.2.el6 base 192 k libXext x86_64 1.3.2-2.1.el6 base 35 k libjpeg-turbo x86_64 1.2.1-3.el6_5 base 174 k libtiff x86_64 3.9.4-10.el6_5 base 343 k libxcb x86_64 1.9.1-2.el6 base 110 k Transaction Summary ============================================================================================================================ Install 38 Package(s) Upgrade 10 Package(s) |
# bundle install –without development test
1 2 3 4 |
Gems in the groups development and test were not installed. Use `bundle show [gemname]` to see where a bundled gem is installed. Post-install message from rmagick: Please report any bugs. See https://github.com/gemhome/rmagick/compare/RMagick_2-13-2...master and https://github.com/rmagick/rmagick/issues/18 |
■シークレットトークンの生成とMySQLテーブルの展開
# bundle exec rake generate_secret_token
# RAILS_ENV=production bundle exec rake db:migrate
apacheの設定は終わってるはずなんで、Redmineへアクセスしてみましょう!
■コンソールを起動するとreadlineが無いってエラーが出ました
bin/rails console production
/opt/rbenv/versions/2.2.1/lib/ruby/2.2.0/irb/completion.rb:9:in `require’: cannot load such file — readline (LoadError)
Gemfileに「gem ‘rb-readline’」を追加
#bundle install
■Redmineのデフォルトデータのロード
管理画面からもできるようなのですが、コマンドでやってみました
# RAILS_ENV=production rake redmine:load_default_data
select language: ja