Linux and Microsoft have always been difficult, and the situation has improved a little after the cooperation between Microsft and Novell over the years. However, it is difficult to make sure that their applications can be seamlessly migrated. MONO is an open-source project launched by Novell to provide ASP. NET support in the Linux environment.
The installation of source code on CentOS 5 linux (Note: currently only compatible with 32-bit Systems) depends on the corresponding development kit. Therefore, you must install the apache component before installing mono.
# Yum-y install http *
Mono can be installed in multiple ways. In Redhat Linux, yum can be installed directly. In CentOS5, yum can be installed in the following ways.
# Yum install mono * xsp mod_mono
Dependencies Resolved
========================================================== ========================================================== ========================================================== ================
Package Arch Version Repository Size
========================================================== ========================================================== ========================================================== ================
Installing:
Mod_mono i386 1.2.1-1. el5.centos extras 36 k
Mono-core i386 2.4-4.3 Mono 14 M
Mono-data i386 2.4-4.3 Mono 1.5 M
Mono-data-firebird i386 2.4-4.3 Mono 252 k
Mono-data-oracle i386 2.4-4.3 Mono 184 k
Mono-data-postgresql i386 2.4-4.3 Mono 203 k
Mono-data-sqlite i386 2.4-4.3 Mono 157 k
Mono-data-sybase i386 2.4-4.3 Mono 160 k
Mono-devel i386 2.4-4.3 Mono 1.8 M
Mono-extras i386 2.4-4.3 Mono 1.5 M
Mono-jscript i386 2.4-4.3 Mono 410 k
Mono-locale-extras i386 2.4-4.3 Mono 783 k
Mono-moonlight i386 2.4-4.3 Mono 1.5 M
Mono-nunit i386 2.4-4.3 Mono 223 k
Mono-nunit-devel i386 2.4-4.3 Mono 14 k
Mono-web i386 2.4-4.3 Mono 3.1 M
Mono-web-devel i386 2.4-4.3 Mono 14 k
Mono-winforms i386 2.4-4.3 Mono 3.0 M
Monodoc i386 2.4-4.3 Mono 7.3 M
Monodoc-devel i386 2.4-4.3 Mono 14 k
Xsp i386 1.2.1-1. el5.centos extras 233 k
Installing for dependencies:
Giflib i386 4.1.3-7.1.el5 _ 3.1 base 39 k
Httpd i386 2.2.3-43. el5.centos base 1.2 M
Libgdiplus i386 2.4-5.3 Mono 1.3 M
Transaction Summary
========================================================== ========================================================== ========================================================== ================
Install 24 Package (s)
Update 0 Package (s)
Remove 0 Package (s)
Total download size: 39 M
#
After installation, you should get:
# Rpm-qa | grep mono
Mono-winforms-2.4-4.3
Mono-data-sqlite-2.4-4.3
Mono-locale-extras-2.4-4.3
Mono-moonlight-2.4-4.3
Mono-nunit-2.4-4.3
Mono-data-2.4-4.3
Mono-core-2.4-4.3
Monodoc-2.4-4.3
Monodoc-devel-2.4-4.3
Mono-data-sybase-2.4-4.3
Mono-data-oracle-2.4-4.3
Mono-devel-2.4-4.3
Mono-extras-2.4-4.3
Mono-nunit-devel-2.4-4.3
Mono-web-devel-2.4-4.3
Mod_mono-1.2.1-1.el5.centos
Mono-data-Firebirds-2.4-4.3
Mono-data-postgresql-2.4-4.3
Mono-web-2.4-4.3
Mono-jscript-2.4-4.3
Then configure mod_mono to test integration with apache:
# Vi/etc/httpd/conf. d/mod_mono.conf
Add:
Alias/test "/usr/lib/xsp/test"
MonoApplications "/test:/usr/lib/xsp/test"
<Location/test>
SetHandler mono
</Location>
Test httpd:
#/Usr/sbin/httpd-t
Syntax OK
# Chown-R apache. apache/usr/lib/mono/
# Chown-R apache. apache/usr/lib/xsp/
# Service httpd restart
Stop httpd: [OK]
Start httpd: [OK]
Now you can access http: // localhost/test/