The first deployment record of cross-platform running Rafy

Source: Internet
Author: User

The first deployment record of cross-platform running Rafy

I always wanted to use MONO on Linux to try running Rafy. Recently, it was a real test due to business needs. The following are some key points of this deployment record.

Linux

I tried this deployment with two colleagues. Since we are not familiar with Linux (RedHat, which was used for a few times many years ago, has forgotten those commands now .), Therefore, we tested three different images respectively and finally selected an image for OpenSUSE. (In fact, I downloaded a Ubuntu, only 800 M. After installation, there was always a problem and I had to give up. The tragedy ......)

Compared with Windows, Linux is light, easy to install, and fast to install.

 

 

ASP. NET vNext vs MONO

These two are currently feasible. NET cross-platform solutions. We need to quickly understand the two solutions and analyze which solution has the lowest transplant cost.

ASP. NET vNext

Microsoft itself has gradually supported open source, so our idea is to use the cross-platform solution officially released by Microsoft as much as possible. ASP. NET vNext (5) has released RC1. However, after testing, we found that the entire code is built on the new API. If we want to port our program to vNext, we need to modify a lot of code. Therefore, vNext is not selected for the time being, but VNext must be selected for the long term.

The official website of vNext and its documentation are as follows:

Http://www.asp.net/vnext?https://docs.asp.net/en/latest/index.html

The following are some vNext-related Tutorials:

ASP. NET 5 Series tutorials.

MONO

In fact, for the moment, for the. NET cross-platform, MONO is widely used. Official Website: http://www.mono-project.com/

MONO can be simply understood as a cross-platform. NET platform, including runtime, framework, and tools. The MONO framework is.. NET Framework, and its API should be kept as close as possible. the. NET Framework is consistent, and CLI specifications are also supported. Therefore, upper-layer applications do not need to be re-compiled or can run directly on MONO. Therefore, directly using MONO should be the lowest-cost cross-platform solution.

However, MONO does not support complete. NET. For example, WPF and WWF are not implemented on MONO (see compatibility comparison for details). Therefore, we can use a tool to check whether the application has compatibility issues: "Mono Migration Analyzer ".

After MONO is installed, it is tested to run properly:

 

Web Server

In Linux, you can use Apache and Nginx as Web servers when running MONO. See mono asp. NET and mod_mono. In addition, the Jexus server compiled by Chinese people is also quite popular. It supports. NET very well and is easy to use. Therefore, we chose the simplest Jexus server to reduce the learning difficulty.

The Jexus server uses the classic IIS mode, which makes the <System. WebServer> Configuration section in Web. config unavailable (this configuration section is used in the IIS integration mode ). Here, you need to modify the content in this configuration section to the corresponding configuration section in <System. Web>.

Final running environment

Linux (OpenSUSE) + MONO + Jexus + MVC5 + Rafy + Oracle.

In the above environment, the program can finally run.

However, many compatibility problems have been found. In many cases, Linux is case sensitive, but Windows is not. Therefore, a large number of files in the program cannot be found on Linux '. In addition, the path Separator in Windows is '\', while in Linux it is '/', which also causes some problems. For details about program porting, see Application Portability.

This article permanently updates the link address:

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.