Build an ASP. NET Core cross-platform runtime environment in Linux (Ubuntu)

Source: Internet
Author: User

Build an ASP. NET Core cross-platform runtime environment in Linux (Ubuntu)

You do not need to install mono. in Linux (Ubuntu), you can build an ASP. NET Core environment to continue. NET cross-platform

Previous Article: Use VS Code to Develop ASP. NET Core applications

Today, let's take a look at ASP. NET Core running in Ubuntu. You do not need to install mono.

Environment

Ubuntu 14.04.4 LTS server version is a new installation system.

: Http://mirrors.neusoft.edu.cn/ubuntu-releases/14.04.4/ubuntu-14.04.4-server-amd64.iso

You can also download the desktop version for installation.

: Http://mirrors.neusoft.edu.cn/ubuntu-releases/14.04.4/

Install DNVM

First, make sure that unzip and curl are installed.

sudo apt-get install unzip curl

Download and install DNVM

curl -sSL https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.sh | DNX_BRANCH=dev sh && source ~/.dnx/dnvm/dnvm.sh

If you run dnvm after the installation is complete, the installation is successful.

Install DNX

Install DNX for. NET Core

1. install necessary environment for dnx

sudo apt-get install libunwind8 gettext libssl-dev libcurl4-openssl-dev zlib1g libicu-dev uuid-dev

2. Use DNVM to install DNX for. NET Core

dnvm upgrade -r coreclr
Install libuv
sudo apt-get install make automake libtool curlcurl -sSL https://github.com/libuv/libuv/archive/v1.8.0.tar.gz | sudo tar zxfv - -C /usr/local/srccd /usr/local/src/libuv-1.8.0sudo sh autogen.shsudo ./configuresudo makesudo make installsudo rm -rf /usr/local/src/libuv-1.8.0 && cd ~/sudo ldconfig 

Now the environment has been installed. We will deploy the project.

Upload the project to ubuntu.

Go to the project directory and run the following command.

dnu restorednu build --framework dnxcore50dnx web 

Run successfully:

 

Reference:

Https://docs.asp.net/en/latest/getting-started/installing-on-linux.html

This article permanently updates the link address:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.