zoukankan      html  css  js  c++  java
  • Centos下安装 .net Core运行程序

    首先要进行更新下镜像文件

    sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
    sudo sh -c 'echo -e "[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" > /etc/yum.repos.d/dotnetdev.repo'
    

    [root@localhost /]# rpm --import https://packages.microsoft.com/keys/microsoft.asc
    [root@localhost /]# sh -c 'echo -e "[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" > /etc/yum.repos.d/dotnetdev.repo'

     

     接着就可以直接安装了

    Install the .NET SDK

    Update the products available for installation, install the components required by .NET, then install the .NET SDK.

    In your command prompt, run the following commands:

    sudo yum update
    sudo yum install libunwind libicu
    sudo yum install dotnet-sdk-2.1.103
    

      

    A command will be run during the install process that will improve project restore speed and enable offline access. It will take up to a minute to complete.
    验证中 : aspnetcore-store-2.0.6-2.0.6-1.x86_64 1/8
    验证中 : dotnet-runtime-2.0.6-2.0.6-1.x86_64 2/8
    验证中 : dotnet-hostfxr-2.0.6-2.0.6-1.x86_64 3/8
    验证中 : aspnetcore-store-2.0.5-2.0.5-1.x86_64 4/8
    验证中 : aspnetcore-store-2.0.3-2.0.3-1.x86_64 5/8
    验证中 : dotnet-sdk-2.1.103-2.1.103-1.x86_64 6/8
    验证中 : dotnet-host-2.1.0_preview1_26216_03-1.x86_64 7/8
    验证中 : aspnetcore-store-2.0.0-2.0.0-1.x86_64 8/8

    已安装:
    dotnet-sdk-2.1.103.x86_64 0:2.1.103-1

    作为依赖被安装:
    aspnetcore-store-2.0.0.x86_64 0:2.0.0-1 aspnetcore-store-2.0.3.x86_64 0:2.0.3-1 aspnetcore-store-2.0.5.x86_64 0:2.0.5-1 aspnetcore-store-2.0.6.x86_64 0:2.0.6-1
    dotnet-host.x86_64 0:2.1.0_preview1_26216_03-1 dotnet-hostfxr-2.0.6.x86_64 0:2.0.6-1 dotnet-runtime-2.0.6.x86_64 0:2.0.6-1

    好了,现在你可以运行donet命令进行测试了,默认安装目录在/usr/share/dotnet下面

    dotnet --version#查看版本
    dotnet --info #查看安装的信息
    dotnet new razor #可以创建一个razorPage项目,

      

  • 相关阅读:
    PHP把数组按指定的个数分隔
    主题模型(LDA)(一)--通俗理解与简单应用
    用户活跃度下降40%!七问新浪微博
    天才罗素:知识面横跨哲学 数学和文学 最懂的却是女人
    金刚经---现代解读
    离散数学
    交易已无秘密 一个期货高手的终极感悟
    一位资深交易员的投资感悟(建议收藏)
    F1 score,micro F1score,macro F1score 的定义
    以前曾看到过一个期货童话故事,很有意思,发上来
  • 原文地址:https://www.cnblogs.com/kingkoo/p/8751639.html
Copyright © 2011-2022 走看看