Jexus deploy the. Net Core project and jexus deploy. netcore

Source: Internet
Author: User

Jexus deploy the. Net Core project and jexus deploy. netcore

Jexus

Jexus, Jexus Web Server (JWS), is an ASP. net web Server on Linux. It is a core program for setting up ASP. net web servers in non-Windows systems such as Linux, Unix, And FreeBSD.

Use HTTP self-host applications (such as Asp.net Core applications, Node. js applications) are centrally incorporated into the Jexus working process sequence for control (start, stop, restart, automatic recovery after crash and other management and monitoring functions), Asp. net Core applications enter the enterprise production environment to provide a powerful platform guarantee. Advantages of integrating asp.net core with jexus:

  • Supports multiple sites. The same port can support any multiple asp.net core applications at the same time;
  • The steps for starting, stopping, and restarting an application are the same as those for starting, stopping, and restarting the site. You do not need to manually manage the asp.net core application;
  • It can automatically restart applications after they crash, ensuring uninterrupted enterprise-level operation;
  • Provides the same HTTP environment parameters as IIS.
  • It has a higher performance advantage than reverse proxy.

Install jexus5.8.2 standalone Edition

mkdir tempcd tempwget linuxdot.net/down/jexus-5.8.2-x64.tar.gztar zxvf jexus-5.8.2-x64.tar.gzcd jexus/cd siteconf/

Configuration item

Combined with the previous NetCore1.1 + Linux deployment experience

Copy a published project file to the web. test2 folder.

Set folder Access Permissions

chmod -R 777 web.test2

Modify Jexus configuration file

cd jexus/siteconf/

vim default

vim test

Format: AppHost = {production line = life line; AppRoot = working path; Port = Port}

Note: required line: required. Indicates the command to start the web application (including parameters), such as using line = dotnet/var/www/aspnetcore/AspNetCoreStarted. dll

AppRoot: required. Indicates the working directory of the application, such as AppRoot =/var/www/aspnetcore.
Port: Optional. Indicates the listening port of the application. multiple ports are separated by commas. port or reproxy. Otherwise, the request data cannot be forwarded to the application ).
Env: Optional. Environment variables required for the application to work, such as env = (PATH =/usr/local/bin:/var/www/aspnetcore: $ PATH ), multiple settings are separated by commas.
ErrLog: Optional. Redirects the abnormal output of this application to the specified file (complete path is required). If you do not want to output logs, you do not need to use the OutLog item. At this time, jexus will automatically turn off the console output (actually redirected to/dev/null );
OutLog: Optional. Redirects the console output of the application to the specified file (complete path is required );
User: Optional. Run the application as a specified user. The default identity is root.

Note:

1. Like AppHost. Port, AppHost does not support virtual paths;
2. the AppHost function is used to manage a specified web application with http service capabilities into the jexus Worker Process and Asp. net Core or Node. it is of great significance to use self-host web programs such as js in the production environment.

Start

./Jws start

Set JWS to restart and start automatically

cd /etc/init.d/ vi jws

In the I edit mode, paste the following content

#!/bin/bash#chkconfig: 2345 80 05#description:jws#. /etc/rc.d/init.d/functionscase "$1" instart) echo "Jexus Start.." /usr/jexus/jws start ;;stop) echo "Jexus Stop.." /usr/jexus/jws stop ;;restart) echo "Jexus Restart" /usr/jexus/jws restart ;;status) /usr/jexus/jws status ;;*) exit 1 ;;esacexit $RETVAL

Press ESC and enter wq to save the file.

Add this script as a "service"

Chmod 766 jws
Chkconfig -- add jws

References:

Jexus 5.8.2 officially released! Provides platform support for Asp. Net Core production environments

Jexus Automatic startup configuration

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.