Should I choose the Linux. NET deployment method ?, Linux.net

Source: Internet
Author: User

Should I choose the Linux. NET deployment method ?, Linux.net

Currently, Linux is deployed. the NET environment can be described in a variety of ways, including the traditional source code compilation methods, a variety of one-click installation scripts, and green package installation methods. With the launch of Mono's official new site, the RPM package deployment mode is also added. So how should we choose a Linux. NET beginner? Below, this article will compare the advantages and disadvantages of these installation methods, so as to help readers select the best deployment method.

In this article, we will discuss the following deployment methods:

1. source code compilation

2. One-click installation script

3. RPM package

4. green package

I. source code compilation

Install and deploy Linux Through source code compilation. NET is the most traditional and original and reliable method. By obtaining the source code and compiling it on a physical machine (Virtual Machine, the compiler can specifically compile binary execution files that are most suitable for machine operation. At the same time, the source code compilation method is also the most stable and reliable method in all deployment methods. At the same time, the use of source code compilation is also the most flexible deployment. Readers who want to learn more must master this deployment method.

Install and deploy Linux Through source code compilation. NET, we need to Get a copy of the source code in advance. Currently, there are two ways to obtain the Mono source code, one is to compile and install the managed code Pull of Mono by using GitHub and execute autogen and make install. The other is to use the source code package (tar.gz#tar.bz2 package) issued by Mono/source. /Configuration and then execute make install.

In fact, if the readers use the former (that is, the Git Pull method) to compile and deploy the environment, the obtained version is generally higher than the version released from Mono/Source (of course, when compilation is available). For readers who want to use the highest version or try it out as soon as possible, using this method is a good choice. However, this method also has some disadvantages, that is, we need to execute the Git Clone or Git Pull code before compilation, this may cause us to face the need to download the Git code repository on G, and because the external directory in Mono contains other. when autogen is executed in the GIT repository of the NET project, the system checks whether the code including the external directory is complete. Therefore, during compilation, the system may execute Git Pull again to Pull the relevant code. Another point is that we may not be able to compile it after Git Pull Master. Fortunately, after the article was published, LexLi gave some reminders, we found that the GitHub/Mono Readmd contains a "prompt light" that can be compiled by the current code ", by observing the color displayed by the light, we can know whether the current code can be compiled. In addition, there is a version compilation test history here, we can also learn from its compilation test records that the source code of the submitted version can be compiled, and then we only need to ReSet the code to this version to compile it again.

The reliability of the Source code package compiled by Mono/Source is greatly improved. After all, this version is the Release version. Although some release packages cannot be compiled due to missing files, they are always the most reliable, and the size of the source package release is generally within MB, it is much smaller than G code in the Git repository.

Finally, whether you use the above two methods, it takes a long or short compilation wait time, and some Make Error may occur during compilation, all of this requires readers to overcome this problem. But in any case, this is a deployment method that must be mastered by readers who want to learn more about Linux. NET. (If necessary, you can refer to "Linux. NET learning notes")

 

Ii. one-click installation script

Because the source code compilation method uses Shell commands directly, many people extract these Shell commands and assemble them into a Shell script, you only need to execute the script to deploy the environment. Some of them are ingenious and can be improved on the basis of the command line to provide a stream similar to the "interface, it provides better interaction with users. Script-based environment deployment is a sign of productivity liberation.

However, the script installation method is still quite inadequate, that is, the script installation is actually a "gift box", and the content in the "gift box" is still the source code compilation method, therefore, script-based installation does not encounter fewer problems than source code-based installation. At the same time, the "compatibility" problem still exists when using scripts for installation. It is worth noting that the so-called "compatibility" does not mean that script commands cannot be used, it is the "incompatible" inherited by the source code compilation, that is, the "incompatible" caused by different Make errors due to the complexity of the environment ". In addition, because everyone has their own Installation Style, some people may like to install things in "/usr" (such as the tutorials of yune and Shanyou ), some people like to install it in "/usr/local/" (my style is Linux. NET learning notes), some people like to install it in "/opt ...... All in all, the installation path written in the script is solely determined by the writer. The installation directory may not be the path that readers want, and this may also have some shortcomings.

 

Iii. RPM package

Along with the launch of the Mono official website, the RPM Installation Method Based on Yum has quietly appeared in the field of view of readers. For a while, many friends have started to try it out (no way, I am afraid it is difficult to look back after experiencing the sweetness of Yum.) or I have received "official" instructions to adopt this method to deploy Linux.. NET environment.

I have never tried this method (I am too lazy to add the image source myself), but according to the information from many friends (bao) feedback (yuan) Back (ma) (niang, this method seems to be the most residual (zi) nian (sha) in several methods. The RPM package is a binary package. The installation path has been pre-configured in the package and cannot be changed. We cannot know where it is installed (only find ), according to the information provided by some friends who installed it in this way, it is basically installed in the "/opt" Directory (but there is no specific directory, there are "/opt/", "/opt/mono", and even "/opt/201408xx/" Directories ). In addition, the RPM package installation method has a very serious problem, that is, the installation method does not register the Mono/bin path to the environment variable, and the system cannot find mono.

Therefore, I personally do not recommend this installation method.

 

4. green package (jws. mono)

The above three methods all share a common feature, that is, they all need to be carried out in the case of network conditions. The green package is different from the former. The green package is a green version of Linux. NET runtime environment that can be run after extraction and restructuring from the machine compiled by the source code and making appropriate changes to the new one.

Using a green package has the following advantages:

(1) Fast deployment. As this deployment method requires only one decompression command (you can register the environment variables as needed) without the compilation process, this greatly saves valuable time for Environment deployment.

(2) highly targeted: Since each green package is compiled for its labeled Linux release, the green package is highly targeted.

(3) exquisite yet functional: readers who have used green packages may find that the package size is even smaller than the Source Package released by Mono/Source, however, the function is not reduced. The secret lies in Mono and MS. different from NET, the Mono library is backward compatible. Therefore, in each green package, we will remove the "DUPLICATE" library to make the package more refined.

However, the green package also faces some problems. The first is that it cannot be upgraded (this will be improved soon, And a script available for upgrade will be provided in the next release package ), the second is to make a release package, which is heavy and time-consuming. We need to compile and make the corresponding release package.

However, for beginners and readers who need rapid deployment and large-scale deployment, the green package is the best choice because it is easy enough because it is fast enough.

Of course, the benevolent and wise may see wisdom. The above points are my subjective views and suggestions on using Linux. NET Compilation Time (which has failed for almost 10 times). Thank you.

Original article first link: http://jhonge.net/Home/Single/3788111


Can aspnet be deployed on Linux?

For more information, see mono.
Mono is a Project hosted by Novell (previously Ximian. The project's goal is to create a series of. NET tools that comply with ECMA standards (Ecma-334 and Ecma-335), including the C # compiler and common language runtime platform. Unlike Microsoft's. NET Framework, the Mono Project can run on not only Windows systems, but also Linux, FreeBSD, Unix, Mac OS X, and Solaris.
Reference: www.mono-project.com/Main_Page

Is there any installation instructions for deploying netdot in Linux?

The files in your manual are detailed, including installation. Take a closer look.
 

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.