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.