How to install Mono in LINUX to enable Linux to support asp.net

Source: Internet
Author: User

1. Download and install Mono
# Wget http://www.go-mono.com/archive/1.0.5/mono-1.0.5.tar.gz
# Tar zxvf mono-1.0.5.tar.gz
# Cd mono-1.0.5
#./Configure
# Make
# Make install

If an exception or interruption occurs during this process and the Makefile file is not generated in the directory, you need to find out the cause of the error according to the system prompt, which may be due to the lack of software required to compile Mono, for example, if you have not installed Gnome X-Window, you need to manually install pkg-config and glib-2.0.
Download at http://www.freedesktop.org/Software/pkgconfig and ftp://ftp.gtk.org.

Ii. Enable the web server to interpret asp.net
1. Use apache mod_mono
(1) install mod
# Wget http://www.go-mono.com/archive/1.0.5/mod_mono-1.0.5.tar.gz
# Tar zxvf mod_mono-1.0.5.tar.gz
# Cd mod_mono-1.0.5
#./Configure -- with-apxs =/usr/sbin/apxs -- prefix =/usr/local/mono -- with-mono-prefix =/usr
The first parameter specifies the apache configuration script path.
The second parameter is the installation path of mod_mono.
The third parameter specifies the mono path.
# Make
# Make install

(2) Modify httpd. conf
Because the Apache directory is specified during configure, the http. conf file will be automatically modified and added to the LoadModule mono_module modules/libmod_mono.so line. Now you only need to add the line:
Alias/mono "/usr/share/doc/xsp/test"
MonoApplications "/mono:/usr/share/doc/xsp/test"
& Lt; Location/mono & gt;
SetHandler mono
& Lt;/Locationy & gt;

Save and exit;
Restart httpd and enter http: // your ip/mono in the browser to view the index. aspx content normally.
2. Use xsp to explain the content of asp.net
# Wget http://www.go-mono.com/archive/1.0.5/xsp-1.0.5.tar.gz
# Tar zxvf xsp-1.0.5.tar.gz
# Cd xsp-1.0.5
#./Configure
# Make
# Make install

Run xsp to start the service after installation.
# Xsp
The default port is 8080, and the default directory is the current directory. view the Help file with detailed parameters.
In this way, you can also use http: // your ip: 8080 to browse the asp.net file.

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.