ben ogle
July 20th, 2005, 02:52 AM
Well, I *finally* got mod_mono working on my ubuntu box. I did quite a bit of searching so i thought I would post up and tell you folks some of the notable things I learned about it.
First of all, dont use the deb/ubuntu package. It is mono v1.0.5 or something which doesnt come with windows forms and many other things as well. Compile it from source. Its really not all that difficult. I originally installed the apt-get package then tried to use the mod_mono package but nothing worked. I had also read that there were problems with the package on apache2, which I am using. So I found this guide and followed it pretty closely:
http://www.codeproject.com/cpnet/introtomono2.asp
Essentially all you have to do is download and install mono, xsp, mod_mono, then add a few lines to some config files. So go to here:
http://go-mono.com/sources/
And download mono, xsp, and mod_mono. Then you tar -xvzf whatever-package.gz and cd into the unzipped directory. At the command line run ./configure --prefix=/usr then make, then make install.
To install mono I needed a crapload of utilities I did not have. Most, though, could be downloaded from the apt-get install goodness.
I originally tried to install all the mono stuff with a prefix /etc because I thought apache was installed in /etc (I used the package), but it had a lot of problems installing xsp because it could not find any of the utilities it needed. So I ended up installing everything with --prefix=/usr. Also, I ran into an odd make error with mod_mono. When i tried to compile it I got this error:
apxs:Error: no config variable PREFIX
After searching I found the solution was to run this in the command line when in the mod_mono unzipped directory:
sed -i -e 's/ -S PREFIX="$(prefix)"//' src/Makefile.in
Once I got everything installed I, of course, had more problems. XSP was working fine. But when i added the module to apache and all the info I needed to the config files I was getting a "503: Service Temporarily Unavailable" error. This was a big problem because it seemed like no one was having the same issue. Well it turns out that this error occurs when there is no unix socket file created for mono. The mod-mono-server app is supposed to create this file but it was not. So I looked in the apache logs and there were errors concerning the version of corlib. It needed 37 and I had version 22. It was looking at the version of mono I had installed from the package. So I uninstalled all the packages and I reinstalled the 3 apps (it broke mono when i uninstalled the packages, then xsp was broken when I reinstalled mono). I restarted apache and it worked!
Then to allow other folks to see it I put this in the apache config file:
<Directory /the/dir/of/the/asp/pages>
Order Allow,Deny
Allow all
</Directory>
and everything worked.
More links:
http://www.gotmono.net/documentation/mod-mono-howto.html
http://www.mono-project.com/Mod_mono
and there is an INSTALL file in the mod_mono source download.
I hope this helps someone out.
Ben
First of all, dont use the deb/ubuntu package. It is mono v1.0.5 or something which doesnt come with windows forms and many other things as well. Compile it from source. Its really not all that difficult. I originally installed the apt-get package then tried to use the mod_mono package but nothing worked. I had also read that there were problems with the package on apache2, which I am using. So I found this guide and followed it pretty closely:
http://www.codeproject.com/cpnet/introtomono2.asp
Essentially all you have to do is download and install mono, xsp, mod_mono, then add a few lines to some config files. So go to here:
http://go-mono.com/sources/
And download mono, xsp, and mod_mono. Then you tar -xvzf whatever-package.gz and cd into the unzipped directory. At the command line run ./configure --prefix=/usr then make, then make install.
To install mono I needed a crapload of utilities I did not have. Most, though, could be downloaded from the apt-get install goodness.
I originally tried to install all the mono stuff with a prefix /etc because I thought apache was installed in /etc (I used the package), but it had a lot of problems installing xsp because it could not find any of the utilities it needed. So I ended up installing everything with --prefix=/usr. Also, I ran into an odd make error with mod_mono. When i tried to compile it I got this error:
apxs:Error: no config variable PREFIX
After searching I found the solution was to run this in the command line when in the mod_mono unzipped directory:
sed -i -e 's/ -S PREFIX="$(prefix)"//' src/Makefile.in
Once I got everything installed I, of course, had more problems. XSP was working fine. But when i added the module to apache and all the info I needed to the config files I was getting a "503: Service Temporarily Unavailable" error. This was a big problem because it seemed like no one was having the same issue. Well it turns out that this error occurs when there is no unix socket file created for mono. The mod-mono-server app is supposed to create this file but it was not. So I looked in the apache logs and there were errors concerning the version of corlib. It needed 37 and I had version 22. It was looking at the version of mono I had installed from the package. So I uninstalled all the packages and I reinstalled the 3 apps (it broke mono when i uninstalled the packages, then xsp was broken when I reinstalled mono). I restarted apache and it worked!
Then to allow other folks to see it I put this in the apache config file:
<Directory /the/dir/of/the/asp/pages>
Order Allow,Deny
Allow all
</Directory>
and everything worked.
More links:
http://www.gotmono.net/documentation/mod-mono-howto.html
http://www.mono-project.com/Mod_mono
and there is an INSTALL file in the mod_mono source download.
I hope this helps someone out.
Ben