. Net Core Ubuntu 14.04 deployment process (graphic details), ubuntu14.04

Source: Internet
Author: User

. Net Core Ubuntu 14.04 deployment process (graphic details), ubuntu14.04

This article describes how to deploy Ubuntu 14.04 with. Net Core)

No. 1 prepare the application

1. Create a. Net Core Web Project


2. Use VS2015 for release


No. 2 install. Net Core for Ubuntu

Ubuntu installation will not be introduced. I use VMWare and it is very convenient to install Tools.

For detailed installation steps, see: http://www.bkjia.com/ OS /248849.html

1. Add a dotnet Source

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 417A0893sudo apt-get update

2. Install. Net Core SDK

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

3. Verify Installation

dotnet --version

4. initialize the sample program

mkdir NetWebcd NetWebdotnet new

5. Run the sample program

dotnet restoredotnet run


As shown in!

No. 3 upload Program

1. Clear and delete the sample program folder

2. Copy the project file generated in step 1 to the sample folder.

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.
Port 5000 is the access port. Enter http: // localhost: 5000/in the local browser. If the result is displayed, the deployment is successful.
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) can be used to access a program through an IP address.

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

The above is all the content of this article. I hope it will be helpful for your learning and support for helping customers.

Related Article

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.