

{"id":944,"date":"2016-08-22T12:00:01","date_gmt":"2016-08-22T03:00:01","guid":{"rendered":"https:\/\/curecode.jp\/tech\/?p=944"},"modified":"2017-03-21T10:53:53","modified_gmt":"2017-03-21T01:53:53","slug":"redmine-attached-thumbnails-into-amazon-s3","status":"publish","type":"post","link":"https:\/\/curecode.jp\/tech\/redmine-attached-thumbnails-into-amazon-s3\/","title":{"rendered":"Redmine \u306e\u30b5\u30e0\u30cd\u30a4\u30eb\u753b\u50cf\u304c Amazon S3 \u306b\u683c\u7d0d\u3067\u304d\u306a\u3044\u4ef6"},"content":{"rendered":"<p>\n  <a href=\"https:\/\/curecode.jp\/tech\/redmine-attachment-files-on-s3\/\">Redmine \u306e\u6dfb\u4ed8\u30d5\u30a1\u30a4\u30eb\u3092 Amazon S3 \u306b\u683c\u7d0d\u3059\u308b<\/a>\u8a18\u4e8b\u306e\u7d9a\u304d\u3067\u3059\u3002\u524d\u56de\u3067\u306f\u6dfb\u4ed8\u30d5\u30a1\u30a4\u30eb\u3092 Amazon S3 \u306b\u683c\u7d0d\u3059\u308b\u3068\u3053\u308d\u307e\u3067\u884c\u306a\u3044\u307e\u3057\u305f\u3002<br \/>\n  \u3057\u304b\u3057\u3001\u6dfb\u4ed8\u753b\u50cf\u306e\u81ea\u52d5\u30b5\u30e0\u30cd\u30a4\u30eb\u8868\u793a\u306e\u8a2d\u5b9a\u3092\u3057\u3066\u3044\u308b\u5834\u5408\u306f\u3001\u3046\u307e\u304f\u884c\u304b\u306a\u3044\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002\n<\/p>\n<h3>\u6dfb\u4ed8\u30d5\u30a1\u30a4\u30eb\u306e\u30b5\u30e0\u30cd\u30a4\u30eb\u3092\u8868\u793a\u3059\u308b\u8a2d\u5b9a<\/h3>\n<p>\n\u307e\u305a\u3001Redmine \u3067\u6dfb\u4ed8\u753b\u50cf\u306e\u30b5\u30e0\u30cd\u30a4\u30eb\u3092\u8868\u793a\u3059\u308b\u8a2d\u5b9a\u3067\u306a\u3044\u5834\u5408\u306f\u3001\u6b21\u306e\u624b\u9806\u3067\u8a2d\u5b9a\u3057\u307e\u3059\u3002\n<\/p>\n<p>\nRedmine \u306b\u30b7\u30b9\u30c6\u30e0\u7ba1\u7406\u8005\u3067\u30ed\u30b0\u30a4\u30f3\u3057\u3001\u300c\u8a2d\u5b9a\u300d\uff0d\u300c\u8868\u793a\u300d\uff0d\u300c\u6dfb\u4ed8\u30d5\u30a1\u30a4\u30eb\u306e\u30b5\u30e0\u30cd\u30a4\u30eb\u753b\u50cf\u3092\u8868\u793a\u300d\u306e\u30c1\u30a7\u30c3\u30af\u30dc\u30c3\u30af\u30b9\u3092\u30aa\u30f3\u306b\u3057\u3066\u4fdd\u5b58\u3057\u307e\u3059\u3002\n<\/p>\n<figure>\n<div id=\"attachment_946\" style=\"width: 578px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-946\" src=\"https:\/\/curecode.jp\/tech\/wp-content\/uploads\/2016\/04\/20160423_142610.png\" alt=\"\u6dfb\u4ed8\u30d5\u30a1\u30a4\u30eb\u306e\u30b5\u30e0\u30cd\u30a4\u30eb\u753b\u50cf\u3092\u8868\u793a\u3059\u308b\u8a2d\u5b9a\" width=\"568\" height=\"473\" class=\"size-full wp-image-946\" srcset=\"https:\/\/curecode.jp\/tech\/wp-content\/uploads\/2016\/04\/20160423_142610.png 568w, https:\/\/curecode.jp\/tech\/wp-content\/uploads\/2016\/04\/20160423_142610-300x250.png 300w, https:\/\/curecode.jp\/tech\/wp-content\/uploads\/2016\/04\/20160423_142610-200x167.png 200w\" sizes=\"auto, (max-width: 568px) 100vw, 568px\" \/><p id=\"caption-attachment-946\" class=\"wp-caption-text\">\u6dfb\u4ed8\u30d5\u30a1\u30a4\u30eb\u306e\u30b5\u30e0\u30cd\u30a4\u30eb\u753b\u50cf\u3092\u8868\u793a\u3059\u308b\u8a2d\u5b9a<\/p><\/div><br \/>\n<\/figure>\n<h3>S3 \u306e\u30d0\u30b1\u30c3\u30c8\u5185\u306b tmp \u30d5\u30a9\u30eb\u30c0\u3092\u4f5c\u6210\u3059\u308b<\/h3>\n<p>\nAWS \u306e\u30de\u30cd\u30fc\u30b8\u30e1\u30f3\u30c8\u30b3\u30f3\u30bd\u30fc\u30eb\u3084 s3cmd \u306a\u3069\u3092\u4f7f\u3063\u3066\u3001\u30d0\u30b1\u30c3\u30c8\u5185\u306b\u3042\u3089\u304b\u3058\u3081 tmp \u30d5\u30a9\u30eb\u30c0\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\n<\/p>\n<figure>\n<div id=\"attachment_948\" style=\"width: 660px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-948\" src=\"https:\/\/curecode.jp\/tech\/wp-content\/uploads\/2016\/04\/S3_Management_Console.png\" alt=\"S3 Management Console \u306e\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8\" width=\"650\" height=\"170\" class=\"size-full wp-image-948\" srcset=\"https:\/\/curecode.jp\/tech\/wp-content\/uploads\/2016\/04\/S3_Management_Console.png 650w, https:\/\/curecode.jp\/tech\/wp-content\/uploads\/2016\/04\/S3_Management_Console-300x78.png 300w, https:\/\/curecode.jp\/tech\/wp-content\/uploads\/2016\/04\/S3_Management_Console-200x52.png 200w\" sizes=\"auto, (max-width: 650px) 100vw, 650px\" \/><p id=\"caption-attachment-948\" class=\"wp-caption-text\">tmp \u3068\u3044\u3046\u30d5\u30a9\u30eb\u30c0\u3092\u3042\u3089\u304b\u3058\u3081\u4f5c\u6210\u3059\u308b<\/p><\/div><br \/>\n<\/figure>\n<p>\n\u3055\u3066\u3001\u3053\u308c\u3067\u30b5\u30e0\u30cd\u30a4\u30eb\u753b\u50cf\u304c S3 \u306b\u4fdd\u5b58\u3055\u308c\u308c\u3070\u554f\u984c\u306a\u3044\u306e\u3067\u3059\u304c\u3001\u3046\u307e\u304f\u3044\u304b\u305a\u306b\u306f\u307e\u308b\u30dd\u30a4\u30f3\u30c8\u304c\u3044\u304f\u3064\u304b\u3042\u308a\u307e\u3059\u3002\n<\/p>\n<h3>\u30b5\u30e0\u30cd\u30a4\u30eb\u304c\u305d\u3082\u305d\u3082\u751f\u6210\u3055\u308c\u306a\u3044<\/h3>\n<p>\n<a href=\"https:\/\/curecode.jp\/tech\/redmine-attachment-files-on-s3\/\">\u6dfb\u4ed8\u30d5\u30a1\u30a4\u30eb\u3092 Amazon S3 \u306b\u683c\u7d0d\u3059\u308b\u8a2d\u5b9a<\/a>\u306b\u3057\u3066\u3044\u306a\u304f\u3066\u3082\u30b5\u30e0\u30cd\u30a4\u30eb\u753b\u50cf\u304c\u751f\u6210\u3067\u304d\u306a\u3044\u3068\u304d\u306f\u3001ImageMagick \u307e\u305f\u306f rmagick \u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u306a\u3044\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002\n<\/p>\n<pre class=\"lang:sh decode:true \" >\r\n$ yum list ImageMagick*\r\n...\r\n\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6e08\u307f\u30d1\u30c3\u30b1\u30fc\u30b8\r\nImageMagick.x86_64                           6.7.2.7-2.el6                 @base\r\nImageMagick-devel.x86_64                     6.7.2.7-2.el6                 @base\r\n<\/pre>\n<p>\n\u30b7\u30b9\u30c6\u30e0\u306b ImageMagick \u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u304b\u3001Ruby \u306e gem \u3067 rmagick \u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u304b\u3001\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002rmagick \u306e gem \u3092\u30d3\u30eb\u30c9\u3059\u308b\u3068\u304d\u306b\u306f ImageMagick-devel \u30d1\u30c3\u30b1\u30fc\u30b8\u3082\u5fc5\u8981\u306b\u306a\u308a\u307e\u3059\u3002\n<\/p>\n<pre class=\"lang:sh decode:true \" >\r\n$ gem list rmagick\r\n*** LOCAL GEMS ***\r\n\r\nrmagick (2.13.4)\r\n<\/pre>\n<p>\n\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u306a\u3051\u308c\u3070\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3057\u3087\u3046\n<\/p>\n<h3>SSL \u8a3c\u660e\u66f8\u306e\u6a29\u9650\u306e\u95a2\u4fc2\u3067\u3046\u307e\u304f\u884c\u304b\u306a\u3044<\/h3>\n<p>\n\u4ee5\u4e0b\u306e\u3088\u3046\u306a SSL \u8a3c\u660e\u66f8\u306e\u30a8\u30e9\u30fc\u304c\u51fa\u3066\u5931\u6557\u3057\u3066\u3044\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<pre>\r\nAn error occured while generating thumbnail for 2016\/04\/hohgehoge.jpg to 1832_d41d8cd94e809098f00b20ecf842798e_100.thumb\r\nException was: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed\r\nFilter chain halted as :find_thumbnail_attachment_s3 rendered or redirected\r\n<\/pre>\n<p>\n\u5f53\u521d\u306f\u3001S3 \u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u5074\u306e SSL \u8a3c\u660e\u66f8\u306e\u554f\u984c\u304b\u3068\u601d\u3063\u305f\u306e\u3067\u3059\u304c\u3001\u305d\u306e\u7406\u7531\u306f\u81ea\u5206\u306e\u30b5\u30fc\u30d0\u30fc\u3067\u3057\u305f\u3002\n<\/p>\n<p>\n\u30b5\u30e0\u30cd\u30a4\u30eb\u753b\u50cf\u306e\u4fdd\u5b58\u306b\u306f open-uri \u3068\u3044\u3046\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u305f\u3081\u3001\u4ed6\u306e\u6dfb\u4ed8\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3068\u632f\u308b\u821e\u3044\u304c\u7570\u306a\u3063\u3066\u3044\u307e\u3059\u3002Ruby \u306e <code>open-uri<\/code> \u304c\u3001\u5185\u90e8\u7684\u306b openssl \u30e9\u30a4\u30d6\u30e9\u30ea\u8a2d\u5b9a\u306e\u30eb\u30fc\u30c8 CA \u8a3c\u660e\u66f8\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u4f7f\u3063\u3066\u3044\u307e\u3059\u3002\n<\/p>\n<p>\nCentOS \u306e\u5834\u5408\u3001\/etc\/pki\/tls\/certs \u306b\u3042\u308b ca-bundle.crt \u3068 ca-bundle.trust.crt \u30d5\u30a1\u30a4\u30eb\u306e\u6240\u6709\u8005\u304c root \u3067\u30d1\u30fc\u30df\u30c3\u30b7\u30e7\u30f3\u304c 600 \u306b\u306a\u3063\u3066\u3044\u308b\u3068\u3001Passenger \u30e6\u30fc\u30b6\u306e\u6a29\u9650\u3067\u8aad\u3081\u306a\u3044\u306e\u3067\u30a8\u30e9\u30fc\u3068\u306a\u308b\u3088\u3046\u3067\u3059\u3002<br \/>\n\/etc\/pki\/tls\/cert.pem \u3068\u3044\u3046\u30b7\u30f3\u30dc\u30ea\u30c3\u30af\u30ea\u30f3\u30af\u3082\u540c\u69d8\u3067\u3059\u3002\n<\/p>\n<pre class=\"lang:sh decode:true \" >chmod og+r \/etc\/pki\/tls\/certs\/ca-bundle.crt \/etc\/pki\/tls\/certs\/ca-bundle.trust.crt \/etc\/pki\/tls\/cert.pem<\/pre>\n<p>\n\u306e\u3088\u3046\u306b\u3057\u3066\u89e3\u6c7a\u3057\u307e\u3057\u305f\u3002\n<\/p>\n<h3>IT\u30a8\u30f3\u30b8\u30cb\u30a2\u52df\u96c6\u4e2d\uff01<\/h3>\n<p>\u30ad\u30e5\u30a2\u30b3\u30fc\u30c9\u682a\u5f0f\u4f1a\u793e\u306fIT\u30a8\u30f3\u30b8\u30cb\u30a2\u3092\u52df\u96c6\u3057\u3066\u304a\u308a\u307e\u3059\u3002\u5c11\u4eba\u6570\u306e\u8077\u5834\u306a\u306e\u3067\u3001\u4e0a\u6d41\u30fb\u4e0b\u6d41\u3084\u30b5\u30fc\u30d0\u30fc\u30fb\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u5bfe\u5fdc\u306e\u57a3\u6839\u306a\u304f\u3001\u3042\u306a\u305f\u306e\u5f37\u307f\u3092\u6d3b\u304b\u3057\u306a\u304c\u3089 \u3044\u308d\u3044\u308d\u306a\u3053\u3068\u306b\u30c1\u30e3\u30ec\u30f3\u30b8\u53ef\u80fd\u3067\u3059\u3002\u30a8\u30f3\u30b8\u30cb\u30a2\u3068\u3057\u3066\u306e\u672a\u7d4c\u9a13\u306e\u65b9\u3001\u7d4c\u9a13\u304c\u5c11\u306a\u3044\u65b9\u3082\u6b53\u8fce\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u4e0b\u8a18\u3088\u308aIT\u30a8\u30f3\u30b8\u30cb\u30a2\u52df\u96c6\u306e\u63a1\u7528\u60c5\u5831\u3092\u3054\u89a7\u3044\u305f\u3060\u3051\u307e\u3059\u3002<\/p>\n<div class=\"curecode_recruit_bn\">\n\t\t\t\t<a href=\"https:\/\/curecode.jp\/recruit\/itengineer\/\" target=\"_blank\" rel=\"noopener noreferrer\"><br \/>\n\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/curecode.jp\/tech\/wp-content\/themes\/tech\/images\/it_recruit.png?20241220\" alt=\"\u4e8b\u696d\u62e1\u5927\u306b\u4f34\u3044\u65b0\u3057\u3044\u9818\u57df\u306b\u4e00\u7dd2\u306b\u53d6\u308a\u7d44\u3093\u3067\u3044\u304f\u30e1\u30f3\u30d0\u30fc\u3092\u52df\u96c6\u3057\u307e\u3059\u3002\"  width=\"500\" height=\"180\"\/><br \/>\n\t\t\t\t<\/a>\n\t\t<\/div>\n<h3>\u30ad\u30e5\u30a2\u30b3\u30fc\u30c9\u516c\u5f0f\u30a4\u30f3\u30b9\u30bf\u30b0\u30e9\u30e0<\/h3>\n<p>\u30ad\u30e5\u30a2\u30b3\u30fc\u30c9\u682a\u5f0f\u4f1a\u793e\u306e\u65b0\u30b5\u30fc\u30d3\u30b9\u60c5\u5831\u3084\u3001\u30aa\u30d5\u30a3\u30b9\u30e9\u30a4\u30d5\u306e\u7d20\u6575\u306a\u77ac\u9593\u307e\u3067\u3002\u79c1\u305f\u3061\u306e\u65e5\u3005\u306e\u55b6\u307f\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<div class=\"curecode_recruit_bn\">\n\t\t\t\t<a href=\"https:\/\/www.instagram.com\/curecode\/\" target=\"_blank\" rel=\"noopener noreferrer\"><br \/>\n\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/curecode.jp\/tech\/wp-content\/themes\/tech\/images\/insta_bn.png?20241220\" alt=\"\u4e8b\u696d\u62e1\u5927\u306b\u4f34\u3044\u65b0\u3057\u3044\u9818\u57df\u306b\u4e00\u7dd2\u306b\u53d6\u308a\u7d44\u3093\u3067\u3044\u304f\u30e1\u30f3\u30d0\u30fc\u3092\u52df\u96c6\u3057\u307e\u3059\u3002\"  width=\"500\" height=\"180\"\/><br \/>\n\t\t\t\t<\/a>\n\t\t<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Redmine \u306e\u6dfb\u4ed8\u30d5\u30a1\u30a4\u30eb\u3092 Amazon S3 \u306b\u683c\u7d0d\u3059\u308b\u8a18\u4e8b\u306e\u7d9a\u304d\u3067\u3059\u3002\u524d\u56de\u3067\u306f\u6dfb\u4ed8\u30d5\u30a1\u30a4\u30eb [&hellip;]<\/p>\n","protected":false},"author":8,"featured_media":555,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[58,64],"tags":[40,59,43],"class_list":["post-944","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-aws","category-ruby","tag-aws","tag-redmine","tag-s3"],"_links":{"self":[{"href":"https:\/\/curecode.jp\/tech\/wp-json\/wp\/v2\/posts\/944","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/curecode.jp\/tech\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/curecode.jp\/tech\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/curecode.jp\/tech\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/curecode.jp\/tech\/wp-json\/wp\/v2\/comments?post=944"}],"version-history":[{"count":12,"href":"https:\/\/curecode.jp\/tech\/wp-json\/wp\/v2\/posts\/944\/revisions"}],"predecessor-version":[{"id":1056,"href":"https:\/\/curecode.jp\/tech\/wp-json\/wp\/v2\/posts\/944\/revisions\/1056"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/curecode.jp\/tech\/wp-json\/wp\/v2\/media\/555"}],"wp:attachment":[{"href":"https:\/\/curecode.jp\/tech\/wp-json\/wp\/v2\/media?parent=944"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/curecode.jp\/tech\/wp-json\/wp\/v2\/categories?post=944"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/curecode.jp\/tech\/wp-json\/wp\/v2\/tags?post=944"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}