. Net Core Ubuntu 14.04 deployment process, ubuntu14.04

Source: Internet
Author: User

. Net Core Ubuntu 14.04 deployment process, ubuntu14.04
No. 1 prepare the application

1. Create a. Net Core Web Project

Sudo sh-c 'echo "deb [arch = amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ trusty main">/etc/apt/sources. list. d/dotnetdev. list 'sudo apt-key adv -- keyserver hkp: // keyserver.ubuntu.com: 80 -- recv-keys ~a0893sudo apt-get update

2. Install. Net Core SDK

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

Dotnet -- version

Mkdir NetWebcd NetWebdotnet new

 

5. Run the sample program

dotnet restoredotnet run

Note: Because I installed Ubuntu In the VM, I can directly copy files. In the production environment, I can use ftp to upload files. How can I set up my own Baidu.

 

No. 4 run & access
dotnet ***.dll

* **. Dll is the entry Link Library generated by the project.

Note: After the default project created by. Net Core is deployed, it can only be accessed from the local machine. The external IP address cannot be opened and can be configured through Nginx. You can also modify Program. cs

var host = new WebHostBuilder()                .UseKestrel()                .UseUrls("http://*:5000")                .UseContentRoot(Directory.GetCurrentDirectory())                .UseIISIntegration()                .UseStartup<Startup>()                .Build();host.Run();

UseUrls (http: // *: 5000)You can access the program through an IP address.

Ps: When I use VS2015 to publish a program, garbled characters appear in the output window. It should be a code problem. I don't know if you have any. I haven't found the cause yet.

 

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.