In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article will explain in detail how to deploy Ubuntu 14.04 in NetCore. The content of the article is of high quality, so the editor shares it for you as a reference. I hope you will have some understanding of the relevant knowledge after reading this article.
No.1 prepares the application
1. Create the. Net Core Web project
two。 Publish using VS2015
No.2 installs .net Core for Ubuntu
The installation of Ubuntu is not introduced. I use VMWare, it is very convenient to install Tools.
For specific installation steps, please refer to: https://www.jb51.net/os/248849.html
1. Add dotnet Feed
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
two。 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 the picture above, it means success!
No.3 upload program
1. Clear and delete the contents of the sample program folder
two。 Copy the project file generated in the first step to the sample folder
Note: as I Ubuntu installed in VM, you can directly copy files, the production environment can be uploaded using ftp, specific how to set up their own Baidu.
No.4 run & access
Dotnet *. Dll
* *. Dll is the portal link library generated by the project
5000 is the access port. Entering http://localhost:5000/ in the native browser indicates that the deployment is successful when you see the effect shown in the figure below.
Note: after the deployment of the project created by default by .Net Core is completed, it can only be accessed within the machine. The outside cannot be opened through IP, and can be realized by configuring Nginx. You can also modify the Program.cs
Var host = new WebHostBuilder () .UseKestrel () .UseUrls ("http://*:5000") .UseContentRoot (Directory.GetCurrentDirectory ()) .UseIISIntegration () .UseStartup () .build (); host.Run ()
UseUrls (http://*:5000)) can access the program through IP.
Ps: when I use VS2015 to release the program, the output window is garbled, which should be a coding problem. I don't know if you have it or not, but I haven't found the reason yet.
This is all about how to deploy Ubuntu 14.04 in NetCore. I hope the above content can be of some help and learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.