Asp.net core runs on Ubuntu and coreubuntu

Source: Internet
Author: User

Asp.net core runs on Ubuntu and coreubuntu

Environment:

  • Ubuntu 16.04
  • Dotnet-dev-1.0.0-preview2-003121
  • Visual Studio 2015 update 3

 

Ubuntu installation. net core reference: https://www.microsoft.com/net/core#ubuntu

1. Add Source

sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet/ xenial main" > /etc/apt/sources.list.d/dotnetdev.list'sudo apt-key adv --keyserver apt-mo.trafficmanager.net --recv-keys 417A0893sudo apt-get update

 

2. Installation

sudo apt-get install dotnet-dev-1.0.0-preview2-003121

 

3. Upload the program to the/home/zulin/dotnet directory.

Release

 

 

 

Run restore and run

dotnet coredemo.dll

4. Configure the nginx proxy

# Install sudo apt-get install nginx

# Configure sudo nano/etc/nginx/sites-available/default # add it to the backend server {# Port and domain listen 8080; server_name aspnet. local; # Path to the wwwroot folder root/home/zulin/dotnet/wwwroot; # Pass requests to Kestrel location/{proxy_pass http: // 127.0.0.1: 5000; proxy_set_header Connection ""; proxy_http_version 1.1 ;}}

 

# Restart sudo service nginx restart

 

Now you can view it in the browser.

Http://xxx.xxx.xxx.xxx: 8080

 

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.