Installing mod-mono on CentOS

Issues related to software problems.
Post Reply
proxies
Posts: 3
Joined: 2009/10/14 04:19:50
Contact:

Installing mod-mono on CentOS

Post by proxies » 2009/10/14 04:30:42

I am very new in linux environment as well as mod_mono. I installed mod mono on a CentOS server and it seems that I am having problem. I follow the step by step instruction on this site http://openhelp.net/?p=584. The only change with the steps stated on the site I've given is that I have used the latest mod_mono which is Mono 2.4.2.3. Below are the error message I am receiving when restarting apache using the command /sbin/service httpd restart :

[b][Mon Oct 12 10:46:33 2009] [crit] (2)No such file or directory: Failed to create shared memory segment for backend '/usr/local/bin/mod-mono-server2' at '/tmp/mod_mono_dashboard_/usr/local/bin/mod-mono-server2_2'.[/b]

Here is my mod_mono.conf:
[quote]

LoadModule mono_module /usr/local/apache/modules/mod_mono.so


#MonoServerPath /usr/local/bin/mod-mono-server2 .verbose
MonoServerPath /usr/local/bin/mod-mono-server2 -verbose
MonoAutoApplication enabled

AddType application/x-asp-net .aspx
AddType application/x-asp-net .asmx
AddType application/x-asp-net .ashx
AddType application/x-asp-net .asax
AddType application/x-asp-net .ascx
AddType application/x-asp-net .soap
AddType application/x-asp-net .rem
AddType application/x-asp-net .axd
AddType application/x-asp-net .cs
AddType application/x-asp-net .vb
AddType application/x-asp-net .master
AddType application/x-asp-net .sitemap
AddType application/x-asp-net .resources
AddType application/x-asp-net .skin
AddType application/x-asp-net .browser
AddType application/x-asp-net .webinfo
AddType application/x-asp-net .resx
AddType application/x-asp-net .licx
AddType application/x-asp-net .csproj
AddType application/x-asp-net .vbproj
AddType application/x-asp-net .config
AddType application/x-asp-net .Config
AddType application/x-asp-net .dll
DirectoryIndex index.aspx
DirectoryIndex Default.aspx
DirectoryIndex default.aspx
[/quote]

And here is what I added on my httpd.conf:
[quote]
User apache
Group apache

LoadModule mono_module modules/mod_mono.so
Include "/usr/local/apache/conf/mod_mono.conf"

DirectoryIndex index.html index.shtml index.xhtml index.wml index.perl index.pl index.plx index.ppl index.cgi index.jsp index.js index.jp index.php4 index.php3 index.php index.phtml default.htm default.html home.htm index.php5 Default.html Default.htm home.html index.aspx default.aspx
[/quote]

I can run $ xsp command on the directory where I have my aspx pages. The page runs smoothly with xsp command but it stop the service as soon as I close my shell. My only problem is that, how can I keep it alive without the use of that command? Or is there a way to automatically start the xsp command on that directory when I restart my apache? Hoping for your response guys.

Thanks,
Alvin

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: Installing mod-mono on CentOS

Post by pschaff » 2009/10/14 17:47:45

Welcome to the CentOS fora. Please do the [url=http://www.centos.org/modules/newbb/viewforum.php?forum=47]required reading[/url] including [url=http://www.centos.org/modules/newbb/viewtopic.php?topic_id=14408&forum=47]Installing Software[/url] and note the advice about [url=http://wiki.centos.org/PackageManagement/SourceInstalls]source installs[/url] - the procedure (unfortunately) recommended by the document you followed.

The above will lead you to the [url=http://wiki.centos.org/Repositories]repositories page[/url] that covers the CentOS extras repository among other repos. Note the warnings and advice about installing and configuring [url=http://wiki.centos.org/PackageManagement/Yum/Priorities]yum-priorities[/url]. Non-core repos should have a higher numeric value, which is a lower priority. Lower is "better" as in golf scores.

Mono is available from [extras] and there is a group definition, so after removing the broken source install (may be non-trivial) and configuring the repo[code]
yum groupinstall Mono
[/code]

proxies
Posts: 3
Joined: 2009/10/14 04:19:50
Contact:

Re: Installing mod-mono on CentOS

Post by proxies » 2009/10/18 05:18:56

Thanks for the response.

Does this means I have to uninstall what I have installed? and just use yum groupinstall Mono. Does this group install already have mod_mono? sorry I'm really new to this.

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: Installing mod-mono on CentOS

Post by pschaff » 2009/10/18 11:53:16

[quote]
proxies wrote:
Does this means I have to uninstall what I have installed?
[/quote]
That's what I meant by "after removing the broken source install (may be non-trivial)". May be as easy as "make uninstall" and remove the old source directory. If you don't remove it then which version is found will depend on path ordering, and may lead to errors and confusion.

[quote]
and just use yum groupinstall Mono. Does this group install already have mod_mono?[/quote]
If not, then just follow by "yum install mod_mono".
[code]
# yum info mod_mono
Loaded plugins: fastestmirror, priorities
Loading mirror speeds from cached hostfile
* epel: www.gtlib.gatech.edu
* rpmforge: ftp-stud.fht-esslingen.de
Excluding Packages from CentOS-5 - Plus
Finished
Excluding Packages from Extra Packages for Enterprise Linux 5 - x86_64
Finished
Excluding Packages from Red Hat Enterprise 5 - RPMforge.net - dag
Finished
1886 packages excluded due to repository priority protections
Available Packages
Name : mod_mono
Arch : x86_64
Version : 1.2.1
Release : 1.el5.centos
Size : 37 k
Repo : extras
Summary : A module to deploy an ASP.NET application on Apache with Mono
URL : http://go-mono.com/sources-latest/
License : Apache Software License
Description:
: mod_mono allows Apache to serve ASP.NET pages by proxying the requests
: to a slightly modified version of the XSP server, called mod-mono-server,
: that is installed along with XSP
[/code]

proxies
Posts: 3
Joined: 2009/10/14 04:19:50
Contact:

Re: Installing mod-mono on CentOS

Post by proxies » 2009/10/20 12:37:32

Thanks for the reply pschaff.

I have tried the method that you suggested but it seems that the mod_mono was not installed properly.

Here is the step by step procedure I did:

1. I uninstalled mod_mono, mono and XSP using the [b]make uninstall [/b] command Afterwards, I deleted the directory using [b]rm -rf "directoryname"[/b].

After cleaning the previously installed application I make use of the command

2. [b]yum groupinstall Mono[/b]
3. [b]yum install mod_mono[/b]
4. [b]yum install xsp[/b]

Then after the installation, I used XSP command on the directory wherein I have my aspx pages but it seems that mod_mono is not installed. I hope you can guide me more on how will I be able to install mod_mono on my server without having the need of using XSP command and also removing the port 8080 on the url.

Your help will be highly appreciated. :-)

Thanks in advance.

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: Installing mod-mono on CentOS

Post by pschaff » 2009/10/20 14:33:51

I suspect there are still after-effects of your source install in /usr/local/... and the environment and other changes in the procedures you followed. Might want to evaluate the option of doing a fresh install and not corrupting it with source installs and associated configuration, versus spending a lot of time fixing the damage.

Post Reply