(a) 2, install. NET Core

Source: Internet
Author: User
Tags dotnet

Then we have to use the ASP. NET core, we need to install the relevant environment, do not say anything, the installation instructions (official documents), select the appropriate version of the good

1. Add The dotnet product feed

Start to install according to official documents, there is a problem to find the official website is correct

[Email protected]:/# Curl HTTPS://PACKAGES.MICROSOFT.COM/KEYS/MICROSOFT.ASC | GPG--dearmor > Microsoft.gpg[email protected]:/# sudo mv microsoft.gpg/etc/apt/trusted.gpg.d/microsoft.gpg

Well, you've succeeded in attracting my attention, and here's a hint that if you don't have curl installed, follow the prompts to install it, and then press "Y" to confirm the selection.

[Email protected]:/# apt Install curl

And then one more time.

[Email protected]:/# Curl HTTPS://PACKAGES.MICROSOFT.COM/KEYS/MICROSOFT.ASC | GPG--dearmor > Microsoft.gpg[email protected]:/# sudo mv microsoft.gpg/etc/apt/trusted.gpg.d/microsoft.gpg

Select the appropriate Ubuntu version

[Email protected]:/# sudo sh-c ' echo ' Deb [ARCH=AMD64] https://packages.microsoft.com/repos/ Microsoft-ubuntu-xenial-prod xenial Main ">/etc/apt/sources.list.d/dotnetdev.list"

2. Install the. NET SDK (with select "Y" confirmation)
[Email protected]:/# sudo apt-get update[email protected]:/# sudo apt-get install dotnet-sdk-2.0.2

3. Create your App (test)
[Email protected]:/# dotnet new console-o myapp[email protected]:/# cd myApp
[Email protected]:/myapp# dotnet Run

See so two lines, can say is quite excited, explain our, no, is my. NET core environment build successfully!!

But what I want is a website? Don't worry, come on.

[Email protected]:/myapp# CD/home[email protected]:/home# dotnet New razor-o aspnetcoreapp[email protected]:/< c2>home# CD aspnetcoreapp[email protected]:/home/aspnetcoreapp# dotnet run  

See here I am also very excited, all smooth, red box is listening to the local 5000 port, indicating that the site has been running, and then we will first quit, follow the prompts, CTRL + C can exit, but please note that this is only used for testing purposes

If you want to actually see the Web page on your browser, Let's go to the next section. install Jexus, then go!

(a) 2, install. NET Core

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.