Deploy ASP. NET Core RTM with Jexus in Ubuntu 16.04
The previous article introduced how to use vs to publish and deploy it to the iis environment (see). Today I will deploy ASP under Ubuntu.. NET Core, which does not need to be installed.. NET Core SDK, which is deployed in the runtime mode. The Jexus server is used to forward requests to ASP. NET Core.
1. Deploy and prepare the environment
Vmwarevm (other virtual machines can also be used)
Ubuntu16.04 Image
2. Release Environment
Win10 System
Vs2015 update3 or vs code (you can also use the dotnet new-t web command to create a project)
Dotnet sdk DotNetCore.1.0.0-SDK. Preview2-x64 https://www.microsoft.com/net/download self-Installation
I. First, create an asp.net core with vs. The program name should be aspnetcoretest.
1. Open project. json
"Dependencies ":{
"Microsoft. NETCore. App ":{
"Version": "1.0.0 ",
"Type": "platform" // Delete this section
},
After modification
"Dependencies ":{
"Microsoft. NETCore. App ":{
"Version": "1.0.0 ",
},
2. Add the following nodes
"Runtimes ":{
"Ubuntu.16.04-x64 ":{}
}
After modification
3. Remove the following nodes
"Scripts ":{
"Prepublish": ["bower install", "dotnet bundle"],
"Postpublish": ["dotnet publish-iis -- publish-folder % publish: OutputPath % -- framework % publish: FullTargetFramework %"]
},
4. Execute dotnet restore under the project directory created by
5. Run dotnet publish-r ubuntu.16.04-x64. The file is published to the project directory \ bin \ Debug \ netcoreapp1.0 \ ubuntu.16.04-x64.
6. Copy the publish under ubuntu.16.04-x64 to the ubuntu Desktop, as shown in figure
7. Move the publish directory to the dynamic/var/local/command as follows: sudo mv publish/var/local and check the files in publish.
8. Set the execution permission of the program file, that is, the aspnetcoretest command sudo chmod + x/var/local/publish/aspnetcoretest
2 install jexus-5.8.2
1. First enter the tmp directory: cd/tmp
2. Download jexus: wget http://www.linuxdot.net/down/jexus-5.8.2-x64.tar.gz
3. Unzip the file to get the jexus Folder: tar-zxvf jexus-5.8.2-x64.tar.gz
4. Move the unzipped jexus folder to the/usr Directory: sudo mv jexus/usr/
5. Go to the/usr/jexus/directory and check what is available: cd/usr/jexus/
6. Go to the/usr/jexus/siteconf Directory: cd siteconf
7. Open the default configuration file in the editor: sudo vim default (which can be downloaded by the editor)
8. Add the following nodes. The configuration items are separated by semicolons (;). line breaks are not allowed.
AppHost = {export line =/var/local/publish/aspnetcoretest; workRoot =/var/local/publish; env = (PATH =/var/local/publish: $ PATH ); port = 5000}
Description
Export line =/var/local/publish/aspnetcoretest // Application name pointing to your site directory, such as aspnetcoretest
WorkRoot =/var/local/publish // point to your site directory.
Port = 5000 // the port that is forwarded to asp.net core by jesux, because asp.net core can be changed to 5000 by default.
Save and exit after configuration.
9. execute sudo .. /jws start command to enable jexus. If you have previously executed jexus, You can execute sudo .. /jws restart is mainly used to execute this command in siteconf .. /You can also go to the parent directory jexus to execute sudo. /jws start
Common Jexus commands:
Start: sudo./jws start
Restart: sudo./jws restart
Stop: sudo./jws stop
Start a Website: sudo start website name
Restart a Website: sudo restart website name
Stop a Website: sudo stop website name
Access localhsot
Successful.
If you are using ubuntu14.04, the following error occurs:
You can execute sudo apt-get install libunwind8-dev to install this library.
Install Visual Studio Code on Ubuntu 14.04
Use Visual Studio Code to develop TypeScript
Visual Studio Code simple trial
Visual Studio Code trial
Visual Studio 2010 & Help Library Manager installation instructions
How to configure OpenCV 2.3.x/2.4.x in Visual Studio 2005/2008 and Visual Studio 2010
Use the opencv-2.4.0.exe file to compile the x86 or x64 platform Visual Studio 2005/2008/2010 target file
Visual Studio LightSwitch supports HTML5 and JavaScript
Visual Studio 11: use C ++ to develop a simplest Metro application
How to install Visual studio Code in Ubuntu 14.04
Visual Studio details: click here
Visual Studio: click here
This article permanently updates the link address: