Use jexus + mono to build an Asp.net web server on FreeBSD

Source: Internet
Author: User
If you want to talk about how to set up the Asp.net runtime environment, I believe many people will think of using the Windows Server System and IIS to build it. It is undeniable that Asp.net is something Microsoft has developed, of course, it is most appropriate to build a system with Microsoft. If you want to use Asp.net and FreeBSD, isn't it feasible? Of course, the answer is no. Because we have mono and mono, Asp.net can run on a non-Windows system.

What is Mono: Mono is an open-source implementation of. NET Framework. The mono project will enable developers to develop. NET applications in various languages (C #, VB. NET, etc.).ProgramCan run on any mono-supported platform, including Linux and UNIX. The mono project will enable you to develop various cross-platform applications and greatly improve the development efficiency in the Open Source Field. As an organic. net, which includes a C # compiler, a runtime environment of a public language, and a complete set of related class libraries. It even includes IDE, debugging tools, and document browsers. The mono project URL is: http://www.mono-project.com.

What is jexus: jexus is a cross-platform Web server. It has powerful functions, simple operations, extensive adaptability, and good practicability. Jexus is an ASP. NET web server on the Linux/Unix platform. It is the inevitable choice and optimal solution for building an ASP. NET Website Based on the Linux/Unix platform! Jexus has built-in security monitoring and automatic prevention and control functions to provide more security protection for various websites. OfficialCommunity: Http://linux.pxzc.com/

1. Install mono 2.4.2.3 using ports
To install the latest mono version, update ports with the following command:
Reference
Portsnap fetch Extract
Portsnap fetch update

It should be noted that portsnap fetch extract only needs to be run for the first time, and then only needs to run the following statements to update ports.

It takes a lot of time to update ports. Please wait. After the ports update is complete, we can install the latest version of mono. The latest version of Mono on ports is 2.4.2.3. Generally, make install clean is used directly, but I personally know that automatic download will be slow, so we can download it manually in windows.

No matter how you use it, download the corresponding mono version from the official mono website. Http://ftp.novell.com/pub/mono/sources-stable/
Reference
Mono-2.4.2.3.tar.bz2
Mono-basic-2.4.2.tar.bz2
Libgdiplus-2.4.2.tar.bz2
Gluezilla-2.4.2.tar.bz2
Xsp-2.4.2.tar.bz2

Move or copy these files to/usr/ports/distfiles)
Reference
MV *. bz2/usr/ports/distfiles/

After copying, you can start the installation.
Reference
CD/usr/ports/lang/MONO/
Make install clean

The next step is a long wait ......

After the compilation and installation are complete, run the following command:
Reference
Rehash
Mono-V

If it is normal, the following information should be displayed:
Reference
Mono JIT compiler version 2.4.2.3 (tarball Fri Nov 13 12:29:24 CST 2009)
Copyright (c) 2002-2008 Novell, INC and contributors. www.mono-project.com
TLS: _ thread
GC: encoded ded Boehm (with typed GC)
SIGSEGV: normal
Notification: thread + polling
Architecture: amd64
Disabled: None

So far, even if the latest version of Mono is installed, the next step is to install jexus.

2. Install jexus 3.6
In fact, as long as mono is installed, jexus installation is very simple, just copying.
Reference
# Wget http://linux.j66.net/down/jexus-3.6.tar.gz # This is the old address
Wget http://linux.pxzc.com/down/jexus-3.6.tar.gz
CP jexus-3.6.tar.gz/usr/local/
Tar zxvf jexus-3.6.tar.gz
Music jexus-3.6 jexus
CD jexus
Chmod 755./JWS. regsvr
Chmod 755./JWS. Start
Chmod 755./JWS. Restart
Chmod 755./JWS. Stop
./JWS. regsvr

The above is the official version of jexus 3.6. for details about the jexusconfiguration, see readme.txt In the compressed package. I will not go into details here. By the way, jexus 3.6 has started to support PHP.

Jexus is installed even with such a few simple commands.

3. Set jexus to run automatically after startup
Reference
VI/etc/rc. Local
Add in the last line

/Etc/local/jexus/JWS. Start

The above is the installation process on FreeBSD 7.2. If FreeBSD 8.0 is used, you do not need to update ports. Just make install clean.

Reference
Modification history:
Ver 1.0:, created in this article.
Ver 1.1:, 1. Upgrade jexus to 3.6.

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.