zoukankan      html  css  js  c++  java
  • unbuntu(18.04)下体验dotnet core

    一、切换阿里云的源

    1.查看unbuntu版本 

     2.备份 /etc/apt/sources.list 并将此文件的内容替换为

    deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
    
    deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
    
    deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
    
    deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
    
    deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

    最新情况了解:https://opsx.alibaba.com/guide?lang=zh-CN&document=69a2341e-801e-11e8-8b5a-00163e04cdbb

    3.更新软件列表:

    sudo apt-get update

    二、安装DotNetCore SDK

    1.在此之前先要注册微软的密钥和产品库,以及安装所需的依赖

    wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
    sudo dpkg -i packages-microsoft-prod.deb

    2.更新包并安装sdk

    sudo add-apt-repository universe
    sudo apt-get update
    sudo apt-get install apt-transport-https
    sudo apt-get update
    sudo apt-get install dotnet-sdk-3.0

    3.运行dotnet工具,检查是否安装成功

    三、第一个  asp.net core mvc程序

    1.创建hellmvc目录,并使用模板创建应用程序

     

     2.发布

     3.运行,进入publish目录运行以下命令,服务已经开始在5000和5001端口监听

     4.打开浏览器输入:http://localhost:5000

     

    SQL Server
  • 相关阅读:
    老陈与小石头运算代码
    第五次作业
    老陈与小石头
    简易四则运算
    四则运算
    对git的认识
    第一次作业
    arcgis-tomcat-cors
    jquery deferred promise
    springloaded hot deploy
  • 原文地址:https://www.cnblogs.com/zlgan/p/11631081.html
Copyright © 2011-2022 走看看