Preloader
Tel. 951986398 E-Mail roberto.aguirre@bksistemas.com

Instalar Microsoft .NET Core 3.0 en Linux.

[1]Instalar .NET Core 3.0.

[root@dlp ~] # yum -y install deltarpm unzip zlib gettext libunwind libicu libcurl-devel openssl-devel libicu-devel

[root@dlp ~] # rpm –import https://packages.microsoft.com/keys/microsoft.asc

[root@dlp ~] # cat > /etc/yum.repos.d/dotnetdev.repo <<EOF

[packages-microsoft-com-prod]

name=packages-microsoft-com-prod
baseurl=https://packages.microsoft.com/yumrepos/microsoft-rhel7.3-prod
enabled=1
gpgcheck=1
gpgkey=https://packages.microsoft.com/keys/microsoft.asc
EOF

[root@dlp ~] # yum -y install dotnet-sdk-3.0

[root@dlp ~] # echo ‘export PATH=$PATH:$HOME/dotnet’ > /etc/profile.d/dotnetdev.sh

[root@dlp ~] # source /etc/profile.d/dotnetdev.sh

[root@dlp ~] # dotnet –version
3.0.102

[2]Run sample console application for test with a common user.

[cent@dlp ~]$ dotnet new console -o helloworld

Welcome to .NET Core 3.0!
---------------------
SDK Version: 3.0.102

Telemetry
---------
The .NET Core tools collect usage data in order to help us improve your experience. The data is anonymous. 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.

Read more about .NET Core CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry

----------------
Explore documentation: https://aka.ms/dotnet-docs
Report issues and find source on GitHub: https://github.com/dotnet/core
Find out what's new: https://aka.ms/dotnet-whats-new
Learn about the installed HTTPS developer cert: https://aka.ms/aspnet-core-https
Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cli-docs
Write your first app: https://aka.ms/first-net-core-app
--------------------------------------------------------------------------------------
Getting ready...
The template "Console Application" was created successfully.

Processing post-creation actions...
Running 'dotnet restore' on helloworld/helloworld.csproj...
  Restore completed in 1.41 sec for /home/cent/helloworld/helloworld.csproj.

Restore succeeded.

[cent@dlp ~] $ cd helloworld

[cent@dlp helloworld] $ dotnet run
Hello World!

[3]Run sample ASP.NET Core Web application for test with a common user.

[cent@dlp ~]$ dotnet new razor -o asp.net

The template "ASP.NET Core Web App" was created successfully.
This template contains technologies from parties other than Microsoft, see https://aka.ms/aspnetcore/3.0-third-party-notices for details.

Processing post-creation actions...
Running 'dotnet restore' on asp.net/asp.net.csproj...
  Restore completed in 79.08 ms for /home/cent/asp.net/asp.net.csproj.

Restore succeeded.

[cent@dlp ~] $ cd asp.net

$ dotnet run

.....
.....
info: Microsoft.Hosting.Lifetime[0]
      Now listening on: http://localhost: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 [http://localhost:5000], then following page is shown.

Close

BKSistemas

Servicios IT