{"id":318,"date":"2021-06-10T18:01:46","date_gmt":"2021-06-10T09:01:46","guid":{"rendered":"https:\/\/centos.ihavenomoney.co.kr\/?page_id=318"},"modified":"2021-06-11T11:19:21","modified_gmt":"2021-06-11T02:19:21","slug":"install-the-net-sdk-or-the-net-runtime-on-centos-7","status":"publish","type":"page","link":"https:\/\/centos.ihavenomoney.co.kr\/?page_id=318","title":{"rendered":"Install the .NET SDK or the .NET Runtime on CentOS 7"},"content":{"rendered":"<h4>CentOS 7 \uc5d0 NetCore5.0 \uc744 \uc124\uce58\ud574 \ubcf4\uc790<\/h4>\n<h4>remark :<\/h4>\n<p>CentOS 7 \uc640 CentOS 8 \uc124\uce58 \ubc29\ubc95\uc774 \ub2e4\ub974\ub2e4.<\/p>\n<h3>1.Install MS package signing key<\/h3>\n<pre class=\"lang:vim decode:true \">sudo rpm -Uvh https:\/\/packages.microsoft.com\/config\/centos\/7\/packages-microsoft-prod.rpm\r\n<\/pre>\n<h3>2. Install the SDK<\/h3>\n<pre class=\"lang:vim decode:true \">sudo yum install dotnet-sdk-5.0\r\n<\/pre>\n<h3>3. Version \ud655\uc778<\/h3>\n<pre class=\"lang:vim decode:true\">[root@localhost]# dotnet --version\r\n5.0.301\r\n<\/pre>\n<h3>4.Helloworld\u00a0 Test<\/h3>\n<pre class=\"lang:vim decode:true \">[root@localhost www]# dotnet new console -o helloworld\r\n\r\nWelcome to .NET 5.0!\r\n---------------------\r\nSDK Version: 5.0.301\r\n\r\nTelemetry\r\n---------\r\nThe .NET tools collect usage data in order to help us improve your experience. It is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.\r\n\r\nRead more about .NET CLI Tools telemetry: https:\/\/aka.ms\/dotnet-cli-telemetry\r\n\r\n----------------\r\nInstalled an ASP.NET Core HTTPS development certificate.\r\nTo trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only).\r\nLearn about HTTPS: https:\/\/aka.ms\/dotnet-https\r\n----------------\r\nWrite your first app: https:\/\/aka.ms\/dotnet-hello-world\r\nFind out what's new: https:\/\/aka.ms\/dotnet-whats-new\r\nExplore documentation: https:\/\/aka.ms\/dotnet-docs\r\nReport issues and find source on GitHub: https:\/\/github.com\/dotnet\/core\r\nUse 'dotnet --help' to see available commands or visit: https:\/\/aka.ms\/dotnet-cli\r\n--------------------------------------------------------------------------------------\r\nGetting ready...\r\nThe template \"Console Application\" was created successfully.\r\n\r\nProcessing post-creation actions...\r\nRunning 'dotnet restore' on helloworld\/helloworld.csproj...\r\n  Determining projects to restore...\r\n  Restored \/var\/www\/helloworld\/helloworld.csproj (in 286 ms).\r\nRestore succeeded.\r\n\r\n[root@localhost www]# cd helloworld\r\n[root@localhost helloworld]# dotnet run\r\nHello World!\r\n<\/pre>\n<h3>5. Microsoft Visual Studio Community 2019 \ub85c \ub9cc\ub4e4\uc5b4\u00a0 \uc62c\ub824 \ubcf4\uae30<\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-324\" src=\"https:\/\/centos.ihavenomoney.co.kr\/wp-content\/uploads\/2021\/06\/NetCore50-1024x745.jpg\" alt=\"\" width=\"1024\" height=\"745\" srcset=\"https:\/\/centos.ihavenomoney.co.kr\/wp-content\/uploads\/2021\/06\/NetCore50-1024x745.jpg 1024w, https:\/\/centos.ihavenomoney.co.kr\/wp-content\/uploads\/2021\/06\/NetCore50-300x218.jpg 300w, https:\/\/centos.ihavenomoney.co.kr\/wp-content\/uploads\/2021\/06\/NetCore50-768x559.jpg 768w, https:\/\/centos.ihavenomoney.co.kr\/wp-content\/uploads\/2021\/06\/NetCore50.jpg 1233w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<h3>6.\uc18c\uc2a4 \uc218\uc815 .UseUrls(&#8220;http:\/\/*:5000&#8221;)\ucd94\uac00<\/h3>\n<pre class=\"lang:vim decode:true \">.UseUrls(\"httpublic static IHostBuilder CreateHostBuilder(string[] args) =&gt;\r\n            Host.CreateDefaultBuilder(args)\r\n                .ConfigureWebHostDefaults(webBuilder =&gt;\r\n                {\r\n                    webBuilder.UseStartup&lt;Startup&gt;()\r\n                              .UseUrls(\"http:\/\/*:5000\");\r\n                });\r\n<\/pre>\n<h3>7. \ubc29\ud654\ubcbd \uc624\ud508 : tcp 5000 <\/h3>\n<h3>8.\uc6f9\uc5d0\uc11c \ud655\uc778<\/h3>\n<pre class=\"lang:vim decode:true \" >[root@localhost helloworld]# dotnet run\r\nBuilding...\r\ninfo: Microsoft.Hosting.Lifetime[0]\r\n      Now listening on: http:\/\/[::]:5000\r\ninfo: Microsoft.Hosting.Lifetime[0]\r\n      Application started. Press Ctrl+C to shut down.\r\ninfo: Microsoft.Hosting.Lifetime[0]\r\n      Hosting environment: Development\r\ninfo: Microsoft.Hosting.Lifetime[0]\r\n      Content root path: \/var\/www\/helloworld\r\n<\/pre>\n<h3>http:\/\/111.222.222.222:5000<\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/centos.ihavenomoney.co.kr\/wp-content\/uploads\/2021\/06\/netcore5_web-e1623377839513.png\" alt=\"\" width=\"797\" height=\"711\" class=\"alignnone size-full wp-image-325\" srcset=\"https:\/\/centos.ihavenomoney.co.kr\/wp-content\/uploads\/2021\/06\/netcore5_web-e1623377839513.png 797w, https:\/\/centos.ihavenomoney.co.kr\/wp-content\/uploads\/2021\/06\/netcore5_web-e1623377839513-300x268.png 300w, https:\/\/centos.ihavenomoney.co.kr\/wp-content\/uploads\/2021\/06\/netcore5_web-e1623377839513-768x685.png 768w\" sizes=\"auto, (max-width: 797px) 100vw, 797px\" \/><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>CentOS 7 \uc5d0 NetCore5.0 \uc744 \uc124\uce58\ud574 \ubcf4\uc790 remark : CentOS 7 \uc640 CentOS 8 \uc124\uce58 \ubc29\ubc95\uc774 \ub2e4\ub974\ub2e4. 1.Install MS package signing key sudo rpm -Uvh https:\/\/packages.microsoft.com\/config\/centos\/7\/packages-microsoft-prod.rpm 2. Install the SDK sudo yum install dotnet-sdk-5.0 3. Version \ud655\uc778 [root@localhost]# dotnet &#8211;version 5.0.301 4.Helloworld\u00a0 Test [root@localhost www]# dotnet new console -o helloworld Welcome to .NET 5.0! &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; &hellip;<br \/><a href=\"https:\/\/centos.ihavenomoney.co.kr\/?page_id=318\" class=\"more-link pen_button pen_element_default pen_icon_arrow_double\"><span class=\"screen-reader-text\">Install the .NET SDK or the .NET Runtime on CentOS 7<\/span> \ub354\ubcf4\uae30<\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-318","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/centos.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/pages\/318","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/centos.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/centos.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/centos.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/centos.ihavenomoney.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=318"}],"version-history":[{"count":9,"href":"https:\/\/centos.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/pages\/318\/revisions"}],"predecessor-version":[{"id":330,"href":"https:\/\/centos.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/pages\/318\/revisions\/330"}],"wp:attachment":[{"href":"https:\/\/centos.ihavenomoney.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=318"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}