.NET 9.0 : Install2025/02/12 |
Install .NET. |
|
[1] | Install .NET 9.0 and run helloworld sample app. |
[root@dlp ~]# dnf -y install dotnet-runtime-9.0 dotnet-hostfxr-9.0 dotnet-sdk-9.0 dotnet-targeting-pack-9.0 dotnet-templates-9.0 Dependencies resolved. ================================================================================================================================ Package Architecture Version Repository Size ================================================================================================================================ Installing: dotnet-hostfxr-9.0 x86_64 9.0.1-2.el10 appstream 146 k dotnet-sdk-9.0 x86_64 9.0.102-2.el10 appstream 81 M dotnet-targeting-pack-9.0 x86_64 9.0.1-2.el10 appstream 3.0 M dotnet-templates-9.0 x86_64 9.0.102-2.el10 appstream 2.6 M Installing dependencies: aspnetcore-runtime-9.0 x86_64 9.0.1-2.el10 appstream 7.8 M aspnetcore-targeting-pack-9.0 x86_64 9.0.1-2.el10 appstream 1.9 M dotnet-apphost-pack-9.0 x86_64 9.0.1-2.el10 appstream 3.8 M dotnet-runtime-9.0 x86_64 9.0.1-2.el10 appstream 24 M Transaction Summary ================================================================================================================================ Install 8 Packages ..... .....[root@dlp ~]# dotnet --version 9.0.102 # verify to create Hello World [root@dlp ~]# dotnet new console -o helloworld Welcome to .NET 9.0! --------------------- SDK Version: 9.0.102 ---------------- Installed an ASP.NET Core HTTPS development certificate. To trust the certificate, run 'dotnet dev-certs https --trust' Learn about HTTPS: https://aka.ms/dotnet-https ---------------- Write your first app: https://aka.ms/dotnet-hello-world Find out what's new: https://aka.ms/dotnet-whats-new Explore documentation: https://aka.ms/dotnet-docs Report issues and find source on GitHub: https://github.com/dotnet/core Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cli -------------------------------------------------------------------------------------- The template "Console App" was created successfully. Processing post-creation actions... Restoring /root/helloworld/helloworld.csproj: Restore succeeded.[root@dlp ~]# cd helloworld [root@dlp helloworld]# dotnet run Hello, World! |
[2] | Try to create ASP.NET sample app with any common user. |
[cent@dlp ~]$ dotnet new razor -o asp.net Welcome to .NET 9.0! --------------------- SDK Version: 9.0.102 ---------------- Installed an ASP.NET Core HTTPS development certificate. To trust the certificate, run 'dotnet dev-certs https --trust' Learn about HTTPS: https://aka.ms/dotnet-https ---------------- Write your first app: https://aka.ms/dotnet-hello-world Find out what's new: https://aka.ms/dotnet-whats-new Explore documentation: https://aka.ms/dotnet-docs Report issues and find source on GitHub: https://github.com/dotnet/core Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cli -------------------------------------------------------------------------------------- The template "ASP.NET Core Web App (Razor Pages)" was created successfully. This template contains technologies from parties other than Microsoft, see https://aka.ms/aspnetcore/9.0-third-party-notices for details. Processing post-creation actions... Restoring /home/cent/asp.net/asp.net.csproj: Restore succeeded.[cent@dlp ~]$ cd asp.net [cent@dlp asp.net]$ dotnet run --urls=http://0.0.0.0:5000/ Using launch settings from /home/cent/asp.net/Properties/launchSettings.json... Building... info: Microsoft.Hosting.Lifetime[14] Now listening on: http://0.0.0.0:5000 info: Microsoft.Hosting.Lifetime[0] Application started. Press Ctrl+C to shut down. info: Microsoft.Hosting.Lifetime[0] Hosting environment: Development info: Microsoft.Hosting.Lifetime[0] Content root path: /home/cent/asp.net |
Access to the URL you set from any client computer, and then that's OK if following site is shown. |
![]() |
Sponsored Link |
|