ASP. NET cross-platform practice: Mono's Jexus "independent edition" is not required"
The traditional step of running ASP. NET Website or WebApi on Linux is to install libgdiplus first, then install mono, and then install Jexus. In this process, although Jexus installation is quite simple, it is relatively time-consuming and laborious to install mono.
The current situation is different. To overcome the hassle of installing Mono, ASP is simplified. net web application deployment process on the Linux operating system, we have created an "independent version" for Jexus 5.8.1 that can be used without installing mono ", the standalone version supports 64-bit CentOS 6.5, Ubuntu 12.04 and later operating systems, can run WebForm, Mvc3-5, WebService and WebApi, support PHP, support OWIN, support reverse proxy, that is to say, you do not need to install mono's "independent version" and the "general version" that requires mono installation are exactly the same in terms of functionality.
The following describes how to use Jexus "standalone edition.
1. Download:
Download the jexus compressed package to the temporary linux folder.
Cd/tmp
Wget linuxdot.net/down/jexus-5.8.1-x64.tar.gz
After the command is executed, the jexus standalone version is downloaded to the/tmp folder. The size is 13.8 MB.
2. decompress the package:
Tar-zxvf jexus-5.8.1-x64.tar.gz
After decompression, A jexus folder is obtained in/tmp.
3. Mobile:
You can move or copy the jexus folder to a specified working location. We recommend that you use the/usr path in a unified manner.
Sudo mv jexus/usr
Then clear jexus in/tmp:
Sudo rm-rf/tmp/jexus *
4. Create a simple aspx webpage for testing:
Because the default website configuration file of jexus is directed to/var/www/default, we create a www folder under/var and a default folder under www. After the creation, go to the default folder and write a simple index. aspx in vim. There are only two sentences:
<% @ Page Language = "C #" %>
<% = DateTime. Now. ToString () %>
Save and exit.
5. Start jexus and try to access the default website:
Cd/usr/jexus
Sudo./jws start
Curl localhost
6. "unmount" of Jexus ":
Jexus is a "green software". In addition to the jexus folder, it does not write any files anywhere in the system, nor register any information. Therefore, it is easy to uninstall: delete the jexus folder.
7. 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
You may also like the following Mono and Jexus articles:
Deploy Mono 4 and Jexus 5.6 On CentOS 7
Deploying. NET, Mono and DNX in Ubuntu 15.04 and CentOS 7
Configure ASP. NET (Apache + Mono) in Linux (Ubuntu/openSUSE/CentOS)
Configure the Linux (Apache) + Mono to run asp.net
How to upgrade Mono
Idea about running ASP. NET 4 website in Mono 3.0
Install Mono and Jexus on Ubuntu to build the. NET Runtime Environment
Install mono offline on CentOS
Ubuntu 14.04 configure Mono + Jexus to run ASP. NET
This article permanently updates the link address: