{"id":12105,"date":"2023-11-19T07:00:23","date_gmt":"2023-11-18T22:00:23","guid":{"rendered":"https:\/\/blog.capilano-fw.com\/?p=12105"},"modified":"2023-11-10T19:40:17","modified_gmt":"2023-11-10T10:40:17","slug":"amazon-s3-%e3%81%ae%e9%96%8b%e7%99%ba%e7%92%b0%e5%a2%83%e3%81%a8%e3%81%97%e3%81%a6-minio-%e3%82%92-vps-%e3%81%ab%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab%e3%81%99%e3%82%8b","status":"publish","type":"post","link":"https:\/\/blog.capilano-fw.com\/?p=12105","title":{"rendered":"Amazon S3 \u306e\u958b\u767a\u74b0\u5883\u3068\u3057\u3066 MinIO \u3092 VPS \u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b"},"content":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u79c1\u306f\u958b\u767a\u6b74\u306e\u3042\u308b\u7a0b\u5ea6\u3042\u3063\u305f\u308a\u3059\u308b\u3093\u3067\u3059\u304c\u3001\u307e\u3060\u307e\u3060\u77e5\u3089\u306a\u3044\u3053\u3068\u3060\u3089\u3051\u3067\u3001\u3053\u306e\u9593\u3082\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u3053\u3068\u304c\u3042\u308a\u307e\u3057\u305f\u3002<\/p>\n<p><strong style=\"font-size: 35px;\">\u3048\uff01\u305d\u3093\u306a\u4fbf\u5229\u306a\u30e4\u30c4\u3042\u3093\u306e\uff01\uff1f\uff08\u3057\u304b\u3082\u7121\u6599\u3067\u4f7f\u3048\u308b\uff09\ud83d\ude2e<\/strong><\/p>\n<p>\u305d\u3046\u3067\u3059\u3002<\/p>\n<p>\u958b\u767a\u306e\u4e16\u754c\u306f\u65b0\u3057\u3044\u3082\u306e\u304c\u983b\u7e41\u306b\u767b\u5834\u3059\u308b\u306e\u3067\u3001\u305d\u3093\u306a\u4e2d\u300c<strong>\u3044\u3044\u3082\u306e\u3067\u3042\u3063\u305f\u3068\u3057\u3066\u3082\u79c1\u306e\u3068\u3053\u308d\u307e\u3067\u5c4a\u3044\u3066\u3044\u306a\u3044<\/strong>\u300d\u3068\u3044\u3046\u4e8b\u67c4\u304c\u305f\u307e\u306b\u51fa\u3066\u304d\u305f\u308a\u3059\u308b\u3093\u3067\u3059\u306d\u3002\uff08\u3082\u3057\u304f\u306f\u30a2\u30f3\u30c6\u30ca\u304c\u305d\u3063\u3061\u5411\u3044\u3066\u306a\u304b\u3063\u305f\u306e\u304b\u3082\u2026\ud83e\udd14\uff09<\/p>\n<p>\u305d\u3057\u3066\u3001\u4eca\u56de\u305d\u3046\u601d\u308f\u3055\u308c\u308b\u304d\u3063\u304b\u3051\u306b\u306a\u3063\u305f\u306e\u304c\u3001<\/p>\n<p><strong style=\"font-size: 35px;\">MinIO\uff08\u307f\u306b\u304a\u30fc\uff09<\/strong><\/p>\n<p>\u3067\u3059\u3002<\/p>\n<p><code>MinIO<\/code>\u306f\u3001\u7c21\u5358\u306b\u3044\u3046\u3068\u300c<strong>\u81ea\u524d\u3067\u7528\u610f\u3067\u304d\u308b Amazon S3<\/strong>\u300d\u3067\u3059\u3002<\/p>\n<p>\u3064\u307e\u308a\u3001<code>S3<\/code>\u306e\u3088\u3046\u306a\u30b9\u30c8\u30ec\u30fc\u30b8\u3092\u81ea\u5206\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u4f7f\u3048\u308b\u3068\u3044\u3046\u30b9\u30b0\u30ec\u30e2\u30ce\u3067\u3059\uff01<\/p>\n<p>\u3057\u304b\u3082\u3001\u4f55\u304c\u3059\u3054\u3044\u3063\u3066\u300c<strong>S3 \u4e92\u63db<\/strong>\u300d\u306a\u306e\u3067 <strong>.env \u3092\u5909\u66f4\u3059\u308b\u3060\u3051\u3067 S3 \u7528\u306e\u30b3\u30fc\u30c9\u304c\u52d5\u304f<\/strong>\u3093\u3067\u3059\u3002<\/p>\n<p>\u306a\u306e\u3067\u3001\u958b\u767a\u306b\u306f\u3082\u3063\u3066\u3053\u3044\u306a\u3093\u3067\u3059\u306d\u3002<\/p>\n<p>\u305d\u3057\u3066\u3001\u306a\u3093\u306a\u3089<code>VPS<\/code>\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3069\u3053\u304b\u3089\u3067\u3082\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u3066\u307f\u305f\u304f\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u305d\u3053\u3067\u2757<\/p>\n<p>\u4eca\u56de\u306f<code>MinIO<\/code>\u3092<code>VPS<\/code>\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u30ed\u30fc\u30ab\u30eb\u74b0\u5883\u306e<code>Laravel<\/code>\u304b\u3089\u30d5\u30a1\u30a4\u30eb\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u3066\u307f\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u305c\u3072\u4f55\u304b\u306e\u53c2\u8003\u306b\u306a\u308a\u307e\u3057\u305f\u3089\u5b09\u3057\u3044\u3067\u3059\u3002\ud83d\ude0a\u2728<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4445 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/08\/no_2.png\" alt=\"\" width=\"370\" height=\"310\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/08\/no_2.png 370w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/08\/no_2-300x251.png 300w\" sizes=\"auto, (max-width: 370px) 100vw, 370px\" \/>\u300c<strong>MinIO \u306f GUI \u3082<\/strong><br \/>\n<strong>\u3059\u3070\u3089\u3057\u304b\u3063\u305f\u3067\u3059\u2757<\/strong>\u300d<\/p>\n<p><strong>\u958b\u767a\u74b0\u5883\uff1a<\/strong> Ubuntu 20.04\u3001nginx 1.18\u3001Laravel 10.x<\/p>\n<h1>\u524d\u63d0\u3068\u3057\u3066<\/h1>\n<p>\u307e\u305a<code>VPS<\/code>\u306b<code>nginx<\/code>\u306e\u30a6\u30a7\u30d6\u30b5\u30fc\u30d0\u30fc\u304c\u5165\u3063\u3066\u3044\u3066\u3001\u3061\u3083\u3093\u3068\u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\u304c\u52d5\u304f\u72b6\u614b\u306b\u306a\u3063\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u305d\u3057\u3066\u3001\u4eca\u56de\u306f\u4ee5\u4e0b\uff12\u3064\u306e\u3088\u3046\u306a\u30b5\u30d6\u30c9\u30e1\u30a4\u30f3\u3067\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n<ul>\n<li>minio-api.example.com\uff1a API \u90e8\u5206<\/li>\n<li>minio-console.example.com\uff1a \u30b3\u30f3\u30bd\u30fc\u30eb\uff08GUI\uff09\u90e8\u5206<\/li>\n<\/ul>\n<p>\u306a\u306e\u3067\u3001\u3053\u306e\uff12\u3064\u306e<code>DNS<\/code>\u8a2d\u5b9a\u306f\u5148\u306b\u6e08\u307e\u305b\u3066\u304a\u3044\u3066\u304f\u3060\u3055\u3044\u3002\uff08\u5404\u30b5\u30fc\u30d3\u30b9\u3067\u8a2d\u5b9a\u65b9\u6cd5\u304c\u9055\u3046\u306e\u3067\u3053\u3053\u3067\u306f\u7701\u7565\u3057\u307e\u3059\uff09<\/p>\n<p>\u3067\u306f\u3001\u4eca\u56de\u3082\u697d\u3057\u3093\u3067\u3084\u3063\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u2757<\/p>\n<h1>Go \u8a00\u8a9e\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b<\/h1>\n<p><code>MinIO<\/code> \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u524d\u306b<code>Go<\/code>\u8a00\u8a9e\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<br \/>\n\u3068\u3044\u3046\u306e\u3082\u3001<code>MinIO<\/code>\u306f<code>Go<\/code>\u8a00\u8a9e\u3067\u4f5c\u3089\u308c\u3066\u3044\u308b\u304b\u3089\u3067\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre><strong>sudo apt update &amp;&amp; sudo apt upgrade<\/strong>\r\n<strong>sudo apt install golang<\/strong><\/pre>\n<p>\u3067\u306f\u3001\u5ff5\u306e\u305f\u3081\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3046\u307e\u304f\u3044\u3063\u3066\u3044\u308b\u304b\u30c1\u30a7\u30c3\u30af\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<div>\n<pre><strong>go version<\/strong><\/pre>\n<p>\u3059\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u8868\u793a\u306b\u306a\u308b\u306f\u305a\u3067\u3059\u3002<\/p>\n<div>\n<pre><strong>go version go1.13.8 linux\/amd64<\/strong><\/pre>\n<p>\u3053\u308c\u3067<code>Go<\/code>\u8a00\u8a9e\u306f<code>OK<\/code>\u3067\u3059\uff01<\/p>\n<\/div>\n<\/div>\n<h1>MinIO \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b<\/h1>\n<p>\u7d9a\u3044\u3066\u3001<code>SSH<\/code>\u3067<code>VPS<\/code>\u306b\u30ed\u30b0\u30a4\u30f3\u3057\u305f\u3089<code>MinIO<\/code>\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u4eca\u56de\u306f\u30d0\u30a4\u30ca\u30ea\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<br \/>\n\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div>\n<pre><strong>wget https:\/\/dl.min.io\/server\/minio\/release\/linux-amd64\/minio<\/strong>\r\n<strong>chmod +x minio<\/strong>\r\n<strong>sudo mv minio \/usr\/local\/bin\/<\/strong><\/pre>\n<p>\u203b \u3061\u306a\u307f\u306b<code>\/usr\/local\/bin\/<\/code>\u306f\u30d1\u30b9\u304c\u901a\u3063\u3066\u308b\uff08\u2252 \u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u3067\u5b9f\u884c\u3067\u304d\u308b\uff09\u5834\u6240\u3067\u3059\u3002\u74b0\u5883\u306b\u3088\u3063\u3066\u9055\u3046\u304b\u3082\u3067\u3059\u304c\u57fa\u672c\u7684\u306b<code>\/usr\/local\/bin\/<\/code>\u3067\u5927\u4e08\u592b\u3058\u3083\u306a\u3044\u3067\u3057\u3087\u3046\u304b\ud83e\udd14<\/p>\n<p>\u3053\u308c\u3067<code>minio<\/code>\u30b3\u30de\u30f3\u30c9\u304c\u4f7f\u3048\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<br \/>\n\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u8868\u793a\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<div>\n<pre><strong>minio -v<\/strong><\/pre>\n<p>\u3059\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u8868\u793a\u306b\u306a\u308b\u306f\u305a\u3067\u3059\u3002<\/p>\n<\/div>\n<div>\n<pre>minio version RELEASE.2023-10-16T04-13-43Z (commit-id=edfb310a59edb6f1b645fc456b03dfcea770e1b4)\r\nRuntime: go1.21.3 linux\/amd64\r\nLicense: GNU AGPLv3 &lt;https:\/\/www.gnu.org\/licenses\/agpl-3.0.html&gt;\r\nCopyright: 2015-2023 MinIO, Inc.<\/pre>\n<p>\u203b \u3061\u306a\u307f\u306b\u3001\u6614\u306f<code>Apache License Version 2.0<\/code>\u3067\u3057\u305f\u304c\u3001\u4eca\u306f<code>AGPL-3.0 license<\/code>\u306b\u306a\u3063\u3066\u307e\u3059\u3002<\/p>\n<p>\u3067\u306f\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067<code>MinIO<\/code>\u304c\u8d77\u52d5\u3067\u304d\u308b\u304b\u8a66\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<div>\n<pre><strong>minio server ~\/minio-data<\/strong><\/pre>\n<p>\u3053\u308c\u3067\u30d5\u30a1\u30a4\u30eb\u3092<code>~\/minio-data<\/code>\u3067\u7ba1\u7406\u3059\u308b<code>MinIO<\/code>\u304c\u8d77\u52d5\u3057\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u8868\u793a\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12106\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/10\/minio_with_laravel_1.png\" alt=\"\" width=\"611\" height=\"449\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/10\/minio_with_laravel_1.png 611w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/10\/minio_with_laravel_1-300x220.png 300w\" sizes=\"auto, (max-width: 611px) 100vw, 611px\" \/><\/p>\n<p>\u78ba\u8a8d\u304c\u3067\u304d\u305f\u3089\u4e00\u65e6\u300c<strong>Ctrl + C<\/strong>\u300d\u3067<code>MinIO<\/code>\u3092\u30b9\u30c8\u30c3\u30d7\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u3061\u306a\u307f\u306b\u3001\u30ed\u30fc\u30ab\u30eb\u3067\u4f7f\u3046\u5834\u5408\u306f\u3053\u308c\u3067\u4f5c\u696d\u306f\u5b8c\u4e86\u3067\u3059\u3002<br \/>\n<code>Laravel<\/code>\u3067\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3059\u308c\u3070<code>OK<\/code>\u3067\u3057\u3087\u3046\u3002<\/p>\n<p><strong>.env<\/strong><\/p>\n<div>\n<pre><strong>AWS_ACCESS_KEY_ID=minioadmin<\/strong>\r\n<strong>AWS_SECRET_ACCESS_KEY=minioadmin<\/strong>\r\n<strong>AWS_DEFAULT_REGION=us-east-1<\/strong>\r\n<strong>AWS_BUCKET=your-bucket-name<\/strong>\r\n<strong>AWS_USE_PATH_STYLE_ENDPOINT=true<\/strong>\r\n<strong>AWS_ENDPOINT=http:\/\/127.0.0.1:9000<\/strong><\/pre>\n<p>\u3067\u3082\u3001\u4eca\u56de\u306f<code>nginx<\/code>\u3092\u4f7f\u3063\u3066<code>minio-api.example.com<\/code>\u306e\u3088\u3046\u306a\u30b5\u30d6\u30c9\u30e1\u30a4\u30f3\u3067\u904b\u7528\u3057\u305f\u3044\u306e\u3067\u3001\u4f5c\u696d\u3092\u7d9a\u3051\u307e\u3059\u3002<\/p>\n<p>\u306a\u304a\u3001<code>AWS_USE_PATH_STYLE_ENDPOINT<\/code>\u306f<code>API<\/code>\u3078\u306e\u30a2\u30af\u30bb\u30b9\u65b9\u6cd5\u306e\u8a2d\u5b9a\u3067<code>true<\/code>\u306e\u5834\u5408\u306f\u300c<strong>\u30d1\u30b9\u5f62\u5f0f<\/strong>\u300d\u3068\u547c\u3070\u308c\u308b\u30c9\u30e1\u30a4\u30f3\u306e<code>URL<\/code>\u306b\u4e0b\u306b\u30d0\u30b1\u30c3\u30c8\u540d\u304c\u5165\u3063\u3066\u304f\u308b\u5f62\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><strong>\u4f8b\uff1a https:\/\/**********\/bucket-name\/filename<\/strong><\/p>\n<p>\u9006\u306b<code>false<\/code>\u306e\u5834\u5408\u306f\u300c<strong>\u30d0\u30fc\u30c1\u30e3\u30eb\u30db\u30b9\u30c8\u578b<\/strong>\u300d\u3068\u547c\u3070\u308c\u3001\u30b5\u30d6\u30c9\u30e1\u30a4\u30f3\u3068\u3057\u3066\u30d0\u30b1\u30c3\u30c8\u540d\u304c\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002<\/p>\n<p><strong>\u4f8b\uff1a https:\/\/bucket-name.*********\/filename<\/strong><\/p>\n<p>\u4eca\u56de\u306f\u30b7\u30f3\u30d7\u30eb\u306b\u3044\u304d\u305f\u3044\u306e\u3067\u300c<strong>\u30d1\u30b9\u5f62\u5f0f<\/strong>\u300d\u3067\u5b9f\u88c5\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<h1>\u74b0\u5883\u5909\u6570\u3092\u30bb\u30c3\u30c8\u3059\u308b<\/h1>\n<p>\u7d9a\u3044\u3066<code>MinIO<\/code>\u3067\u4f7f\u3046\u30ed\u30b0\u30a4\u30f3\u60c5\u5831\u3092\u4f5c\u3063\u3066\u304a\u304d\u307e\u3059\u3002<br \/>\n\u4ee5\u4e0b\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u3063\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><strong>\/etc\/default\/minio<\/strong><\/p>\n<\/div>\n<\/div>\n<\/div>\n<div>\n<pre><strong>MINIO_ROOT_USER=\uff08\u3042\u306a\u305f\u306e\u30e6\u30fc\u30b6\u30fc\u540d\uff09<\/strong>\r\n<strong>MINIO_ROOT_PASSWORD=\uff08\u3042\u306a\u305f\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\uff09<\/strong><\/pre>\n<\/div>\n<div>\n<div>\n<h1>systemd \u306b\u30b5\u30fc\u30d3\u30b9\u3068\u3057\u3066\u767b\u9332\u3059\u308b<\/h1>\n<p>\u3082\u3061\u308d\u3093<code>MinIO<\/code>\u306f\u30b3\u30de\u30f3\u30c9\u3067\u3044\u3064\u3067\u3082\u8d77\u52d5\u3067\u304d\u307e\u3059\u304c<code>nginx<\/code>\u3084<code>MySQL<\/code>\u306e\u3088\u3046\u306b\u30b5\u30fc\u30d3\u30b9\u3068\u3057\u3066\u8d77\u52d5\u3067\u304d\u308b\u3068<strong>\u518d\u8d77\u52d5\u306e\u3068\u304d\u306b\u81ea\u52d5\u7684\u306b\u8d77\u52d5\u3057\u3066\u304f\u308c\u305f\u308a\u3059\u308b<\/strong>\u306a\u3069\u7ba1\u7406\u304c\u3057\u3084\u3059\u3044\u3067\u3059\u3002<\/p>\n<\/div>\n<p>\u305d\u3053\u3067\u3001<code>systemd<\/code>\u3092\u72ec\u81ea\u306b\u3064\u304f\u3063\u3066\u30b5\u30fc\u30d3\u30b9\u3068\u3057\u3066\u4f7f\u3048\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3002<br \/>\n\u4ee5\u4e0b\u306e\u30d5\u30a1\u30a4\u30eb\u3092<code>vi<\/code>\u30b3\u30de\u30f3\u30c9\u306a\u3069\u3067\u4f5c\u6210\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><strong>\/lib\/systemd\/system\/<\/strong><\/p>\n<div>\n<pre><strong>[Unit]<\/strong>\r\n<strong>Description=MinIO<\/strong>\r\n<strong>Documentation=https:\/\/docs.min.io<\/strong>\r\n<strong>Wants=network-online.target<\/strong>\r\n<strong>After=network-online.target<\/strong>\r\n<strong>AssertFileIsExecutable=\/usr\/local\/bin\/minio<\/strong>\r\n\r\n<strong>[Service]<\/strong>\r\n<strong>ExecStart=\/usr\/local\/bin\/minio server \/minio-data --address \":9001\" --console-address \":9002\"<\/strong>\r\n<strong>User=minio-user<\/strong>\r\n<strong>Group=minio-user<\/strong>\r\n<strong>Restart=always<\/strong>\r\n<strong>EnvironmentFile=-\/etc\/default\/minio<\/strong>\r\n\r\n<strong>[Install]<\/strong>\r\n<strong>WantedBy = multi-user.target<\/strong><\/pre>\n<\/div>\n<div>\n<p>\u203b \u3068\u3066\u3082\u57fa\u672c\u7684\u306a\u69cb\u6210\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u3082\u3057\u3088\u308a\u8a73\u7d30\u3092\u8a2d\u5b9a\u3057\u305f\u3044\u5834\u5408\u306f\u672c\u5bb6\u306e\u30d6\u30ed\u30b0\u3092\u53c2\u8003\u306b\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><strong>\ud83d\udcdd \u53c2\u8003\u30da\u30fc\u30b8\uff1a<\/strong>\u00a0<a href=\"https:\/\/blog.min.io\/configuring-minio-with-systemd\/\" target=\"_blank\" rel=\"noopener\">Configuring MinIO with SystemD<\/a><\/p>\n<p>\u306a\u304a\u3001<code>ExecStart<\/code>\u306e\u610f\u5473\u306f\u4ee5\u4e0b\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n<ul>\n<li>\u30d5\u30a9\u30eb\u30c0\u306f\u3001\/minio-data \u3092\u4f7f\u3063\u3066\u306d<\/li>\n<li>API \u306f 9001 \u756a\u30dd\u30fc\u30c8\u3060\u3088<\/li>\n<li>\u30b3\u30f3\u30bd\u30fc\u30eb\uff08GUI\uff09\u306f 9002 \u756a\u30dd\u30fc\u30c8\u3060\u3088<\/li>\n<\/ul>\n<p>\u307e\u305f\u3001<code>EnvironmentFile<\/code>\u304c\u5148\u307b\u3069\u4f5c\u6210\u3057\u305f\u30ed\u30b0\u30a4\u30f3\u60c5\u5831\u306e\u5165\u3063\u305f\u30d5\u30a1\u30a4\u30eb\u3092\u30bb\u30c3\u30c8\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<h1>\u30e6\u30fc\u30b6\u30fc\uff06\u30b0\u30eb\u30fc\u30d7\u3092\u3064\u304f\u308b<\/h1>\n<p>\u6b21\u306b\u3001\u307e\u3060\u300c<strong>minio-user<\/strong>\u300d\u3068\u3044\u3046\u30e6\u30fc\u30b6\u30fc\uff06\u30b0\u30eb\u30fc\u30d7\u304c\u5b58\u5728\u3057\u3066\u3044\u306a\u3044\u306e\u3067\u3053\u306e\uff12\u3064\u3092\u4f5c\u308a\u307e\u3059\u3002<\/p>\n<div>\n<pre><strong>sudo useradd -M -r -g minio-user<\/strong>\r\n<strong>sudo useradd -M -r -g minio-user minio-user<\/strong><\/pre>\n<p>\u305d\u3057\u3066\u3001<code>systemd<\/code>\u306e\u8a2d\u5b9a\u3092\u30ea\u30ed\u30fc\u30c9\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<div>\n<pre><strong>sudo systemctl daemon-reload<\/strong><\/pre>\n<h1>\u30d5\u30a9\u30eb\u30c0\u306e\u6a29\u9650\u3092\u5909\u66f4\u3059\u308b<\/h1>\n<p>\u306a\u304a\u3001\u5fd8\u308c\u3066\u306f\u3044\u3051\u306a\u3044\u306e\u3067\u3059\u304c\u3001\u4eca\u56de\u306f<code>\/minio-data<\/code>\u3068\u3044\u3046\u30d5\u30a9\u30eb\u30c0\u306b\u30d5\u30a1\u30a4\u30eb\u3092\u4fdd\u5b58\u3059\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3057\u304b\u3057\u3001\u3053\u306e\u30d5\u30a9\u30eb\u30c0\u306b\u306f\u5148\u307b\u3069\u306e\u30e6\u30fc\u30b6\u30fc\uff08\u4eca\u56de\u306e\u5834\u5408\u306f\u3001<code>minio-user<\/code>\uff09\u304c\u30a2\u30af\u30bb\u30b9\u6a29\u9650\u3092\u3082\u3063\u3066\u3044\u306a\u3044\u3068\u3044\u3051\u307e\u305b\u3093\u3002<\/p>\n<p>\u305d\u3053\u3067\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u30d5\u30a9\u30eb\u30c0\u3092\u3064\u304f\u308a\u3001\u6a29\u9650\u3092\u3064\u3051\u3066\u3042\u3052\u307e\u3057\u3087\u3046\u3002<\/p>\n<\/div>\n<\/div>\n<div>\n<pre><strong>sudo mkdir \/minio-data<\/strong>\r\n<strong>sudo chown minio-user:minio-user \/minio-data\/<\/strong><\/pre>\n<p>\u3053\u308c\u3067<code>systemd<\/code>\u306e\u8a2d\u5b9a\u306f\u5b8c\u4e86\u3057\u307e\u3057\u305f\u3002<br \/>\n\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067<code>MinIO<\/code>\u3092\u8d77\u52d5\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<div>\n<pre><strong>sudo systemctl start minio.service<\/strong><\/pre>\n<p>\u305d\u3057\u3066\u3001\u5ff5\u306e\u305f\u3081\u3046\u307e\u304f\u8d77\u52d5\u3067\u304d\u3066\u3044\u308b\u304b\u3092\u30c1\u30a7\u30c3\u30af\u3057\u307e\u3059\u3002<\/p>\n<div>\n<pre><strong>sudo systemctl status minio.service<\/strong><\/pre>\n<p>\u3059\u308b\u3068\u3001\u3053\u3093\u306a\u30ab\u30f3\u30b8\u3067\u8868\u793a\u3055\u308c\u308b\u306f\u305a\u3067\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12107\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/10\/minio_with_laravel_2.png\" alt=\"\" width=\"497\" height=\"189\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/10\/minio_with_laravel_2.png 497w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/10\/minio_with_laravel_2-300x114.png 300w\" sizes=\"auto, (max-width: 497px) 100vw, 497px\" \/><\/p>\n<p>\u3061\u306a\u307f\u306b\u3001\u3053\u306e\u307e\u307e\u3067\u306f\u30b7\u30b9\u30c6\u30e0\u3092<code>reboot<\/code>\u30b3\u30de\u30f3\u30c9\u306a\u3069\u3067\u518d\u8d77\u52d5\u3057\u3066\u3057\u307e\u3046\u3068\u3001<code>MinIO<\/code>\u30b5\u30fc\u30d3\u30b9\u306f\u505c\u6b62\u3057\u3066\u3057\u307e\u3044\u307e\u3059\u3002<\/p>\n<p>\u305d\u306e\u305f\u3081\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u518d\u8d77\u52d5\u3057\u3066\u3082\u81ea\u52d5\u3067<code>MinIO<\/code>\u30b5\u30fc\u30d3\u30b9\u304c\u8d77\u52d5\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u3066\u304a\u304f\u3068\u3044\u3044\u3067\u3057\u3087\u3046\u3002<\/p>\n<div>\n<pre><strong>sudo systemctl enable minio.service<\/strong><\/pre>\n<p>\u3053\u308c\u3067<code>systemd<\/code>\u306e\u4f5c\u696d\u306f\u5b8c\u4e86\u3067\u3059\u2757<\/p>\n<h1>nginx \u304b\u3089 MinIO \u3092\u5b9f\u884c\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b<\/h1>\n<p>\u3067\u306f\u3001\u4ee5\u4e0b\uff12\u3064\u306e\u30c9\u30e1\u30a4\u30f3\u304b\u3089\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u3088\u3046\u306b<code>nginx<\/code>\u306e\u8a2d\u5b9a\u3092\u8ffd\u52a0\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<ul>\n<li>minio-api.example.com\uff1a API \u90e8\u5206<\/li>\n<li>minio-console.example.com\uff1a \u30b3\u30f3\u30bd\u30fc\u30eb\uff08GUI\uff09\u90e8\u5206<\/li>\n<\/ul>\n<p><strong>\/etc\/nginx\/sites-available\/default<\/strong><\/p>\n<div>\n<pre><strong># \u4ee5\u4e0b\u3092\u8ffd\u52a0<\/strong>\r\n\r\n<strong># MinIO API<\/strong>\r\n<strong>server {<\/strong>\r\n<strong>    listen 80;<\/strong>\r\n<strong>    server_name minio-api.\uff08\u3042\u306a\u305f\u306e\u30c9\u30e1\u30a4\u30f3\uff09;<\/strong>\r\n\r\n<strong>    location \/ {<\/strong>\r\n<strong>        proxy_pass http:\/\/localhost:9001;<\/strong>\r\n<strong>        proxy_set_header Host $host;<\/strong>\r\n<strong>        proxy_set_header X-Real-IP $remote_addr;<\/strong>\r\n<strong>        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<\/strong>\r\n<strong>    }<\/strong>\r\n<strong>}<\/strong>\r\n\r\n<strong># MinIO Console<\/strong>\r\n<strong>server {<\/strong>\r\n<strong>    listen 80;<\/strong>\r\n<strong>    server_name minio-console.\uff08\u3042\u306a\u305f\u306e\u30c9\u30e1\u30a4\u30f3\uff09;<\/strong>\r\n\r\n<strong>    location \/ {<\/strong>\r\n<strong>        proxy_pass http:\/\/localhost:9002;<\/strong>\r\n<strong>        proxy_set_header Host $host;<\/strong>\r\n<strong>        proxy_set_header X-Real-IP $remote_addr;<\/strong>\r\n<strong>        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\r\n\r\n        # To support websocket\r\n        proxy_http_version 1.1;\r\n        proxy_set_header Upgrade $http_upgrade;\r\n        proxy_set_header Connection \"upgrade\";<\/strong>\r\n<strong>    }<\/strong>\r\n<strong>}<\/strong><\/pre>\n<p>\u5909\u66f4\u3057\u305f\u3089\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067<code>nginx<\/code>\u3092\u518d\u8d77\u52d5\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div>\n<pre><strong>sudo systemctl restart nginx<\/strong><\/pre>\n<p>\u3059\u308b\u3068\u3001\u30bb\u30c3\u30c8\u3057\u305f\u30c9\u30e1\u30a4\u30f3\u3078\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u203b \u306a\u304a\u3001\u672c\u6765\u306f<code>https<\/code>\u3067\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u3079\u304d\u3067\u3059\u304c\u4eca\u56de\u306f\u7701\u7565\u3057\u307e\u3059\u3002<code>certbot<\/code>\u3092\u4f7f\u3046\u3068\u4fbf\u5229\u3067\u3059\u3088\ud83d\udc4d<\/p>\n<p>\u3053\u308c\u3067<code>MinIO<\/code>\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u5b8c\u4e86\u3067\u3059\u3002<\/p>\n<h1>\u30d0\u30b1\u30c3\u30c8\u3092\u3064\u304f\u308b<\/h1>\n<p>\u3067\u306f\u3001<strong>http:\/\/minio-console.\uff08\u3042\u306a\u305f\u306e\u30c9\u30e1\u30a4\u30f3\uff09<\/strong>\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u30ed\u30b0\u30a4\u30f3\u3057\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12108\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/10\/minio_with_laravel_3.png\" alt=\"\" width=\"372\" height=\"397\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/10\/minio_with_laravel_3.png 372w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/10\/minio_with_laravel_3-281x300.png 281w\" sizes=\"auto, (max-width: 372px) 100vw, 372px\" \/><\/p>\n<p>\u3059\u308b\u3068\u3001\u753b\u9762\u5de6\u5074\u306b\u30e1\u30cb\u30e5\u30fc\u304c\u3042\u308b\u306e\u3067\u300c<strong>Buckets<\/strong>\u300d\u3092\u30af\u30ea\u30c3\u30af\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12109\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/10\/minio_with_laravel_4.png\" alt=\"\" width=\"242\" height=\"215\" \/><\/p>\n<p>\u3059\u308b\u3068\u3001\u30d0\u30b1\u30c3\u30c8\u306e\u30da\u30fc\u30b8\u306b\u79fb\u52d5\u3059\u308b\u306e\u3067\u300c<strong>Create Bucket<\/strong>\u300d\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12110\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/10\/minio_with_laravel_5.png\" alt=\"\" width=\"190\" height=\"65\" \/><\/p>\n<\/div>\n<p>\u30d0\u30b1\u30c3\u30c8\u3092\u767b\u9332\u3059\u308b\u30d5\u30a9\u30fc\u30e0\u304c\u8868\u793a\u3055\u308c\u308b\u306e\u3067\u3001\u9069\u5f53\u306a\u540d\u524d\u3092\u3064\u3051\u3066\u300c<strong>Create Bucket<\/strong>\u300d\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<\/p>\n<p>\u203b \u30d0\u30b1\u30c3\u30c8\u540d\u306f\u4ed6\u306e\u90e8\u5206\u3067\u3082\u7d71\u4e00\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12111\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/10\/minio_with_laravel_6.png\" alt=\"\" width=\"592\" height=\"383\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/10\/minio_with_laravel_6.png 592w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/10\/minio_with_laravel_6-300x194.png 300w\" sizes=\"auto, (max-width: 592px) 100vw, 592px\" \/><\/p>\n<p>\u3059\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u30d0\u30b1\u30c3\u30c8\u304c\u4fdd\u5b58\u3055\u308c\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12112\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/10\/minio_with_laravel_7.png\" alt=\"\" width=\"400\" height=\"251\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/10\/minio_with_laravel_7.png 400w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/10\/minio_with_laravel_7-300x188.png 300w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/p>\n<div>\n<h1>Laravel \u306e .env \u306b\u63a5\u7d9a\u60c5\u5831\u3092\u30bb\u30c3\u30c8\u3059\u308b<\/h1>\n<p>\u3067\u306f\u3001<code>.env<\/code>\u306b\u4eca\u56de\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f<code>MinIO<\/code>\u30b5\u30fc\u30d0\u30fc\u3078\u306e\u63a5\u7d9a\u60c5\u5831\u3092\u30bb\u30c3\u30c8\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><strong>.env<\/strong><\/p>\n<div>\n<pre><strong>AWS_ACCESS_KEY_ID=\uff08\u3042\u306a\u305f\u306e\u30e6\u30fc\u30b6\u30fc\u540d\uff09<\/strong>\r\n<strong>AWS_SECRET_ACCESS_KEY=\uff08\u3042\u306a\u305f\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\uff09<\/strong>\r\n<strong>AWS_BUCKET=test-bucket<\/strong>\r\n<strong>AWS_ENDPOINT=http:\/\/minio-api.********.com\/\uff08API \u3078\u306e URL\uff09<\/strong><\/pre>\n<p>\u306a\u304a\u3001<strong>\uff08\u3042\u306a\u305f\u306e\u30e6\u30fc\u30b6\u30fc\u540d\uff09<\/strong>\u3068<strong>\uff08\u3042\u306a\u305f\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\uff09<\/strong>\u306f<code>EnvironmentFile<\/code>\u3068\u3057\u3066<code>\/etc\/default\/minio<\/code>\u306e\u4e2d\u306b\u4fdd\u5b58\u3057\u305f\u5185\u5bb9\u3068\u540c\u3058\u3067\u3059\u3002<\/p>\n<h1>S3 \u7528\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b<\/h1>\n<p>\u3067\u306f\u3001\u6700\u5f8c\u306b<code>Laravel<\/code>\u306b<code>S3<\/code>\u7528\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3057\u3087\u3046\u3002<br \/>\n\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div>\n<pre><strong>composer require league\/flysystem-aws-s3-v3 \"^3.0\" --with-all-dependencies<\/strong><\/pre>\n<\/div>\n<p>\u3053\u308c\u3067\u5168\u3066\u306e\u4f5c\u696d\u306f\u5b8c\u4e86\u3067\u3059\u3002<br \/>\n\u304a\u75b2\u308c\u69d8\u3067\u3057\u305f\ud83d\ude0a\u2728<\/p>\n<\/div>\n<h1>\u30c6\u30b9\u30c8\u3057\u3066\u307f\u308b<\/h1>\n<p>\u3067\u306f\u5b9f\u969b\u306b<code>Laravel 10.x<\/code>\u304b\u3089\u4eca\u56de\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f<code>MinIO<\/code>\u306b\u30d5\u30a1\u30a4\u30eb\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u307e\u305a\u3001\u30eb\u30fc\u30c8\u306b\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3092\u8ffd\u52a0\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><strong>routes\/web.php<\/strong><\/p>\n<div>\n<pre><strong>use Illuminate\\Support\\Facades\\Storage;<\/strong>\r\n\r\n\/\/ \u7701\u7565\r\n\r\n<strong>Route::get('minio_upload', function(){<\/strong>\r\n\r\n<strong>    if(! Storage::disk('s3')-&gt;put('test.txt', '\u3046\u307e\u3044\u8089\u304c\u98df\u3044\u305f\u3044\u306a\u3041')) {<\/strong>\r\n\r\n<strong>        dd('\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u306b\u5931\u6557\u3057\u307e\u3057\u305f');<\/strong>\r\n\r\n<strong>    }<\/strong>\r\n\r\n<strong>    dd('\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u306b\u6210\u529f\u3057\u307e\u3057\u305f');<\/strong>\r\n\r\n<strong>});<\/strong><\/pre>\n<p>\u3067\u306f\u3001<code>MinIO<\/code>\u304c\u8d77\u52d5\u3057\u3066\u3044\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u3066\u304b\u3089\u30d6\u30e9\u30a6\u30b6\u3067\u300c<strong>http:\/\/******\/minio_upload<\/strong>\u300d\u3078\u30a2\u30af\u30bb\u30b9\u3057\u307e\u3059\u3002<\/p>\n<p>\u3059\u308b\u3068\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12114\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/10\/minio_with_laravel_9.png\" alt=\"\" width=\"331\" height=\"43\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/10\/minio_with_laravel_9.png 331w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/10\/minio_with_laravel_9-300x39.png 300w\" sizes=\"auto, (max-width: 331px) 100vw, 331px\" \/><\/p>\n<p>\u306f\u3044\u2757<br \/>\n\u300c<strong>\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u306b\u6210\u529f\u3057\u307e\u3057\u305f<\/strong>\u300d\u3068\u8868\u793a\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n<p>\u3067\u306f\u3001\u5b9f\u969b\u306b\u30b3\u30f3\u30bd\u30fc\u30eb\u306e\u65b9\u3067\u3082\u78ba\u8a8d\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u3069\u3046\u306a\u3063\u305f\u3067\u3057\u3087\u3046\u304b\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12115\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/10\/minio_with_laravel_10.png\" alt=\"\" width=\"432\" height=\"241\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/10\/minio_with_laravel_10.png 432w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/10\/minio_with_laravel_10-300x167.png 300w\" sizes=\"auto, (max-width: 432px) 100vw, 432px\" \/><\/p>\n<p>\u306f\u3044\u2757<br \/>\n\u3046\u307e\u304f\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3067\u304d\u3066\u3044\u307e\u3059\u306d\u3002<\/p>\n<p>\u3067\u306f\u3001\u5ff5\u306e\u305f\u3081\u30d7\u30ec\u30d3\u30e5\u30fc\u3067\u4e2d\u8eab\u3082\u78ba\u8a8d\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u3046\u307e\u304f\u3044\u3063\u3066\u3044\u308b\u3067\u3057\u3087\u3046\u304b\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12116\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/10\/minio_with_laravel_11.png\" alt=\"\" width=\"328\" height=\"156\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/10\/minio_with_laravel_11.png 328w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2023\/10\/minio_with_laravel_11-300x143.png 300w\" sizes=\"auto, (max-width: 328px) 100vw, 328px\" \/><\/p>\n<p>\u306f\u3044\u2757<br \/>\n\u3061\u3083\u3093\u3068\u30c6\u30ad\u30b9\u30c8\u3082\u4fdd\u5b58\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3059\u3079\u3066\u6210\u529f\u3067\u3059\u2728\ud83d\ude0a\ud83d\udc4d<\/p>\n<h1>\u3061\u306a\u307f\u306b\uff1a Storage \u3092\u30c7\u30d0\u30c3\u30b0\u3059\u308b\u306b\u306f<\/h1>\n<p>\u5148\u307b\u3069\u306e\u30b3\u30fc\u30c9\u3067\u306f\u3082\u3057\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u306e\u3068\u304d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u3066\u3082\u30a6\u30f3\u3068\u3082\u30b9\u30f3\u3068\u3082\u8a00\u3044\u307e\u305b\u3093\u3002<\/p>\n<p>\u3053\u308c\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b<code>try ~ catch<\/code>\u306b\u3057\u3066\u3082\u540c\u3058\u3067\u3059\u3002<\/p>\n<div>\n<pre><strong>try {<\/strong>\r\n\r\n<strong>    Storage::disk('s3')-&gt;put('test.txt', '\u3046\u307e\u3044\u8089\u304c\u98df\u3044\u305f\u3044\u306a\u3041')<\/strong>\r\n\r\n<strong>} catch (\\Exception $e) {<\/strong>\r\n\r\n<strong>    dd($e-&gt;getMessage());<\/strong>\r\n\r\n<strong>}<\/strong><\/pre>\n<\/div>\n<p>\u3082\u3057<code>Storage<\/code>\u306e\u30c7\u30d0\u30c3\u30b0\u3092\u3059\u308b\u306b\u306f\u3001\u3053\u308c\u30d7\u30e9\u30b9<code>config\/filesystems.php<\/code>\u306e<code>disks.s3.throw<\/code>\u3092<code>true<\/code>\u306b\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<div>\n<pre>'s3' =&gt; [\r\n    'driver' =&gt; 's3',\r\n    'key' =&gt; env('AWS_ACCESS_KEY_ID'),\r\n    'secret' =&gt; env('AWS_SECRET_ACCESS_KEY'),\r\n    'region' =&gt; env('AWS_DEFAULT_REGION'),\r\n    'bucket' =&gt; env('AWS_BUCKET'),\r\n    'url' =&gt; env('AWS_URL'),\r\n    'endpoint' =&gt; env('AWS_ENDPOINT'),\r\n    'use_path_style_endpoint' =&gt; env('AWS_USE_PATH_STYLE_ENDPOINT', false),\r\n    <strong>'throw' =&gt; true, \/\/ \ud83d\udc48 \u3053\u3053\u3092 true \u306b\u3059\u308b<\/strong>\r\n],<\/pre>\n<p>\u3053\u308c\u3067\u30a8\u30e9\u30fc\u5185\u5bb9\u3092\u77e5\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u306e\u3067\u958b\u767a\u3057\u3084\u3059\u304f\u306a\u308b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<h1>\u4f01\u696d\u69d8\u3078\u306e\u3054\u63d0\u6848<\/h1>\n<p>\u3053\u308c\u306f\u3001<code>S3<\/code>\u30b9\u30c8\u30ec\u30fc\u30b8\u306b\u9650\u3089\u305a\u3067\u3059\u304c<code>aws<\/code>\u306e\u300c<strong>\u3061\u3087\u3063\u3068\u56f0\u3063\u305f\u3068\u3053\u308d<\/strong>\u300d\u3068\u3057\u3066<strong>\u5f93\u91cf\u8ab2\u91d1\u306a\u306e\u3067\u6599\u91d1\u304c\u8aad\u307f\u306b\u304f\u3044<\/strong>\u3068\u3044\u3046\u90e8\u5206\u304c\u3042\u308b\u304b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u3057\u304b\u3057\u3001\u4eca\u56de\u306e<code>MinIO<\/code>\u3092\u6708\u984d\u56fa\u5b9a\u306e<code>VPS<\/code>\u306b\u8a2d\u7f6e\u3059\u308c\u3070\u6bce\u6708\u540c\u3058\u8cbb\u7528\u3067\u904b\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u3082\u3057\u305d\u3046\u3044\u3063\u305f\u3054\u5e0c\u671b\u304c\u3054\u3056\u3044\u307e\u3057\u305f\u3089\u3001\u3044\u3064\u3067\u3082\u304a\u6c17\u8efd\u306b\u3054\u76f8\u8ac7\u304f\u3060\u3055\u3044\u3002<br \/>\n\u304a\u5f85\u3061\u3057\u3066\u304a\u308a\u307e\u3059\u3002\ud83d\ude0a\u2728<\/p>\n<\/div>\n<h1>\u7d42\u308f\u308a\u306b<\/h1>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u4eca\u56de\u306f\u3044\u3064\u3082\u3068\u306f\u9055\u3063\u3066\u30b5\u30fc\u30d0\u30fc\u5185\u306e\u69cb\u7bc9\u3092\u30e1\u30a4\u30f3\u306b\u3057\u3066\u304a\u5c4a\u3051\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u3061\u306a\u307f\u306b\u4eca\u56de\u521d\u3081\u3066<code>systemd<\/code>\u3092\u672c\u683c\u7684\u306b\u89e6\u308a\u307e\u3057\u305f\u304c\u3044\u308d\u3044\u308d\u3068\u4fbf\u5229\u306a\u4f7f\u3044\u65b9\u304c\u3067\u304d\u305d\u3046\u3067\u3059\u3002\u307e\u305f\u6a5f\u4f1a\u304c\u3042\u3063\u305f\u3089\u3053\u306e\u8fba\u3082\u6df1\u307c\u3063\u3066\u3044\u3053\u3046\u304b\u306a\u3063\u3066\u30ab\u30f3\u30b8\u3067\u3059\u3002<\/p>\n<p>\u3068\u306b\u304b\u304f\u3001<code>MinIO<\/code>\u3044\u3044\u3067\u3059\u306d\u3002<\/p>\n<p><code>Laravel<\/code>\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u3067\u3082\u540c\u3058\u3088\u3046\u306a\u306e\u304c\u51fa\u3066\u304d\u305f\u3089\u3082\u3063\u3068\u697d\u306a\u306e\u306b\u306a\u3001\u306a\u3093\u3066\u8003\u3048\u3066\u307e\u3057\u305f\u3002\uff08\u8ab0\u304b\u3064\u304f\u3063\u3066\u3002please\uff09<\/p>\n<p>\u4eca\u56de\u306f\u4ee5\u4e0a\u3067\u3059\u3002<\/p>\n<p>\u3067\u306f\u3067\u306f\u301c\u2757<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9238 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/06\/no_4.png\" alt=\"\" width=\"318\" height=\"320\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/06\/no_4.png 318w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/06\/no_4-298x300.png 298w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/06\/no_4-150x150.png 150w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2021\/06\/no_4-100x100.png 100w\" sizes=\"auto, (max-width: 318px) 100vw, 318px\" \/>\u300c\u30a4\u30f3\u30dc\u30a4\u30b9\u306e\u4e8b\u52d9\u51e6\u7406\u3001<br \/>\n\u3084\u3063\u3071\u3081\u3093\u3069\u304f\u3055\u3044\uff01<br \/>\n\u4ed5\u4e8b\u91cf\u307e\u3067\u8ca0\u62c5\u5897\u2026\ud83d\ude2b\u300d<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u79c1\u306f\u958b\u767a\u6b74\u306e\u3042\u308b\u7a0b\u5ea6\u3042\u3063\u305f\u308a\u3059\u308b\u3093\u3067\u3059\u304c\u3001\u307e\u3060\u307e\u3060\u77e5\u3089\u306a\u3044\u3053\u3068\u3060\u3089\u3051\u3067\u3001\u3053\u306e\u9593\u3082\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u3053\u3068\u304c\u3042\u308a\u307e\u3057\u305f\u3002 \u3048\uff01\u305d\u3093\u306a\u4fbf\u5229\u306a\u30e4\u30c4\u3042\u3093\u306e\uff01\uff1f\uff08\u3057\u304b\u3082 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blog.capilano-fw.com\/?p=12105\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;Amazon S3 \u306e\u958b\u767a\u74b0\u5883\u3068\u3057\u3066 MinIO \u3092 VPS \u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":12118,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-12105","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-laravel"],"_links":{"self":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/12105","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=12105"}],"version-history":[{"count":6,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/12105\/revisions"}],"predecessor-version":[{"id":12123,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/12105\/revisions\/12123"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/media\/12118"}],"wp:attachment":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=12105"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=12105"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=12105"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}