{"id":1702,"date":"2019-09-27T18:58:22","date_gmt":"2019-09-27T09:58:22","guid":{"rendered":"http:\/\/idealive.jp\/blog\/?p=1702"},"modified":"2019-09-21T17:25:10","modified_gmt":"2019-09-21T08:25:10","slug":"c-net-core-linux%e7%92%b0%e5%a2%83","status":"publish","type":"post","link":"https:\/\/idealive.jp\/blog\/2019\/09\/27\/c-net-core-linux%e7%92%b0%e5%a2%83\/","title":{"rendered":"C# .NET Core + Linux\u74b0\u5883"},"content":{"rendered":"<p>\u3053\u3093\u3070\u3093\u306f\u3002\u4eca\u56de\u306f\u524d\u56de\u4f5c\u6210\u3057\u305fWindows\u4e0a\u3067\u4f5c\u6210\u3057\u305fWeb\u30a2\u30d7\u30ea\u3092Linux\u74b0\u5883\u306b\u30c7\u30d7\u30ed\u30a4\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<h6><\/h6>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">\u76ee\u6b21<\/p>\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-6'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/idealive.jp\/blog\/2019\/09\/27\/c-net-core-linux%e7%92%b0%e5%a2%83\/#Linux%E7%92%B0%E5%A2%83%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB\" >Linux\u74b0\u5883\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-6'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/idealive.jp\/blog\/2019\/09\/27\/c-net-core-linux%e7%92%b0%e5%a2%83\/#Nginx%E3%81%AE%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB\" >Nginx\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-6'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/idealive.jp\/blog\/2019\/09\/27\/c-net-core-linux%e7%92%b0%e5%a2%83\/#%E3%82%A2%E3%83%97%E3%83%AA%E3%82%B1%E3%83%BC%E3%82%B7%E3%83%A7%E3%83%B3%E3%81%AE%E7%99%BA%E8%A1%8C\" >\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u767a\u884c<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-6'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/idealive.jp\/blog\/2019\/09\/27\/c-net-core-linux%e7%92%b0%e5%a2%83\/#%E3%81%8A%E3%82%8F%E3%82%8A%E3%81%AB\" >\u304a\u308f\u308a\u306b<\/a><\/li><\/ul><\/nav><\/div>\n<h6><span class=\"ez-toc-section\" id=\"Linux%E7%92%B0%E5%A2%83%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB\"><\/span>Linux\u74b0\u5883\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<span class=\"ez-toc-section-end\"><\/span><\/h6>\n<p>AWS EC2\u3067Ubuntu18.04\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u8d77\u52d5\u3057\u307e\u3059\u3002.NETCore\u306f\u4e0b\u8a18\u306e\u30b5\u30a4\u30c8\u3092\u53c2\u8003\u306b\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3057\u305f\u3002<\/p>\n<p><a href=\"https:\/\/github.com\/dotnet\/core\/blob\/master\/release-notes\/3.0\/preview\/3.0.0-preview7-download.md\">\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8<\/a><\/p>\n<p>Runtime\u306b\u306f\u3001dotnet-runtime-3.0\u3068aspnetcore-runtime-3.0\u3068\u306a\u3063\u3066\u3044\u308b\u304c\u4f9d\u5b58\u95a2\u4fc2\u304c\u3042\u3063\u3066\u7d50\u5c40dotnet-host\u3068dotnet-hostfxr\u3082\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u3053\u308c\u3067Linux\u4e0a\u3067\u3082dotnet\u30b3\u30de\u30f3\u30c9\u304c\u5b9f\u884c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002\u3053\u3093\u306a\u611f\u3058\u3067\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1700\" src=\"https:\/\/idealive.jp\/blog\/wp-content\/uploads\/2019\/07\/dotnet06.png\" alt=\"\" width=\"830\" height=\"425\" srcset=\"https:\/\/idealive.jp\/blog\/wp-content\/uploads\/2019\/07\/dotnet06.png 830w, https:\/\/idealive.jp\/blog\/wp-content\/uploads\/2019\/07\/dotnet06-300x154.png 300w, https:\/\/idealive.jp\/blog\/wp-content\/uploads\/2019\/07\/dotnet06-768x393.png 768w\" sizes=\"(max-width: 830px) 100vw, 830px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h6><span class=\"ez-toc-section\" id=\"Nginx%E3%81%AE%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB\"><\/span>Nginx\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<span class=\"ez-toc-section-end\"><\/span><\/h6>\n<p>Apache\u3067\u3082\u826f\u304b\u3063\u305f\u306e\u3067\u3059\u304c\u3001\u4eca\u56de\u306f\u3059\u3050\u306b\u52d5\u304b\u305b\u308bNginx\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3057\u305f\u3002\/etc\/nginx\/site-available\/default\u3092\u5909\u66f4\u3057\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-1704\" src=\"https:\/\/idealive.jp\/blog\/wp-content\/uploads\/2019\/07\/dotnet07-1024x343.png\" alt=\"\" width=\"1024\" height=\"343\" srcset=\"https:\/\/idealive.jp\/blog\/wp-content\/uploads\/2019\/07\/dotnet07-1024x343.png 1024w, https:\/\/idealive.jp\/blog\/wp-content\/uploads\/2019\/07\/dotnet07-300x100.png 300w, https:\/\/idealive.jp\/blog\/wp-content\/uploads\/2019\/07\/dotnet07-768x257.png 768w, https:\/\/idealive.jp\/blog\/wp-content\/uploads\/2019\/07\/dotnet07.png 1123w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h6><span class=\"ez-toc-section\" id=\"%E3%82%A2%E3%83%97%E3%83%AA%E3%82%B1%E3%83%BC%E3%82%B7%E3%83%A7%E3%83%B3%E3%81%AE%E7%99%BA%E8%A1%8C\"><\/span>\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u767a\u884c<span class=\"ez-toc-section-end\"><\/span><\/h6>\n<p>Windows\u4e0a\u306e\u958b\u767a\u74b0\u5883\u304b\u3089\u300cdotnet publish &#8211;configuration Release\u300d\u3068\u30bf\u30fc\u30df\u30ca\u30eb\u3067\u30b3\u30de\u30f3\u30c9\u3092\u6253\u3061\u307e\u3059\u3002\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u30d5\u30a9\u30eb\u30c0\u306ebin\/Release\/netcoreapp3.0\/publish\u914d\u4e0b\u306b\u30d5\u30a1\u30a4\u30eb\u304c\u4f5c\u6210\u3055\u308c\u307e\u3059\u3002\u3053\u308c\u3092\u307e\u3068\u3081\u3066Linux\u74b0\u5883\u306b\u8ee2\u9001\u3057\u307e\u3059\u3002<\/p>\n<p>\u8ee2\u9001\u5f8c\u306f\u89e3\u51cd\u3057\u3066\u3001\/var\/www\/SampleApp\u914d\u4e0b\u306b\u79fb\u52d5\u3055\u305b\u307e\u3059\u3002\u30d5\u30a1\u30a4\u30eb\u306e\u6a29\u9650\u306fwww-data:www-data\u306b\u5909\u66f4\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1705\" src=\"https:\/\/idealive.jp\/blog\/wp-content\/uploads\/2019\/07\/dotnet09.png\" alt=\"\" width=\"981\" height=\"373\" srcset=\"https:\/\/idealive.jp\/blog\/wp-content\/uploads\/2019\/07\/dotnet09.png 981w, https:\/\/idealive.jp\/blog\/wp-content\/uploads\/2019\/07\/dotnet09-300x114.png 300w, https:\/\/idealive.jp\/blog\/wp-content\/uploads\/2019\/07\/dotnet09-768x292.png 768w\" sizes=\"(max-width: 981px) 100vw, 981px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>\u307e\u305a\u300csudo service nginx start\u300d\u3067nginx\u3092\u8d77\u52d5\u3057\u307e\u3059\u3002\u6b21\u306b\u300cdotnet Sample.dll\u300d\u3067\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u8d77\u52d5\u3057\u307e\u3059\u3002\u8d77\u52d5\u6642\u306e\u30ed\u30b0\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1706\" src=\"https:\/\/idealive.jp\/blog\/wp-content\/uploads\/2019\/07\/dotnet10.png\" alt=\"\" width=\"955\" height=\"282\" srcset=\"https:\/\/idealive.jp\/blog\/wp-content\/uploads\/2019\/07\/dotnet10.png 955w, https:\/\/idealive.jp\/blog\/wp-content\/uploads\/2019\/07\/dotnet10-300x89.png 300w, https:\/\/idealive.jp\/blog\/wp-content\/uploads\/2019\/07\/dotnet10-768x227.png 768w\" sizes=\"(max-width: 955px) 100vw, 955px\" \/><\/p>\n<p>\u3042\u3068\u306f\u30d6\u30e9\u30a6\u30b6\u304b\u3089\u300chttp:\/\/[EC2\u306e\u30d1\u30d6\u30ea\u30c3\u30afDNS]\/\u300d\u3067\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3068\u524d\u56de\u30ed\u30fc\u30ab\u30eb\u3067\u52d5\u304b\u3057\u305f\u3068\u304d\u3068\u540c\u3058\u753b\u9762\u304c\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002\uff08EC2\u306e\u30a4\u30f3\u30d0\u30a6\u30f3\u30c9\u306e\u30eb\u30fc\u30eb\u306f\u5909\u66f4\u3057\u3066\u304f\u3060\u3055\u3044\uff09<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-1707\" src=\"https:\/\/idealive.jp\/blog\/wp-content\/uploads\/2019\/07\/dotnet11-1024x419.png\" alt=\"\" width=\"1024\" height=\"419\" srcset=\"https:\/\/idealive.jp\/blog\/wp-content\/uploads\/2019\/07\/dotnet11-1024x419.png 1024w, https:\/\/idealive.jp\/blog\/wp-content\/uploads\/2019\/07\/dotnet11-300x123.png 300w, https:\/\/idealive.jp\/blog\/wp-content\/uploads\/2019\/07\/dotnet11-768x315.png 768w, https:\/\/idealive.jp\/blog\/wp-content\/uploads\/2019\/07\/dotnet11.png 1443w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h6><span class=\"ez-toc-section\" id=\"%E3%81%8A%E3%82%8F%E3%82%8A%E3%81%AB\"><\/span>\u304a\u308f\u308a\u306b<span class=\"ez-toc-section-end\"><\/span><\/h6>\n<p>Windows\u4e0a\u3067\u4f5c\u6210\u3057\u305f.NETCore\u306e\u30a2\u30d7\u30ea\u3092Linux\u74b0\u5883\u3067\u52d5\u4f5c\u3059\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u307e\u3057\u305f\u3002\u601d\u3063\u3066\u3044\u305f\u4ee5\u4e0a\u306b\u7c21\u5358\u306b\u52d5\u4f5c\u3055\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u3093\u3070\u3093\u306f\u3002\u4eca\u56de\u306f\u524d\u56de\u4f5c\u6210\u3057\u305fWindows\u4e0a\u3067\u4f5c\u6210\u3057\u305fWeb\u30a2\u30d7\u30ea\u3092Linux\u74b0\u5883\u306b\u30c7\u30d7\u30ed\u30a4\u3057\u3066\u307f\u307e\u3059\u3002 Linux\u74b0\u5883\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb AWS EC2\u3067Ubuntu18.04\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u8d77\u52d5\u3057\u307e\u3059\u3002.NETCore\u306f\u4e0b&#8230;<a class=\"read-more-link button\" href=\"https:\/\/idealive.jp\/blog\/2019\/09\/27\/c-net-core-linux%e7%92%b0%e5%a2%83\/\">\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":8,"featured_media":1711,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,12],"tags":[27,26],"class_list":["post-1702","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-app-dev","category-x-platform","tag-net-core","tag-c"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/idealive.jp\/blog\/wp-json\/wp\/v2\/posts\/1702"}],"collection":[{"href":"https:\/\/idealive.jp\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/idealive.jp\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/idealive.jp\/blog\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/idealive.jp\/blog\/wp-json\/wp\/v2\/comments?post=1702"}],"version-history":[{"count":2,"href":"https:\/\/idealive.jp\/blog\/wp-json\/wp\/v2\/posts\/1702\/revisions"}],"predecessor-version":[{"id":1709,"href":"https:\/\/idealive.jp\/blog\/wp-json\/wp\/v2\/posts\/1702\/revisions\/1709"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/idealive.jp\/blog\/wp-json\/wp\/v2\/media\/1711"}],"wp:attachment":[{"href":"https:\/\/idealive.jp\/blog\/wp-json\/wp\/v2\/media?parent=1702"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/idealive.jp\/blog\/wp-json\/wp\/v2\/categories?post=1702"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/idealive.jp\/blog\/wp-json\/wp\/v2\/tags?post=1702"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}