LINUX Jexus deployment of ASP. NET Core WebApi

Source: Internet
Author: User
Tags dotnet

server: LINUX ubuntu16.04development software: VS2015 Update3dotnet SDK: dotnetcore.1.0.0-vs2015tools.preview2  1. Create a. Netcore's Webapi project.  a random demo, so here I am not hosted in the cloud. Click OK and the new WEBAPI structure is as follows:  2. Open Project.json"Microsoft.NETCore.App": {"version": "1.0.1", "type": "Platform"--comment out this line},

2. Add the following node

"Runtimes": {
"Ubuntu.16.04-x64": {}
}

3. Note the following node

"Scripts": {

"Postpublish": ["dotnet publish-iis--publish-folder%publish:outputpath%--framework%publish:fulltargetframework%" ]

}

4. Go to the command prompt through CMD, go to the project directory, and then execute the dotnet Restore command. After successful execution, use dotnet publish-r ubuntu.16.04-x64 to publish the project to Webapicoretest\src\webapicoretest\bin\debug\netcoreapp1.0\ Under the Ubuntu.16.04-x64 directory.   5. Copy the published publish folder to the Linux server. I use the WinSCP tool here.  Place the published publish file in the Var/local directory above the server. 6. Log on to the Linux server and add permissions to the application files. sudo chmod +x/var/local/publish/webapicoretestTo install the core dependency package:Ubuntu:sudo apt-get Install libunwind8sudo apt-get install Libicu52centos:yum install Libunwind8yum install ICU7. Test whether the published file is correct. Sudo/var/local/publish/webapicoretestThe test was successful. Next, 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 Jexus folder: TAR-ZXVF jexus-5.8.2-x64.tar.gz

4. Move the extracted Jexus folder file to/usr: sudo mv jexus/usr/
5. Enter the/usr/jexus/siteconf directory: cd/usr/jexus/siteconf
6. Open the default configuration file for configuration: sudo vi default

 

apphost={cmdline=/var/local/publish/webapicoretest;workroot=/var/local/publish;port=5000}

Cmdline=/var/local/publish/webapicoretest//Name of the application pointing to your site directory

Workroot=/var/local/publish//point to your Site Directory

port=5000//Jexus ports

After configuration: Wq save exit.

Then execute sudo: /jws Start Jexus

After successful startup, execute sudo netstat-lntp to see if the current port is performing properly.

you can see that port 5000 is in normal use. then you can access the contents of the Webapi. Success!

LINUX Jexus deployment of ASP. NET Core WebApi

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.