Install mono1.9 on Redhat Enterprise 4 (2)

Source: Internet
Author: User
Recently, due to the needs of the project, we hope to run our. Net project on the Linux system, so we have made some porting attempts. I also hope to share my mono experience with friends in the garden.

Previous Article (Http://www.cnblogs.com/xingzhixp/archive/2008/05/24/MonoRehel41.html), we have installed mono, in order to use ASP. NET, we also have to install and configure Apache.

I will not talk about the installation process of Apache. You can refer to the Apache documentation. However, Mono seems very picky about the apache version, and its installation and configuration are not as convenient as windows. We have installed Apache 2.0.49, 2.2.8, and 2.0.52.
In version 2.0.49, when we run the mono test site, we always prompt that the service is unavailable.
When apache loads the mono component in version 2.2.8, an error is returned:

Syntax Error on line 8 of/etc/httpd/CONF. d/mod_mono.conf: cannot load/usr/lib/httpd/modules/mod_mono.so into server:/usr/lib/httpd/modules/mod_mono.so: Undefined Symbol: apr_sockaddr_port_get
In the end, we successfully run the Asp.net test site in version 2.0.52.

To enable Apache to run ASP. NET, You need to modify the Apache configuration file to load the mono component mod_mono.so.
Find the Apache configuration file, usually in the Apache installation directory, you can find the httpd. conf file. In RedHat E4, this file is located in/etc/httpd/CONF/httpd. conf.
Add a sentence to the file:Include/CONF. d/mod_mono.conf, (This is the default installation location of the mono configuration file ).
After this sentence is added to RedHat E4, an error is prompted during Apache startup: Can't open file/CONF. d/mod_mono.conf. Later we found that the configuration file contains the following:Include/etc/httpd/CONF. d/*. confSo we copy this file to/etc/httpd/CONF. d/mod_mono.conf, remove this configuration in httpd. conf, and restart Apache. Everything works normally.

So far, Apache configuration is complete. To test, we copy the/usr/lib/xsp/test directory to the Apache main directory, which is usually the Apache installation directory/htdocs /, in redhate4, It is located at/var/www/html/. Well, open the http: // localhost/test/index page in the browser. aspx should be smooth. We see the Asp.net page. This is the default. net1.1 page. To use Asp.net 2.0, we also need to add:Monoserverpath/usr/bin/mod-mono-server2.Now we can open the 2.0 page and check whether http: // localhost/test/index2.aspx is normal?

If everything goes well, we can start porting our system. Next, we will continue to share the system porting process.

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.